🐛 fix: 修复无法识别到函数调用异常的问题

This commit is contained in:
Soulter
2025-04-04 01:02:39 +08:00
parent 58bfc677e2
commit b757c91d93
@@ -221,8 +221,8 @@ class ProviderOpenAIOfficial(Provider):
payloads["messages"] = new_contexts
elif (
"Function calling is not enabled" in str(e)
or ("tool" in str(e) and "support" in str(e).lower())
or ("function" in str(e) and "support" in str(e).lower())
or ("tool" in str(e).lower() and "support" in str(e).lower())
or ("function" in str(e).lower() and "support" in str(e).lower())
):
# openai, ollama, gemini openai, siliconcloud 的错误提示与 code 不统一,只能通过字符串匹配
logger.info(