Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -256,8 +256,7 @@ def tool_node(state: AgentState) -> AgentState:
|
|
| 256 |
with open(file_path, "rb") as f:
|
| 257 |
encoded = base64.b64encode(f.read()).decode()
|
| 258 |
link = f"data:application/octet-stream;base64,{encoded}"
|
| 259 |
-
state["debug_trace"].append(f"[Download Link] Paste into browser to download:
|
| 260 |
-
{link}")
|
| 261 |
else:
|
| 262 |
result = selected_tool.invoke(query)
|
| 263 |
if "wikipedia.org" in query:
|
|
@@ -281,9 +280,6 @@ def tool_node(state: AgentState) -> AgentState:
|
|
| 281 |
state["replan"] = state["replan_count"] <= 2 and is_vague(state["observation"])
|
| 282 |
return state
|
| 283 |
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
def finalizer_node(state: AgentState) -> AgentState:
|
| 288 |
obs = state["observation"] or ""
|
| 289 |
trace = state["debug_trace"]
|
|
|
|
| 256 |
with open(file_path, "rb") as f:
|
| 257 |
encoded = base64.b64encode(f.read()).decode()
|
| 258 |
link = f"data:application/octet-stream;base64,{encoded}"
|
| 259 |
+
state["debug_trace"].append(f"[Download Link] Paste into browser to download:\\n{link}")
|
|
|
|
| 260 |
else:
|
| 261 |
result = selected_tool.invoke(query)
|
| 262 |
if "wikipedia.org" in query:
|
|
|
|
| 280 |
state["replan"] = state["replan_count"] <= 2 and is_vague(state["observation"])
|
| 281 |
return state
|
| 282 |
|
|
|
|
|
|
|
|
|
|
| 283 |
def finalizer_node(state: AgentState) -> AgentState:
|
| 284 |
obs = state["observation"] or ""
|
| 285 |
trace = state["debug_trace"]
|