Spaces:
Sleeping
Sleeping
Upload agent.py
Browse files- src/agent.py +1 -1
src/agent.py
CHANGED
|
@@ -90,7 +90,7 @@ class Agent:
|
|
| 90 |
}
|
| 91 |
)
|
| 92 |
content: str = final_state["messages"][-1].content
|
| 93 |
-
if content.
|
| 94 |
# If the reply starts with a code fence, remove it
|
| 95 |
content = content[7:-3]
|
| 96 |
reply = json.loads(content)
|
|
|
|
| 90 |
}
|
| 91 |
)
|
| 92 |
content: str = final_state["messages"][-1].content
|
| 93 |
+
if content.startswith("```json"):
|
| 94 |
# If the reply starts with a code fence, remove it
|
| 95 |
content = content[7:-3]
|
| 96 |
reply = json.loads(content)
|