fix llm test message

This commit is contained in:
jxxghp
2026-06-13 23:20:15 +08:00
committed by GitHub
parent 6e8bce3d04
commit d6db0a86f6

View File

@@ -53,7 +53,7 @@ def _sanitize_llm_test_error(message: str, api_key: Optional[str] = None) -> str
清理错误信息中的敏感字段,避免回显密钥。
"""
if not message:
return "LLM 调用失败"
return "LLM 没有返回任何内容"
sanitized = message
if api_key:
@@ -72,7 +72,7 @@ def _sanitize_llm_test_error(message: str, api_key: Optional[str] = None) -> str
normalized_message = sanitized.lower().replace("_", "").replace(" ", "")
if "str" in normalized_message and "modeldump" in normalized_message:
return (
"LLM 调用失败:服务返回内容不是兼容的模型响应,"
"服务返回内容不是兼容的模型响应,"
"请检查基础地址是否填写为 API Base URL不要填写网页地址或完整的 "
"chat/completions 路径"
)