diff --git a/web/default/src/pages/Channel/EditChannel.js b/web/default/src/pages/Channel/EditChannel.js index 330b8c8ef4..203cd71405 100644 --- a/web/default/src/pages/Channel/EditChannel.js +++ b/web/default/src/pages/Channel/EditChannel.js @@ -83,6 +83,7 @@ const EditChannel = () => { data.model_mapping = JSON.stringify(JSON.parse(data.model_mapping), null, 2); } setInputs(data); + setBasicModels(getChannelModels(data.type)); } else { showError(message); } @@ -99,9 +100,6 @@ const EditChannel = () => { })); setOriginModelOptions(localModelOptions); setFullModels(res.data.data.map((model) => model.id)); - setBasicModels(res.data.data.filter((model) => { - return model.id.startsWith('gpt-3') || model.id.startsWith('text-'); - }).map((model) => model.id)); } catch (error) { showError(error.message); } @@ -137,6 +135,9 @@ const EditChannel = () => { useEffect(() => { if (isEdit) { loadChannel().then(); + } else { + let localModels = getChannelModels(inputs.type); + setBasicModels(localModels); } fetchModels().then(); fetchGroups().then(); @@ -355,7 +356,7 @@ const EditChannel = () => {
+ }}>填入相关模型