Before call make sure that AI Answer Assist feature enabled on admin
dashboard, otherwise you will get 405 error.
Body Parameters
Message you want to get answer for. The maximum length for the message is 2000
symbols.
Conversation history. Used to add context.
May be user or assistant.
A user or application session token. See Authentication
page to learn more about session tokens.
Responses
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
"smart_chat_assistant_id": "65d5f3473d5d68095462165d",
"message": "Who are you?",
"history": [
{
"role": "assistant",
"message": "History message"
},
{
"role": "user",
"message": "Hi"
},
{
"role": "assistant",
"message": "Hello! How can I assist you today?"
}
]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_answer_assist
{
"answer": "Hello! How can I assist you today?"
}