mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-25 08:48:13 +02:00
Merge 6ae9ba5d9e into a81cccc68b
This commit is contained in:
commit
453f44ccec
2 changed files with 74 additions and 0 deletions
|
|
@ -206,6 +206,11 @@ async def run_per_node_qa_analysis(
|
|||
}
|
||||
try:
|
||||
parsed = parse_llm_json(raw_response)
|
||||
# parse_llm_json can return a list (e.g. when the model emits a
|
||||
# top-level JSON array); coerce non-dict results so the .get()
|
||||
# lookups below don't raise AttributeError.
|
||||
if not isinstance(parsed, dict):
|
||||
parsed = {}
|
||||
node_result["tags"] = parsed.get("tags", [])
|
||||
node_result["summary"] = parsed.get("summary", "")
|
||||
node_result["score"] = parsed.get("call_quality_score")
|
||||
|
|
@ -296,6 +301,11 @@ async def _run_whole_call_qa_analysis(
|
|||
}
|
||||
try:
|
||||
parsed = parse_llm_json(raw_response)
|
||||
# parse_llm_json can return a list (e.g. when the model emits a
|
||||
# top-level JSON array); coerce non-dict results so the .get()
|
||||
# lookups below don't raise AttributeError.
|
||||
if not isinstance(parsed, dict):
|
||||
parsed = {}
|
||||
node_result["tags"] = parsed.get("tags", [])
|
||||
node_result["summary"] = parsed.get("summary", "")
|
||||
node_result["score"] = parsed.get("call_quality_score")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue