测试已测试 | ✓ |
Lang语言 | SwiftSwift |
许可 | MIT |
发布最新发布 | 2017年3月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 Dmitriy Kuragin 维护。
API.AI iOS SDK 可以轻松地将自然语言处理 API 集成到苹果设备上。API.AI 允许使用语音命令,并集成 API.AI 中定义的特定代理的对话场景。
在 AppDelegate.swift
中添加 AI 输入
import AI
在 AppDelegate.swift 中添加:
// 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 ...
}