Spaces:
Sleeping
Sleeping
Upload duckdb_react_agent.py
Browse files- duckdb_react_agent.py +7 -7
duckdb_react_agent.py
CHANGED
|
@@ -306,12 +306,12 @@ def node_decide_viz(state: AgentState, llm: ChatOpenAI) -> AgentState:
|
|
| 306 |
resp = llm.invoke(msgs) # type: ignore
|
| 307 |
|
| 308 |
spec = {"make_plot": False}
|
| 309 |
-
try:
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
except Exception:
|
| 314 |
-
|
| 315 |
|
| 316 |
return {**state, "_viz_spec": spec}
|
| 317 |
|
|
@@ -625,4 +625,4 @@ def main():
|
|
| 625 |
|
| 626 |
|
| 627 |
if __name__ == "__main__":
|
| 628 |
-
main()
|
|
|
|
| 306 |
resp = llm.invoke(msgs) # type: ignore
|
| 307 |
|
| 308 |
spec = {"make_plot": False}
|
| 309 |
+
# try:
|
| 310 |
+
# spec = json.loads(resp.content) # type: ignore
|
| 311 |
+
# if not isinstance(spec, dict) or "make_plot" not in spec:
|
| 312 |
+
# spec = {"make_plot": False}
|
| 313 |
+
# except Exception:
|
| 314 |
+
# spec = {"make_plot": False}
|
| 315 |
|
| 316 |
return {**state, "_viz_spec": spec}
|
| 317 |
|
|
|
|
| 625 |
|
| 626 |
|
| 627 |
if __name__ == "__main__":
|
| 628 |
+
main()
|