fix: LLM таймаут + debug-лог для диагностики
This commit is contained in:
@@ -83,5 +83,9 @@ async def analyze_finding(finding_data: dict) -> dict | None:
|
|||||||
content = body["choices"][0]["message"]["content"]
|
content = body["choices"][0]["message"]["content"]
|
||||||
return json.loads(content)
|
return json.loads(content)
|
||||||
except (KeyError, IndexError, json.JSONDecodeError) as e:
|
except (KeyError, IndexError, json.JSONDecodeError) as e:
|
||||||
log.warning("LLM response parse error for rule=%s: %s", finding_data.get("rule"), e)
|
log.warning(
|
||||||
|
"LLM response parse error for rule=%s: %s",
|
||||||
|
finding_data.get("rule"),
|
||||||
|
e,
|
||||||
|
)
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user