mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
fix(Anthropic): only pass properties defined by API reference in payload (#938)
This commit is contained in:
parent
e4843c4680
commit
81bda112d3
1 changed files with 13 additions and 2 deletions
|
|
@ -268,14 +268,25 @@ class AnthropicClient extends BaseClient {
|
|||
};
|
||||
|
||||
let text = '';
|
||||
const { model, stream, maxOutputTokens, ...rest } = this.modelOptions;
|
||||
const {
|
||||
stream,
|
||||
model,
|
||||
temperature,
|
||||
maxOutputTokens,
|
||||
stop: stop_sequences,
|
||||
topP: top_p,
|
||||
topK: top_k,
|
||||
} = this.modelOptions;
|
||||
const requestOptions = {
|
||||
prompt: payload,
|
||||
model,
|
||||
stream: stream || true,
|
||||
max_tokens_to_sample: maxOutputTokens || 1500,
|
||||
stop_sequences,
|
||||
temperature,
|
||||
metadata,
|
||||
...rest,
|
||||
top_p,
|
||||
top_k,
|
||||
};
|
||||
if (this.options.debug) {
|
||||
console.log('AnthropicClient: requestOptions');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue