Conversation ID
Continuing a conversation across multiple API calls
Every response from the chat endpoint contains a unique Conversation ID.
This Conversation ID allows the Smart Symptom Checker to continue a conversation across multiple API calls and should be used as part of each request to the chat endpoint.
Example
Response
The following response from the Healthily API provides a message and single choice question, along with the conversation_id
of 6e0fe8b7-eabc-4f64-b135-70946182579c
{
"popup": false,
"messages": [
{
"type": "TEXT",
"value": "What would you like to do?",
"meta": {
"chat_context": [
"false"
]
}
}
],
"question": {
"mandatory": true,
"multiple": false,
"choices": [
{
"id": "0",
"label": "Check symptoms"
},
{
"id": "1",
"label": "Coronavirus Risk Assessment"
},
{
"id": "2",
"label": "Health tests"
},
{
"id": "3",
"label": "Ask a question"
}
]
},
"conversation_model": {
"conversation_context": {
"conversation": false,
"type": "ASSESSMENT"
},
"symptoms_summary": {},
"report": {}
},
"conversation_id": "6e0fe8b7-eabc-4f64-b135-70946182579c"
Request
When constructing the next request, it should contain the same conversation_id
of 6e0fe8b7-eabc-4f64-b135-70946182579c
{
"message": "0",
"conversation_id": "6e0fe8b7-eabc-4f64-b135-70946182579c"
}
Updated 9 months ago