Chat with a Knowledge Bot
TestingPOST
/api/knowledge-bots/{id}/summarizeInteract with your knowledge bot by asking questions or even a more complex chat history.
Soon to be replaced with the normal chat API design with persistent chats.
Request
Path Params
id
string
required
Body Params application/json
query
string
required
The question you want to ask your Knowledge Bot.
history
array [object {2}]
required
role
string
required
"user" or "assistant"
content
string
required
The content of the previous queries and answers.
Example
{
"query": "string",
"history": [
{
"role": "string",
"content": "string"
}
]
}
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : Rawtext/plain
ExampleJSON Stream
{"id":"c688c936-cf4d-4b64-b8be-8ea9cbf2a56e","content":"Quote 1 within the provided documents","similarity":0.87255812550904,"document_name":"source-document-1.pdf","page_number":2,"type":"section"}
{"id":"923edb1b-f731-4560-bb23-7a509aef4e79","content":"Quote n within the provided documents","similarity":0.87255812550904,"document_name":"source-document-n.pdf","page_number":17,"type":"section"}
{"delta":"One or multiple deltas containing the generated response including references to the documents from above. [c688c936-cf4d-4b64-b8be-8ea9cbf2a56e]","type":"delta"}
Last modified: a year ago