AI 0.0.8

AI 0.0.8

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Mar 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Dmitriy Kuragin.



AI 0.0.8

  • By
  • Dmitriy Kuragin

Cocoa SDK for api.ai


Overview

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.

Prerequsites

Integrating into your app

Init the SDK.

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")

Perform request.

...
// 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 ...
}