Update app.py
Browse files
app.py
CHANGED
@@ -17,14 +17,14 @@ class BasicAgent:
|
|
17 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
18 |
# Always pass the full state expected by the graph
|
19 |
state = {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
}
|
27 |
-
result = self.graph.invoke(state)
|
28 |
return result.get("final_answer", "")
|
29 |
|
30 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
|
17 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
18 |
# Always pass the full state expected by the graph
|
19 |
state = {
|
20 |
+
"messages": [HumanMessage(content=question)],
|
21 |
+
"query": question,
|
22 |
+
"agent_type": "",
|
23 |
+
"final_answer": "",
|
24 |
+
"perf": {},
|
25 |
+
"agno_resp": ""}
|
26 |
+
config = {"configurable": {"thread_id": f"eval_{hash(question)}"}}
|
27 |
+
result = self.graph.invoke(state, config)
|
28 |
return result.get("final_answer", "")
|
29 |
|
30 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|