David Chu
commited on
fix: history response handling for missing result field
Browse files- 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
|
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:
|