mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
Fix setOptions() to properly handle modelOptions (#975)
For #974 - Adds an else to the check for this.modelOptions - Allows the modelOptions to be updated when the model is already initialized
This commit is contained in:
parent
8580f1c3d3
commit
d13a7b1a74
1 changed files with 6 additions and 0 deletions
|
|
@ -59,6 +59,12 @@ class OpenAIClient extends BaseClient {
|
|||
typeof modelOptions.presence_penalty === 'undefined' ? 1 : modelOptions.presence_penalty,
|
||||
stop: modelOptions.stop,
|
||||
};
|
||||
} else {
|
||||
// Update the modelOptions if it already exists
|
||||
this.modelOptions = {
|
||||
...this.modelOptions,
|
||||
...modelOptions,
|
||||
};
|
||||
}
|
||||
|
||||
if (process.env.OPENROUTER_API_KEY) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue