mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-15 20:51:07 +08:00
fix llm test message
This commit is contained in:
@@ -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 路径"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user