Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- from watson_developer_cloud import ConversationV1
- conversation = ConversationV1(
- username='SERVICE_USERNAME',
- password='SERVICE_PASSWORD',
- version='2016-07-11')
- workspace_id = 'WORKSPACE_ID_CONVERSATION'
- response = conversation.message(workspace_id=workspace_id, context= {'username':'Simon'})
- print json.dumps(response)
- {
- "entities":[],
- "intents":[],
- "output":{
- "log_messages":[],
- "nodes_visited":["node_1_1472298724972],
- "text":["Hello Simon"]
- },
- "context":{
- "username":"Simon",
- "conversation_id":"9dc1501b-ac53-4b51-a299-37f5314ebf89",
- "system":{
- "dialog_turn_counter":1,
- "dialog_stack":["root"],
- "dialog_request_counter":1
- }
- },
- "input":{}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement