fix: Better error logging + increase LLM timeout to 120s for RAG check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -194,11 +194,12 @@ async def _verify_control_with_llm(
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with httpx.AsyncClient(timeout=60.0) as client:
|
async with httpx.AsyncClient(timeout=120.0) as client:
|
||||||
resp = await client.post(f"{OLLAMA_URL}/api/generate", json={
|
resp = await client.post(f"{OLLAMA_URL}/api/generate", json={
|
||||||
"model": OLLAMA_MODEL,
|
"model": OLLAMA_MODEL,
|
||||||
"prompt": prompt,
|
"prompt": prompt,
|
||||||
"stream": False,
|
"stream": False,
|
||||||
|
"options": {"num_predict": 200}, # Limit response length
|
||||||
})
|
})
|
||||||
|
|
||||||
if resp.status_code != 200:
|
if resp.status_code != 200:
|
||||||
@@ -229,5 +230,5 @@ async def _verify_control_with_llm(
|
|||||||
}
|
}
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("LLM verification failed: %s", e)
|
logger.warning("LLM verification failed: %s %s", type(e).__name__, e)
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user