Chatbot with API.AI and Google Cloud APIs
This sample demonstrates how to build an iOS chatbot with Google Cloud Vision,
Speech, and Translate APIs and API.AI.
Prerequisites
- An iOS API key for the Cloud APIs (See
the docs to learn more)
- Xcode 7
- Cocoapods version 1.0 or later
Quickstart
- Clone this repo and
cd
into this directory.
- Run
pod install
to download and build Cocoapods dependencies.
- Open the project by running
open ChatBot.xcworkspace
.
- In CBDefines.m, replace
your google API key
with the API key obtained above.
- Build and run the app.
API keys
- Create a new project on https://console.cloud.google.com.
- Enable Billing.
- Go to API Manager.
- Go to Credentials
- Create credentials. Choose API Key.
- Replace @"your google API key" with your google API key in CBDefines.m
API.AI
Optionally, follow these steps to create your own API.AI agents.
- Create TourGuide agent.
- Go to Settings and import api.ai/TourGuide.zip.
- (Optional steps to support Chinese) Create TourGuideChinese agent with
language set to Chinese.
- Go to Settings and import api.ai/TourGuideChinese.zip
- Replace CBApiAiToken with your API.AI token in CBDefines.m.
You can find your token from the API.AI agent setting page.
Chinese Demo
License
This sample is released under the Apache 2.0 license.
Disclaimer
This is not an official Google product.
Authors
Chang Luo and Bob Liu