mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🧠 fix(Cohere): map to expected SDK params (#2329)
This commit is contained in:
parent
cd7f3a51e1
commit
fb80af05be
2 changed files with 9 additions and 9 deletions
|
|
@ -69,13 +69,13 @@ function createCoherePayload({ modelOptions }) {
|
||||||
return {
|
return {
|
||||||
message: latestUserMessageContent,
|
message: latestUserMessageContent,
|
||||||
model: model,
|
model: model,
|
||||||
chat_history: chatHistory,
|
chatHistory,
|
||||||
stream: stream ?? false,
|
stream: stream ?? false,
|
||||||
temperature: temperature,
|
temperature: temperature,
|
||||||
frequency_penalty: frequency_penalty,
|
frequencyPenalty: frequency_penalty,
|
||||||
presence_penalty: presence_penalty,
|
presencePenalty: presence_penalty,
|
||||||
max_tokens: max_tokens,
|
maxTokens: max_tokens,
|
||||||
stop_sequences: stop,
|
stopSequences: stop,
|
||||||
preamble,
|
preamble,
|
||||||
p: top_p,
|
p: top_p,
|
||||||
...rest,
|
...rest,
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,13 @@ Some of the endpoints are marked as **Known,** which means they might have speci
|
||||||
- Experimental: does not follow OpenAI-spec, uses a new method for endpoint compatibility, shares some similarities and parameters.
|
- 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).
|
- 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:
|
- 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`
|
- `stop`: mapped to `stopSequences`
|
||||||
- `top_p`: mapped to `p`, different min/max values
|
- `top_p`: mapped to `p`, different min/max values
|
||||||
- `frequency_penalty`: different min/max values
|
- `frequency_penalty`: mapped to `frequencyPenalty`, different min/max values
|
||||||
- `presence_penalty`: different min/max values
|
- `presence_penalty`: mapped to `presencePenalty`, different min/max values
|
||||||
- `model`: shared, included by default.
|
- `model`: shared, included by default.
|
||||||
- `stream`: shared, included by default.
|
- `stream`: shared, included by default.
|
||||||
- `max_tokens`: shared, not included by default.
|
- `max_tokens`: shared, mapped to `maxTokens`, not included by default.
|
||||||
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue