Skip to content

Commit

Permalink
improve config update method
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarsh-scottlogic committed Mar 12, 2024
1 parent 855dbbd commit 6e881b7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions frontend/src/components/ModelBox/ModelConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ function ModelConfiguration({
// and the change level request has not yet resolved successfully
return;
}
const newCustomChatModelConfigs = customChatModelConfigs.map((config) => {
const newConfig = { ...config };
newConfig.value = chatModel.configuration[config.id];
return newConfig;
});
const newCustomChatModelConfigs = customChatModelConfigs.map((config) => ({
...config,
value: chatModel.configuration[config.id],
}));
setCustomChatModel(newCustomChatModelConfigs);
}, [chatModel]);

Expand Down

0 comments on commit 6e881b7

Please sign in to comment.