tbeavin
tbeavin

Reputation: 11

watson conversation service dialog node editor doesn't allow context setting

In the Watson Conversation Service documentation says, "You can store information by modifying the context part of the dialog node definition in an editor. To open the editor, select the node menu and select Advanced".

However, when I try modifying the dialog node per the example given in the documentation it seems that the dialog service deletes the context setting that I added.

Here's the example in the doc:

"context":
{
  "my_dessert_string": "ice-cream",  
  "toppings_array": ["onion", "olives"],
  "age_number": 18,
  "complex_object": {
     "user_firstname" : "Peter",
     "user_lastname" : "Pan",
     "has_card" : false    
   }
}

I go into the "advanced response" dialog node editor and add the above to the node, but after I "try it out" it's not there anymore.

What am I doing wrong, and what is the correct way to set context variables in a dialog node with Watson Conversation Service?

Many thanks!

Upvotes: 0

Views: 426

Answers (1)

tbeavin
tbeavin

Reputation: 11

My mistake was that I missed a "," between the "output" and "context" sections. When I added the "," it worked fine.

I also found out that the editor flagged this as an error for me by changing the color of the box from blue to red, which is a nice feature to let you know if you still have errors in your dialog node.

Upvotes: 1

Related Questions