fix: update params after switching model

This commit is contained in:
jialin
2026-06-03 15:50:06 +08:00
committed by jialin
parent 110bc3205e
commit 39374eafda
+8 -9
View File
@@ -47,8 +47,14 @@ const GroundLeft: React.FC<MessageProps> = forwardRef((props, ref) => {
messageList, messageList,
loading loading
} = useChatCompletion(scroller); } = useChatCompletion(scroller);
const { handleOnValuesChange, formRef, setParams, paramsConfig, parameters } = const {
useInitLLmMeta( handleOnValuesChange,
handleOnModelChange,
formRef,
setParams,
paramsConfig,
parameters
} = useInitLLmMeta(
{ modelList, isChat: true }, { modelList, isChat: true },
{ {
defaultValues: llmInitialValues, defaultValues: llmInitialValues,
@@ -102,13 +108,6 @@ const GroundLeft: React.FC<MessageProps> = forwardRef((props, ref) => {
}); });
}; };
const handleOnModelChange = (model: string) => {
setParams({
...formRef.current?.getFieldsValue(),
model
});
};
const handleCloseViewCode = () => { const handleCloseViewCode = () => {
setShow(false); setShow(false);
}; };