debug(llm): показать HTTP-версию в ошибке
This commit is contained in:
+2
-1
@@ -63,7 +63,8 @@ def ask(prompt: str, model: str = None, max_tokens: int = 8000) -> dict:
|
|||||||
}
|
}
|
||||||
|
|
||||||
except httpx.HTTPStatusError as e:
|
except httpx.HTTPStatusError as e:
|
||||||
return {"error": f"LLM HTTP {e.response.status_code}: {e.response.text[:500]}"}
|
http_ver = e.response.http_version if hasattr(e.response, 'http_version') else '?'
|
||||||
|
return {"error": f"LLM HTTP {e.response.status_code} (HTTP/{http_ver}): {e.response.text[:500]}"}
|
||||||
except httpx.TimeoutException:
|
except httpx.TimeoutException:
|
||||||
return {"error": "LLM timeout"}
|
return {"error": "LLM timeout"}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user