fix default model select (#5243)
Some checks are pending
Deploy doc image to cf / deploy-production (push) Waiting to run
Deploy doc image by kubeconfig / build-fastgpt-docs-images (push) Waiting to run
Deploy doc image by kubeconfig / update-docs-image (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions

This commit is contained in:
Archer 2025-07-17 18:15:04 +08:00 committed by GitHub
parent 06e708756e
commit 9860a7a978
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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