diff --git a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml index 7fea3872b15e2f..9487342a1d2c54 100644 --- a/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml +++ b/api/core/model_runtime/model_providers/wenxin/llm/ernie-3.5-4k-0205.yaml @@ -1,6 +1,6 @@ -model: ernie-3.5-8k +model: ernie-3.5-4k-0205 label: - en_US: Ernie-3.5-8K + en_US: Ernie-3.5-4k-0205 model_type: llm features: - agent-thought diff --git a/web/app/components/header/account-setting/model-provider-page/declarations.ts b/web/app/components/header/account-setting/model-provider-page/declarations.ts index da8c69b69d3075..e7d799ff9b4d70 100644 --- a/web/app/components/header/account-setting/model-provider-page/declarations.ts +++ b/web/app/components/header/account-setting/model-provider-page/declarations.ts @@ -1,8 +1,8 @@ export type FormValue = Record export type TypeWithI18N = { - 'en-US': T - 'zh-Hans': T + en_US: T + zh_Hans: T [key: string]: T } @@ -67,16 +67,16 @@ export enum ModelStatusEnum { export const MODEL_STATUS_TEXT: { [k: string]: TypeWithI18N } = { 'no-configure': { - 'en-US': 'No Configure', - 'zh-Hans': '未配置凭据', + en_US: 'No Configure', + zh_Hans: '未配置凭据', }, 'quota-exceeded': { - 'en-US': 'Quota Exceeded', - 'zh-Hans': '额度不足', + en_US: 'Quota Exceeded', + zh_Hans: '额度不足', }, 'no-permission': { - 'en-US': 'No Permission', - 'zh-Hans': '无使用权限', + en_US: 'No Permission', + zh_Hans: '无使用权限', }, } diff --git a/web/app/components/header/account-setting/model-provider-page/hooks.ts b/web/app/components/header/account-setting/model-provider-page/hooks.ts index 58c7dc906d399f..27f2b15582f8fb 100644 --- a/web/app/components/header/account-setting/model-provider-page/hooks.ts +++ b/web/app/components/header/account-setting/model-provider-page/hooks.ts @@ -11,11 +11,11 @@ import type { DefaultModel, DefaultModelResponse, Model, - ModelTypeEnum, } from './declarations' import { ConfigurateMethodEnum, + ModelStatusEnum, } from './declarations' import I18n from '@/context/i18n' import { @@ -132,6 +132,7 @@ export const useCurrentProviderAndModel = (modelList: Model[], defaultModel?: De export const useTextGenerationCurrentProviderAndModelAndModelList = (defaultModel?: DefaultModel) => { const { textGenerationModelList } = useProviderContext() + const activeTextGenerationModelList = textGenerationModelList.filter(model => model.status === ModelStatusEnum.active) const { currentProvider, currentModel, @@ -141,6 +142,7 @@ export const useTextGenerationCurrentProviderAndModelAndModelList = (defaultMode currentProvider, currentModel, textGenerationModelList, + activeTextGenerationModelList, } } diff --git a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx index c9ce37a7e58ddd..b1aba24eae87fd 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-parameter-modal/index.tsx @@ -93,7 +93,7 @@ const ModelParameterModal: FC = ({ const { currentProvider, currentModel, - textGenerationModelList, + activeTextGenerationModelList, } = useTextGenerationCurrentProviderAndModelAndModelList( { provider, model: modelId }, ) @@ -114,7 +114,7 @@ const ModelParameterModal: FC = ({ } const handleChangeModel = ({ provider, model }: DefaultModel) => { - const targetProvider = textGenerationModelList.find(modelItem => modelItem.provider === provider) + const targetProvider = activeTextGenerationModelList.find(modelItem => modelItem.provider === provider) const targetModelItem = targetProvider?.models.find(modelItem => modelItem.model === model) setModel({ modelId: model, @@ -223,7 +223,7 @@ const ModelParameterModal: FC = ({