mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🐛 fix: Correct Model Parameters Merging and Panel UI (#5038)
* fix: Model Panel, watching wrong form field * fix: Refactor agent initialization to merge model parameters correctly
This commit is contained in:
parent
000641c619
commit
f873587e5f
4 changed files with 35 additions and 15 deletions
|
|
@ -97,12 +97,15 @@ const initializeAgentOptions = async ({
|
|||
agent.endpoint = provider.toLowerCase();
|
||||
}
|
||||
|
||||
const model_parameters = agent.model_parameters ?? { model: agent.model };
|
||||
const _endpointOption = isInitialAgent
|
||||
? endpointOption
|
||||
: {
|
||||
model_parameters,
|
||||
};
|
||||
const model_parameters = Object.assign(
|
||||
{},
|
||||
agent.model_parameters ?? { model: agent.model },
|
||||
isInitialAgent === true ? endpointOption?.model_parameters : {},
|
||||
);
|
||||
const _endpointOption =
|
||||
isInitialAgent === true
|
||||
? Object.assign({}, endpointOption, { model_parameters })
|
||||
: { model_parameters };
|
||||
|
||||
const options = await getOptions({
|
||||
req,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue