mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-15 15:41:05 +00:00
fix default model select (#5243)
This commit is contained in:
@@ -72,10 +72,13 @@ const CommonInputForm = ({ item, nodeId }: RenderInputProps) => {
|
||||
const inputType = nodeInputTypeToInputType(item.renderTypeList);
|
||||
const value = useMemo(() => {
|
||||
if (inputType === InputTypeEnum.selectLLMModel) {
|
||||
if (item.value === undefined && defaultModel) {
|
||||
handleChange(defaultModel);
|
||||
}
|
||||
return item.value || defaultModel;
|
||||
}
|
||||
return item.value;
|
||||
}, [inputType, item.value, defaultModel]);
|
||||
}, [inputType, item.value, defaultModel, handleChange]);
|
||||
|
||||
return (
|
||||
<InputRender
|
||||
|
Reference in New Issue
Block a user