David Chu commited on
Commit
8dd0d65
·
unverified ·
1 Parent(s): f045eec

fix: history response handling for missing result field

Browse files
Files changed (1) hide show
  1. app/agent.py +1 -1
app/agent.py CHANGED
@@ -34,7 +34,7 @@ def hydrate_sources(
34
  and func.name in SOURCE_TOOL_NAMES
35
  and func.response
36
  ):
37
- for source in func.response["result"]:
38
  sources[source["url"]] = source
39
 
40
  for statement in statements.statements:
 
34
  and func.name in SOURCE_TOOL_NAMES
35
  and func.response
36
  ):
37
+ for source in func.response.get("result", []):
38
  sources[source["url"]] = source
39
 
40
  for statement in statements.statements: