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
This commit is contained in:
lingyun14
2026-05-21 21:45:57 +08:00
committed by GitHub
parent d15606d202
commit 0711172fa7
4 changed files with 5 additions and 8 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ class Main(star.Star):
if not session_curr_cid:
logger.error(
"当前未处于对话状态,无法主动回复,请确保 平台设置->会话隔离(unique_session) 未开启,并使用 /switch 序号 切换或者 /new 创建一个会话。",
"当前未处于对话状态,无法主动回复,请确保 平台设置->会话隔离(unique_session) 未开启,并使用 /new 创建一个会话。",
)
return
+1 -1
View File
@@ -1068,7 +1068,7 @@ CONFIG_METADATA_2 = {
"id_whitelist": {
"type": "list",
"items": {"type": "string"},
"hint": "只处理填写的 ID 发来的消息事件,为空时不启用。可使用 /sid 指令获取在平台上的会话 ID(类似 abc:GroupMessage:123)。管理员可使用 /wl 添加白名单",
"hint": "只处理填写的 ID 发来的消息事件,为空时不启用。可使用 /sid 指令获取在平台上的会话 ID(类似 abc:GroupMessage:123)。管理员可在 WebUI 的平台设置中管理白名单",
},
"id_whitelist_log": {
"type": "bool",
@@ -368,7 +368,7 @@ class ResultDecorateStage(Stage):
return
if time.time() - render_start > 3:
logger.warning(
"文本转图片耗时超过了 3 秒,如果觉得很慢可以使用 /t2i 关闭文本转图片模式。",
"文本转图片耗时超过了 3 秒,如果觉得很慢可以在 WebUI 中关闭文本转图片模式。",
)
if url:
if url.startswith("http"):
@@ -1138,8 +1138,8 @@ class ProviderOpenAIOfficial(Provider):
or ("function" in str(e).lower() and "support" in str(e).lower())
):
# openai, ollama, gemini openai, siliconcloud 的错误提示与 code 不统一,只能通过字符串匹配
logger.info(
f"{self.get_model()} 不支持函数工具调用,已自动去除,不影响使用。",
logger.warning(
f"{self.get_model()} 不支持函数工具调用,已自动去除,不影响使用。如需永久关闭,可前往 WebUI 中关闭工具调用。",
)
payloads.pop("tools", None)
return (
@@ -1153,9 +1153,6 @@ class ProviderOpenAIOfficial(Provider):
)
# logger.error(f"发生了错误。Provider 配置如下: {self.provider_config}")
if "tool" in str(e).lower() and "support" in str(e).lower():
logger.error("疑似该模型不支持函数调用工具调用。请输入 /tool off_all")
if is_connection_error(e):
proxy = self.provider_config.get("proxy", "")
log_connection_failure("OpenAI", e, proxy)