Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import inspect
|
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
from langgraph.graph import StateGraph, END
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
# (Keep Constants as is)
|
|
@@ -67,15 +68,13 @@ class SuperSmartAgent:
|
|
| 67 |
state["response"] = "This question doesn't require Python or is unclear."
|
| 68 |
return state
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
builder = StateGraph(state_schema)
|
| 79 |
|
| 80 |
# Nodes
|
| 81 |
builder.add_node("check_reversed", check_reversed)
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
|
| 7 |
from langgraph.graph import StateGraph, END
|
| 8 |
+
from typing import TypedDict
|
| 9 |
|
| 10 |
|
| 11 |
# (Keep Constants as is)
|
|
|
|
| 68 |
state["response"] = "This question doesn't require Python or is unclear."
|
| 69 |
return state
|
| 70 |
|
| 71 |
+
class AgentState(TypedDict):
|
| 72 |
+
question: str
|
| 73 |
+
is_reversed: bool
|
| 74 |
+
is_python: bool
|
| 75 |
+
response: str
|
| 76 |
+
|
| 77 |
+
builder = StateGraph(AgentState)
|
|
|
|
|
|
|
| 78 |
|
| 79 |
# Nodes
|
| 80 |
builder.add_node("check_reversed", check_reversed)
|