curl --request POST \
--url https://api.example.com/chatbot/chat \
--header 'Content-Type: application/json' \
--data '
{
"courseID": "<string>",
"query": "<string>",
"thread_id": [
{}
]
}
'{
"answer": "<string>",
"sources": [
{
"url": "<string>",
"title": "<string>",
"type": "<string>",
"seconds": 123,
"minutes": 123,
"number": 123
}
],
"thread_id": [
{}
]
}Send a message to a course chatbot and receive an AI-generated answer with source citations.
curl --request POST \
--url https://api.example.com/chatbot/chat \
--header 'Content-Type: application/json' \
--data '
{
"courseID": "<string>",
"query": "<string>",
"thread_id": [
{}
]
}
'{
"answer": "<string>",
"sources": [
{
"url": "<string>",
"title": "<string>",
"type": "<string>",
"seconds": 123,
"minutes": 123,
"number": 123
}
],
"thread_id": [
{}
]
}thread_id value returned by the previous call to maintain multi-turn context. Omit on the first message in a new conversation.Show Citation properties
https://www.youtube.com/watch?v=VIDEO_ID&t=123s."YouTube".thread_id in the next request to continue the conversation.curl --request POST \
--url http://localhost:8000/chatbot/chat \
--header 'Content-Type: application/json' \
--data '{
"courseID": "64f1a2b3c4d5e6f7a8b9c0d1",
"query": "What is the significance of horseshoe crabs?"
}'
{
"answer": "Horseshoe crabs are ecologically and medically significant. Their blood contains Limulus Amebocyte Lysate (LAL), which is used to test for bacterial endotoxins in medical equipment and vaccines [0].",
"sources": [
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=183s",
"title": "Marine Biology: Horseshoe Crabs and Their Role in Medicine",
"type": "YouTube",
"seconds": 3,
"minutes": 3,
"number": 0
}
],
"thread_id": []
}