TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Mar 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Dmitriy Kuragin.
The API.AI iOS SDK makes it easy to integrate natural language processing API on Apple devices. API.AI allows using voice commands and integration with dialog scenarios defined for a particular agent in API.AI.
In the AppDelegate.swift
, add AI import:
import AI
In the AppDelegate.swift, add
// Define API.AI configuration here.
AI.configure("YOUR_CLIENT_ACCESS_TOKEN")
...
// Request using text (assumes that speech recognition / ASR
// is done using a third-party library, e.g. AT&T)
AI.sharedService.TextRequest("Hello").success { (response) -> Void in
// Handle success ...
}.failure { (error) -> Void in
// Handle error ...
}