From c94a7f662956733527e63389ea8340cb4d59a0b5 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 21 Jan 2025 16:15:04 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=92=88=E5=AF=B9=20api=5Fbase=20?= =?UTF-8?q?=E7=9A=84=E6=98=8E=E6=98=BE=E6=8F=90=E7=A4=BA=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20ollama=20=E6=A8=A1=E6=9D=BF=E7=9A=84api=5Fbase=20#2?= =?UTF-8?q?47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/config/default.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index a103a5f05..eaae70e25 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -285,7 +285,7 @@ CONFIG_METADATA_2 = { "type": "openai_chat_completion", "enable": True, "key": ["ollama"], # ollama 的 key 默认是 ollama - "api_base": "http://localhost:11434", + "api_base": "http://localhost:11434/v1", "model_config": { "model": "llama3.1-8b", }, @@ -396,7 +396,8 @@ CONFIG_METADATA_2 = { "api_base": { "description": "API Base URL", "type": "string", - "hint": "API Base URL 请在在模型提供商处获得。支持 Ollama 开放的 API 地址。如果您确认填写正确但是使用时出现了 404 异常,可以尝试在地址末尾加上 `/v1`。", + "hint": "API Base URL 请在在模型提供商处获得。如使用时出现了 404 报错,可以尝试在地址末尾加上 `/v1`。", + "obvious_hint": True, }, "base_model_path": { "description": "基座模型路径",