This repository has been archived by the owner on Aug 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Class Conversation
Jasmine Anteunis edited this page Jan 15, 2019
·
2 revisions
An instance of Conversation is generated after a call to the textConverse client method.
If you need more information on how to use it, check this page.
An instance of the Conversation class provides each of the following attributes:
Attributes | Type |
---|---|
raw | String: the raw unparsed json response |
uuid | String: the universal unique id of the api call |
source | String: the user input |
replies | Array[String]: all the replies |
action | Object: the action of the conversation |
nextActions | Array[Object]: the next actions of the conversation |
memory | Object: the memory of the conversation |
entities | Array[Entity]: the array of entities |
intents | Array[Object]: all the matched intents |
conversationToken | String: the conversation token |
language | String: the language of the input |
timestamp | String: the timestamp at the end of the processing |
status | String: the status of the response |
Method | Params | Return |
---|---|---|
reply() | String: the first reply |
Conversation conversation = client.request.doTextConverse(YOUR_TEXT)
String reply = conversation.reply()
Method | Params | Return |
---|---|---|
nextAction() | String: the first next action |
Conversation conversation = client.textConverse(YOUR_TEXT);
Action action = conversation.nextAction();
Method | Params | Return |
---|---|---|
joinedReplies() | sep: String | String: the replies concatenated |
If there is no sep parameter provided, the replies will be joined with a space.
Conversation conversation = client.textConverse(YOUR_TEXT);
String replies = conversation.joinedReplies()
Method | Params | Return |
---|---|---|
getMemory() | key: String | object: the memory of the conversation |
If there is no key parameter provided, the entire memory is returned
Conversation conversation = client.textConverse(YOUR_TEXT);
Memory memory = conversation.getMemory();