From fb5e218b430d9c26542a92907007cd99dce0afbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 27 Feb 2026 23:36:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai):=20=E4=BF=AE=E5=A4=8DAI=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=8F=90=E4=BE=9B=E5=95=86=E9=85=8D=E7=BD=AE=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复baseURL初始化逻辑,确保Ollama原生API正确设置 - 恢复被注释的服务提供商选择下拉框组件 - 恢复被注释的BaseURL输入框组件 - 保持OpenAI API密钥输入框仅在OpenAI模式下显示 --- src/views/ai/index.vue | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/views/ai/index.vue b/src/views/ai/index.vue index 9836114..ad07990 100644 --- a/src/views/ai/index.vue +++ b/src/views/ai/index.vue @@ -22,9 +22,7 @@ const provider = ref('ollama'); // Default to Ollama native API when provider is ollama. - const baseURL = ref( - provider.value === 'openai' ? AI_API_URL : OLLAMA_API_URL - ); + const baseURL = ref(provider.value === OLLAMA_API_URL); const apiKey = ref(''); const modelLoading = ref(false); @@ -255,23 +253,23 @@ /> - - - - - - - - - - - - - - - - - + + + + + +