Created
December 1, 2017 19:25
-
-
Save stopachka/070f846384ce7a3d927093673711e995 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API="https://api.wit.ai" | |
TOKEN="" | |
curl -X DELETE \ | |
"$API/entities/Conversation" \ | |
-H "authorization: Bearer $TOKEN" | |
curl -X POST \ | |
"$API/entities" \ | |
-H "authorization: Bearer $TOKEN" \ | |
-H 'cache-control: no-cache' \ | |
-H 'content-type: application/json' \ | |
-d '{ | |
"id":"Conversation" | |
}' | |
curl -X POST \ | |
"$API/samples?v=20170307" \ | |
-H "authorization: Bearer $TOKEN" \ | |
-H 'cache-control: no-cache' \ | |
-H 'content-type: application/json' \ | |
-d '[ | |
{ | |
"text": "Book a doctor", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "bookDoctor" | |
} | |
] | |
}, | |
{ | |
"text": "I would like to book a doctor", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "bookDoctor" | |
} | |
] | |
}, | |
{ | |
"text": "Can I book a doctor for this Tuesday?", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "bookDoctor" | |
} | |
] | |
}, | |
{ | |
"text": "Is doctor Burke available this Tuesday?", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "bookDoctor" | |
} | |
] | |
}, | |
{ | |
"text": "Can I check doctor Burke'\'''\'''\''s schedule for this week?", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "bookDoctor" | |
} | |
] | |
} | |
]' | |
curl -X POST \ | |
"$API/samples?v=20170307" \ | |
-H "authorization: Bearer $TOKEN" \ | |
-H 'cache-control: no-cache' \ | |
-H 'content-type: application/json' \ | |
-d ' | |
[ | |
{ | |
"text": "Contact support", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "contactOperator" | |
} | |
] | |
}, | |
{ | |
"text": "Can I talk to an operator?", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "contactOperator" | |
} | |
] | |
}, | |
{ | |
"text": "Would you get me in touch with a human?", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "contactOperator" | |
} | |
] | |
}, | |
{ | |
"text": "It will be great if I can talk to a person.", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "contactOperator" | |
} | |
] | |
}, | |
{ | |
"text": "Can you get me in touch with an operator?", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "contactOperator" | |
} | |
] | |
}, | |
{ | |
"text": "Forward me to an operator", | |
"entities": [ | |
{ | |
"entity": "Conversation", | |
"value": "contactOperator" | |
} | |
] | |
} | |
] | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment