mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-13 14:08:51 +01:00
🧠 feat: Cohere support as Custom Endpoint (#2328)
* chore: bump cohere-ai, fix firebase vulnerabilities by going down versions * feat: cohere rates and context windows * feat(createCoherePayload): transform openai payload for cohere compatibility * feat: cohere backend support * refactor(UnknownIcon): optimize icon render and add cohere * docs: add cohere to Compatible AI Endpoints * Update ai_endpoints.md
This commit is contained in:
parent
daa5f43ac6
commit
cd7f3a51e1
18 changed files with 1007 additions and 622 deletions
|
|
@ -14,6 +14,39 @@ In all of the examples, arbitrary environment variable names are defined but you
|
|||
|
||||
Some of the endpoints are marked as **Known,** which means they might have special handling and/or an icon already provided in the app for you.
|
||||
|
||||
## Cohere
|
||||
> Cohere API key: [dashboard.cohere.com](https://dashboard.cohere.com/)
|
||||
|
||||
**Notes:**
|
||||
|
||||
- **Known:** icon provided.
|
||||
- Experimental: does not follow OpenAI-spec, uses a new method for endpoint compatibility, shares some similarities and parameters.
|
||||
- For a full list of Cohere-specific parameters, see the [Cohere API documentation](https://docs.cohere.com/reference/chat).
|
||||
- Note: The following parameters are recognized between OpenAI and Cohere. Most are removed in the example config below to prefer Cohere's default settings:
|
||||
- `stop`: mapped to `stop_sequences`
|
||||
- `top_p`: mapped to `p`, different min/max values
|
||||
- `frequency_penalty`: different min/max values
|
||||
- `presence_penalty`: different min/max values
|
||||
- `model`: shared, included by default.
|
||||
- `stream`: shared, included by default.
|
||||
- `max_tokens`: shared, not included by default.
|
||||
|
||||
|
||||
```yaml
|
||||
- name: "cohere"
|
||||
apiKey: "${COHERE_API_KEY}"
|
||||
baseURL: "https://api.cohere.ai/v1"
|
||||
models:
|
||||
default: ["command-r","command-r-plus","command-light","command-light-nightly","command","command-nightly"]
|
||||
fetch: false
|
||||
modelDisplayLabel: "cohere"
|
||||
titleModel: "command"
|
||||
dropParams: ["stop", "user", "frequency_penalty", "presence_penalty", "temperature", "top_p"]
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
## Groq
|
||||
> groq API key: [wow.groq.com](https://wow.groq.com/)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue