From d27e625fdecd41656467aebd312f101ccf93a1fb Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Sat, 5 Jul 2025 15:59:22 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=89=8D=E7=AB=AF=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E4=B8=BB=E9=94=AE=E6=8D=A2=E4=BD=8DmodelId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Ai.Vue3/src/api/model/types.ts | 1 + Yi.Ai.Vue3/src/components/ModelSelect/index.vue | 4 ++-- Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Yi.Ai.Vue3/src/api/model/types.ts b/Yi.Ai.Vue3/src/api/model/types.ts index a6eb8560..30a43521 100644 --- a/Yi.Ai.Vue3/src/api/model/types.ts +++ b/Yi.Ai.Vue3/src/api/model/types.ts @@ -11,4 +11,5 @@ export interface GetSessionListVO { apiHost?: string; apiKey?: string; remark?: string; + modelId?: string; } diff --git a/Yi.Ai.Vue3/src/components/ModelSelect/index.vue b/Yi.Ai.Vue3/src/components/ModelSelect/index.vue index e7e3c2fc..1deb1ed3 100644 --- a/Yi.Ai.Vue3/src/components/ModelSelect/index.vue +++ b/Yi.Ai.Vue3/src/components/ModelSelect/index.vue @@ -20,7 +20,7 @@ const userStore = useUserStore(); const modelStore = useModelStore(); // 检查模型是否可用 function isModelAvailable(item: GetSessionListVO) { - return isUserRoleVip.value || item.modelName?.includes('DeepSeek-R1') || userStore.userInfo?.user?.userName === 'cc'; + return isUserRoleVip.value || item.modelId?.includes('DeepSeek-R1-0528') || userStore.userInfo?.user?.userName === 'cc'; } onMounted(async () => { @@ -28,7 +28,7 @@ onMounted(async () => { // 设置默认模型 if ( modelStore.modelList.length > 0 - && (!modelStore.currentModelInfo || !modelStore.currentModelInfo.modelName) + && (!modelStore.currentModelInfo || !modelStore.currentModelInfo.modelId) ) { modelStore.setCurrentModelInfo(modelStore.modelList[0]); } diff --git a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue index a4f6d613..08b8d475 100644 --- a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue +++ b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue @@ -185,7 +185,7 @@ async function startSSE(chatContent: string) { })), sessionId: route.params?.id !== 'not_login' ? String(route.params?.id) : undefined, userId: userStore.userInfo?.userId, - model: modelStore.currentModelInfo.modelName ?? '', + model: modelStore.currentModelInfo.modelId ?? '', })) { handleDataChunk(chunk.result as AnyObject); }