Skip to content

Commit 0711172

Browse files
Fix/stale command hints (#8245)
* Update stage.py * fix: remove stale slash command hints * fix: remove stale slash command hints * fix: remove stale slash command hints * Update openai_source.py
1 parent d15606d commit 0711172

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

astrbot/builtin_stars/astrbot/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ async def on_message(self, event: AstrMessageEvent):
176176

177177
if not session_curr_cid:
178178
logger.error(
179-
"当前未处于对话状态,无法主动回复,请确保 平台设置->会话隔离(unique_session) 未开启,并使用 /switch 序号 切换或者 /new 创建一个会话。",
179+
"当前未处于对话状态,无法主动回复,请确保 平台设置->会话隔离(unique_session) 未开启,并使用 /new 创建一个会话。",
180180
)
181181
return
182182

astrbot/core/config/default.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@
10681068
"id_whitelist": {
10691069
"type": "list",
10701070
"items": {"type": "string"},
1071-
"hint": "只处理填写的 ID 发来的消息事件,为空时不启用。可使用 /sid 指令获取在平台上的会话 ID(类似 abc:GroupMessage:123)。管理员可使用 /wl 添加白名单",
1071+
"hint": "只处理填写的 ID 发来的消息事件,为空时不启用。可使用 /sid 指令获取在平台上的会话 ID(类似 abc:GroupMessage:123)。管理员可在 WebUI 的平台设置中管理白名单",
10721072
},
10731073
"id_whitelist_log": {
10741074
"type": "bool",

astrbot/core/pipeline/result_decorate/stage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ async def process(
368368
return
369369
if time.time() - render_start > 3:
370370
logger.warning(
371-
"文本转图片耗时超过了 3 秒,如果觉得很慢可以使用 /t2i 关闭文本转图片模式。",
371+
"文本转图片耗时超过了 3 秒,如果觉得很慢可以在 WebUI 中关闭文本转图片模式。",
372372
)
373373
if url:
374374
if url.startswith("http"):

astrbot/core/provider/sources/openai_source.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,8 +1138,8 @@ async def _handle_api_error(
11381138
or ("function" in str(e).lower() and "support" in str(e).lower())
11391139
):
11401140
# openai, ollama, gemini openai, siliconcloud 的错误提示与 code 不统一,只能通过字符串匹配
1141-
logger.info(
1142-
f"{self.get_model()} 不支持函数工具调用,已自动去除,不影响使用。",
1141+
logger.warning(
1142+
f"{self.get_model()} 不支持函数工具调用,已自动去除,不影响使用。如需永久关闭,可前往 WebUI 中关闭工具调用。",
11431143
)
11441144
payloads.pop("tools", None)
11451145
return (
@@ -1153,9 +1153,6 @@ async def _handle_api_error(
11531153
)
11541154
# logger.error(f"发生了错误。Provider 配置如下: {self.provider_config}")
11551155

1156-
if "tool" in str(e).lower() and "support" in str(e).lower():
1157-
logger.error("疑似该模型不支持函数调用工具调用。请输入 /tool off_all")
1158-
11591156
if is_connection_error(e):
11601157
proxy = self.provider_config.get("proxy", "")
11611158
log_connection_failure("OpenAI", e, proxy)

0 commit comments

Comments
 (0)