This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated CSS for full width image in page-content.
- Loading branch information
Pandorabots
authored and
Pandorabots
committed
Mar 14, 2016
1 parent
7291d05
commit b323c0c
Showing
4 changed files
with
60 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
layout: default | ||
title: Using the Anonymous Talk API | ||
--- | ||
|
||
# "Managing" End-Users with Anonymous Talk API | ||
|
||
If you've developed your bot to remember conversational elements, and you'd like to have it remember them past an active session with your end-users but don't want to maintain any kind of end-user management, the new Anonymous Talk API can solve that issue! | ||
|
||
This API will allow you to request creation of an end-user client_name on the AIaaS platform that will maintain persistent predicates for anonymous end-users talking to your bot(s), without you having to maintain end-user profiles on your website or application. | ||
|
||
Previously, you had the option to pass in a `client_name` to identify your end-users. This would allow predicates to persist throughout a given chat session, but eventually fall out of the bot's memory. By using a `client_name` retrieved from the Anonymous Talk API, your end-user's predicates will persist beyond this limited scope. | ||
|
||
### Getting Started | ||
|
||
The Anonymous Talk API is similar to the Talk to Bot API in that to start a talk interaction with your bot with a brand new end-user, at minimum you will need your application ID (`APP_ID`), user key (`USER_KEY`), bot name (`BOTNAME`), and input message to your bot (`INPUT`). A sample cURL command would be: | ||
|
||
curl -v -X POST 'https://aiaas.pandorabots.com/atalk/APP_ID/BOTNAME?user_key=USER_KEY&input=INPUT' | ||
|
||
|
||
Sending the HTTP request without the client_name parameter will indicate to AIaaS that you are requesting a new end-user account. The HTTP response will return a JSON object such as: | ||
|
||
{ "status": "ok", | ||
"responses": [<OUTPUT>], | ||
"sessionid": <SESSION_ID> , | ||
"client_name": "aiaas-XXX-user-NNNN" | ||
} | ||
|
||
where `<OUTPUT>` is the bot response to the input received, `<SESSION_ID>` is a sequential number generated by Pandorabots, and client_name is an anonymous end-user client name generated by Pandorabots, where `XXX` is your `APP_ID` and `NNNN` is a numeric starting with 0000, and increments by 1 after each new request. | ||
|
||
### Continuing the Conversation | ||
Once an anonymous end-user `client_name` has been provided, your application should use this client_name in subsequent talk interactions (either Anonymous Talk or Talk to Bot API will work). Any predicates created in conversation with your bot will be associated with this new `client_name` and will persist indefinitely until overwritten. | ||
|
||
Your application can save this `client_name` as an anonymous end-user either in a cookie, as a local variable in your application, or other mechanisms developed in your application. | ||
|
||
**NOTE OF CAUTION --** When testing your application, not including a `client_name` will result in a new end-user `client_name` being created; make sure your application ONLY excludes this parameter for brand new end-users or else you may end up reaching your maximum limit on anonymous users. | ||
|
||
### BONUS! | ||
|
||
**Persistent Predicates for Known End-Users** | ||
|
||
This method can also be used for known end-users. In this case, the `client_name` provided by Pandorabots should be saved in your application's database associated with your end-user's profile, and used each time your end-user talks to your bot(s). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.