Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- from watson_developer_cloud import ConversationV1
- conversation = ConversationV1(
- username = '{username}',
- password = '{password}',
- version = '2017-05-26'
- )
- # parent workspace id
- workspace_id = ''
- # text
- text = 'what is my credit score' # or whatever fits your use case
- # send to router
- response = conversation.message(
- workspace_id=workspace_id,
- message_input={
- 'text': text
- }
- )
- print(json.dumps(response, indent=2))
Add Comment
Please, Sign In to add comment