From fe24948ce98bd770a1bcef573c47d16b3f6c53b2 Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Tue, 12 May 2026 00:42:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A8=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=E5=92=8C=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E6=A8=A1=E5=9E=8B=E5=BC=80=E5=85=B3=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在模型配置页面中添加 `isInferenceModel` 函数,用于判断模型类型是否为推理模型。 - 根据模型类型动态显示会话模型开关,提升用户交互体验。 --- .../digitalHuman/modelConfig/modelModule/index.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/views/digitalHuman/modelConfig/modelModule/index.vue b/src/views/digitalHuman/modelConfig/modelModule/index.vue index c7bb262..9cf205b 100644 --- a/src/views/digitalHuman/modelConfig/modelModule/index.vue +++ b/src/views/digitalHuman/modelConfig/modelModule/index.vue @@ -38,10 +38,12 @@ @@ -108,6 +110,16 @@ const state = reactive({ }, }); +// 判断是否为推理模型(只有推理模型才显示会话模型开关) +const isInferenceModel = (modelsType: number | string | undefined | null) => { + if (modelsType === undefined || modelsType === null || modelsType === '') { + return false; + } + // 查找模型类型标签,判断是否为"推理模型" + const typeInfo = state.modelTypes.find((t) => String(t.id) === String(modelsType)); + return typeInfo?.label === '推理模型' || String(modelsType) === '1'; +}; + // 会话模型开关切换 const onChatModelSwitchRequest = async (row: { id?: number | string; isChatModel?: number }) => { try {