Intelli icon indicating copy to clipboard operation
Intelli copied to clipboard

Add cohere as provider to the chatbot

Open intelligentnode opened this issue 1 year ago • 2 comments

Update the chatbot to add cohere as provider, then update the chat and stream function to call the wrapper.

expected changes:

intelligentnode avatar Feb 07 '24 12:02 intelligentnode

@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 avatar Feb 10 '24 21:02 basilmusa

@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"
      ]
    }
  ]
}

intelligentnode avatar Feb 13 '24 12:02 intelligentnode

this is implemented

intelligentnode avatar Feb 04 '25 13:02 intelligentnode