josondev commited on
Commit
5a68159
·
verified ·
1 Parent(s): f0e66e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
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
- "messages": [HumanMessage(content=question)],
21
- "query": question,
22
- "agent_type": "",
23
- "final_answer": "",
24
- "perf": {},
25
- "agno_resp": ""
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):