From 1d89d80676c010a2438e3ac76c308a8fcaa0147a Mon Sep 17 00:00:00 2001 From: passthem Date: Tue, 9 Jun 2026 14:49:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=20AI=20=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E6=80=9D=E8=80=83=EF=BC=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Wolfx=20=E6=97=A5=E5=BF=97=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E7=A8=8B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- konabot/common/apis/wolfx.py | 5 +++-- konabot/plugins/handle_text/handlers/ai_handlers.py | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/konabot/common/apis/wolfx.py b/konabot/common/apis/wolfx.py index 6e1ecb7..8935c55 100644 --- a/konabot/common/apis/wolfx.py +++ b/konabot/common/apis/wolfx.py @@ -4,7 +4,7 @@ Wolfx 防灾免费 API import asyncio import json -from typing import Literal, TypeVar, cast +from typing import TypeVar, cast import aiohttp from aiosignal import Signal from loguru import logger @@ -239,7 +239,8 @@ class WolfxAPIService: logger.info(f"接收到来自 Wolfx API 的信息:{data}") await signal.send(obj) except pydantic.ValidationError as e: - logger.warning(f"解析 Wolfx API 时出错 URL={ws.url}") + data_text = data.decode('utf-8', 'replace') + logger.warning(f"解析 Wolfx API 时出错 URL={ws.url} raw={data_text}") logger.error(e) async def start(self): # pragma: no cover diff --git a/konabot/plugins/handle_text/handlers/ai_handlers.py b/konabot/plugins/handle_text/handlers/ai_handlers.py index 93d2e00..5c52427 100644 --- a/konabot/plugins/handle_text/handlers/ai_handlers.py +++ b/konabot/plugins/handle_text/handlers/ai_handlers.py @@ -23,7 +23,7 @@ class THQwen(TextHandler): ostream="你或当前环境没有使用 qwen 的权限。如有疑问请联系管理员", ) - llm = get_llm() + llm = get_llm(llm_model="qwen3.7-plus") messages = [] if istream is not None: @@ -48,7 +48,9 @@ class THQwen(TextHandler): "content": "除非用户要求,请尽可能短点回答。另外,当前环境不支持 Markdown 语法,如果可以,请使用纯文本回答", } ] + messages - result = await llm.chat(cast(Any, messages)) + result = await llm.chat( + cast(Any, messages), extra_body={"enable_thinking": False} + ) content = result.content if content is None: return TextHandleResult(