Open intelligentnode opened 7 months ago
@intelligentnode where can I get the structure of the json response for cohere responses?
I'm trying to implement Chatbot._parse_cohere_responses(results)
method but need the structure of the response.
@basilmusa kindly check the chatbot response structure below:
you can access the none-stream model text response as follow:
results.text
{
"text": "string",
"generation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"citations": [
{
"start": 0,
"end": 0,
"text": "string",
"document_ids": [
"string"
]
}
],
"documents": [
{
"id": "string",
"additionalProp": "string"
}
],
"search_queries": [
{
"text": "string",
"generation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
],
"search_results": [
{
"search_query": {
"text": "string",
"generation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"connector": {
"id": "string"
},
"document_ids": [
"string"
]
}
]
}
Update the chatbot to add cohere as provider, then update the chat and stream function to call the wrapper.
expected changes: