0
votes

I have created a workspace and created the intent, entities and dialogs for a conversation service Where we use the launch tool and "try it out", i can see the watson text response for the question i asked. But however when i use the api command via a rest client, it does not return the text output. The input i used for the api was

{
  "input": {
    "text": "increase the temperature of ac"
  }
}

and as response i got the following

{
"input": {
"text": "increase the temperature of ac"
}-
"context": {
"conversation_id": "5a7ce4c2-c6be-4cb8-b728-19136457bf28"
"system": {
"dialog_stack": [1]
0:  "root"
-
"dialog_turn_counter": 1
"dialog_request_counter": 1
}-
}-
"entities": [1]
0:  {
"entity": "appliance"
"location": [2]
0:  28
1:  30
-
"value": "ac"
}-
-
"intents": [1]
0:  {
"intent": "turn_up"
"confidence": 0.9854193755106732
}-
-
"output": {
"log_messages": [0]
"text": [0]
"nodes_visited": [1]
0:  "node_1_1469526692057"
-
}-
}

It doesnot have any text message in the json output

1
Are you sure there should be output text for that node? Looks to me the front end would just take an action based on the intent turn_up. - Simon O'Doherty
I get the expected text response when try your same input with curl. Have you tried the API explorer https://watson-api-explorer.mybluemix.net/apis/conversation-v1#!/message/post_v1_workspaces_workspace_id_message? It shows the curl command to use and a lot of other details that you can use to check your REST client. - jagat
stackoverflow.com/users/903526/jagat what text response you got while you tried with explorer. I get the same response as i quoted above even from explorer. I was expecting the "log_messages": [], to have some texts - Jyothis Jose
stackoverflow.com/users/1167890/simon-odoherty What i could see from the launch tool is that, when i key in "increase the temperature of ac", it returns the text that i have provided in dialog. I expect the same to happen via restclinet/ api explorer. Is that not the case ? - Jyothis Jose

1 Answers

0
votes

This is working as intended.

Using the Github Conversation demo, You can find the related node in the JSON by searching for "conditions": "#turn_up". Here is the related block.

{
  "go_to": {
    "return": null,
    "selector": "condition",
    "dialog_node": "node_11_1467233013716"
  },
  "output": {},
  "parent": null,
  "context": null,
  "created": "2016-07-22T04:55:54.661Z",
  "metadata": null,
  "conditions": "#turn_up",
  "description": null,
  "dialog_node": "node_10_1467233003109",
  "previous_sibling": "node_7_1467232789215"
},

Alternatively you can look up the block in the Conversation UI looking for #turn_up. For example.

enter image description here

The output field is empty. So the output text is not being handled by Conversation.

It has to be handled at the application layer. There are valid reasons for doing this. For example creating an answer store independent makes it easier for a non-technical user to update. Or if you wanted to hand off to something like Retrieve and Rank to find the answer.

In this case, how the Car demo handles this is detailed in the tutorial video, which you can see here.

https://youtu.be/wG2fuliRVNk