new ConversationV1(options)
Parameters:
| Name |
Type |
Description |
options |
|
Properties
| Name |
Type |
Description |
version_date |
|
|
|
- Source:
Members
(static) VERSION_DATE_2016_07_11 :string
Initial release
Type:
- Source:
(static) VERSION_DATE_2016_09_20 :string
9/20 update made changes to response format
* context.system.dialog_stack changed from an array of strings to an array of objects
Old:
"context": {
"system": {
"dialog_stack": [
"root"
],
New:
"context": {
"system": {
"dialog_stack": [
{
"dialog_node": "root"
}
],
Type:
- Source:
- See:
-
Methods
message(params)
Returns a response to a user utterance.
Example response for 2016-09-20 version_date:
{
"intents": [
{
"intent": "turn_on",
"confidence": 0.999103316650195
}
],
"entities": [
{
"entity": "appliance",
"location": [
12,
18
],
"value": "light"
}
],
"input": {
"text": "Turn on the lights"
},
"output": {
"log_messages": [],
"text": [
"Hi. It looks like a nice drive today. What would you like me to do?"
],
"nodes_visited": [
"node_1_1467221909631"
]
},
"context": {
"conversation_id": "820334ac-ee79-45b5-aa03-7958dcd0fd34",
"system": {
"dialog_stack": [
{
"dialog_node": "root"
}
],
"dialog_turn_counter": 1,
"dialog_request_counter": 1
}
}
}
Parameters:
| Name |
Type |
Description |
params |
Object
|
{ workspace_id: '', }
Properties
| Name |
Type |
Attributes |
Default |
Description |
workspace_id |
|
|
|
|
input |
|
<optional>
|
|
|
context |
|
<optional>
|
|
|
alternate_intents |
|
<optional>
|
false
|
includes other lower-confidence intents in the intents array |
output |
|
<optional>
|
|
|
entities |
|
<optional>
|
|
|
intents |
|
<optional>
|
|
|
|
- Source: