Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,14 @@ class BasicAgent:
|
|
22 |
self.graph = agent_graph
|
23 |
def __call__(self, question: str) -> str:
|
24 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
25 |
-
# Create
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
# Run the graph
|
30 |
response = self.graph.invoke({"messages": messages})
|
31 |
|
|
|
22 |
self.graph = agent_graph
|
23 |
def __call__(self, question: str) -> str:
|
24 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
25 |
+
# Create initial state with system prompt
|
26 |
+
initial_state = {
|
27 |
+
"messages": [
|
28 |
+
SystemMessage(content=system_prompt),
|
29 |
+
HumanMessage(content=question)
|
30 |
+
]
|
31 |
+
}
|
32 |
+
|
33 |
# Run the graph
|
34 |
response = self.graph.invoke({"messages": messages})
|
35 |
|