phase 17: add request-level URL logging to OllamaClient for proxy debugging
This commit is contained in:
@@ -222,11 +222,14 @@ class OllamaClient:
|
|||||||
"stream": False,
|
"stream": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
url = f"{self._config.base_url}/api/chat"
|
||||||
resp = await self._http.post(
|
logger.info(
|
||||||
f"{self._config.base_url}/api/chat",
|
"Ollama POST %s model=%s input_chars=%d",
|
||||||
json=payload,
|
url, self._config.model, len(prompts.get("user", "")),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
resp = await self._http.post(url, json=payload)
|
||||||
_ = resp.raise_for_status()
|
_ = resp.raise_for_status()
|
||||||
except httpx.TimeoutException:
|
except httpx.TimeoutException:
|
||||||
attempt.error = "timeout"
|
attempt.error = "timeout"
|
||||||
|
|||||||
Reference in New Issue
Block a user