intelligentnode / IntelliNode

Access the latest AI models like ChatGPT, LLaMA, Diffusion, Gemini Hugging face, and beyond through a unified prompt layer and performance evaluation
https://show.intellinode.ai
Apache License 2.0
213 stars 13 forks source link

Add coral chat to cohere #64

Closed Barqawiz closed 9 months ago

Barqawiz commented 9 months ago
  1. Update the cohere wrapper to support the new chat function.
  2. Add cohere chat as provider to the chatbot.
  3. Create unit test cases.

Reference: The chat function details:

curl --location --request POST 'https://api.cohere.ai/v1/chat' \
--header 'Authorization: Bearer Dn5n4N84HPI8fBAJJM1BTMz435dad7mHpJEoKLvn' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "command-nightly",
    "message": "<YOUR MESSAGE HERE>",
    "temperature": 0.3,
    "chat_history": [],
    "prompt_truncation": "auto",
    "stream": true,
    "citation_quality": "accurate",
    "connectors": [{"id": "web-search"}]
  }'