Get Agent Responses By Chat Thread
GET
/v2/api/chat-thread/{chatthread_id}/agent-response
Agent Response
How This Endpoint Works
chatthread_id
as a path parameter to fetch responses from a specific chat session.What is a Chat Thread ID?
How to View Your Chat Thread ID
chatthread_id
, refer to this guide:How to View Your Chat Thread ID
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/v2/api/chat-thread//agent-response'
Response Response Example
200 - Example 1
{
"success": true,
"message": "Agent Response Found Successfully.",
"data": [
{
"id": 10932,
"comments": [],
"feedback": [],
"question": "Can you tell me how RAG works from the sources given?",
"response": {
"query": "Explain how Retrieval-Augmented Generation (RAG) works.",
"answer": "Retrieval-Augmented Generation (RAG) is a technique in natural language processing that enhances the capabilities of generative language models by integrating real-time data retrieval.",
"run_id": "4c0c5eb6-1902-4b26-97f3-448bcb7ba31f",
"history": [
{
"bot": "Retrieval-Augmented Generation (RAG) is a technique in natural language processing that enhances the capabilities of generative language models.",
"user": "Can you tell me how RAG works from the sources given?"
}
],
"indexes": [],
"sources": "[0]",
"success": true,
"cache_hit": false,
"agent_mode": "",
"corpus_ids": [
645
],
"references": [
{
"url": "Introduction to RAG1738098993.txt",
"order": 1,
"number": 0
}
],
"instructions": [],
"total_tokens": 4757,
"prompt_prefix": "",
"prompt_tokens": 4277,
"completion_tokens": 480,
"followup_questions": [
"How does RAG ensure responses are contextually appropriate?",
"What role does the retriever play in the RAG process?",
"Why is RAG beneficial for real-time information synthesis?"
]
},
"created_by": "user@example.com",
"created_on": "2025-01-28T21:18:06.614958Z",
"is_deleted": false,
"total_tokens": 4757,
"prompt_tokens": 4277,
"completion_tokens": 480,
"cache_hit": false,
"query_source": "web",
"message_id": null,
"cost": "0.02379",
"chat_thread": 4354,
"agent": 952,
"user": 1,
"llm_config": 8
}
]
}
Request
Path Params
chatthread_id
integerÂ
required
Example:
1234