mralamdari commited on
Commit
d30652e
·
verified ·
1 Parent(s): 705ae28

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +10 -1
agent.py CHANGED
@@ -446,7 +446,16 @@ class EsiAgent:
446
  just the answer text (stripped of any prefix).
447
  """
448
  # Wrap in the same state shape your graph expects
449
- initial_state = {"messages": [HumanMessage(content=question)]}
 
 
 
 
 
 
 
 
 
450
  # Invoke the graph
451
  final_state = self.graph.invoke(initial_state)
452
  # Extract the last message
 
446
  just the answer text (stripped of any prefix).
447
  """
448
  # Wrap in the same state shape your graph expects
449
+ payload = {
450
+ "task_id": None,
451
+ "question": question,
452
+ "files": [], # no attachments
453
+ "level": 1 # default to Level 1
454
+ }
455
+ # 2) Wrap in your state object
456
+ initial_state = GaiaAgentState(raw_payload=payload)
457
+
458
+ # initial_state = {"messages": [HumanMessage(content=question)]}
459
  # Invoke the graph
460
  final_state = self.graph.invoke(initial_state)
461
  # Extract the last message