mralamdari commited on
Commit
f2048cf
·
verified ·
1 Parent(s): 6b4c54f

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +15 -1
agent.py CHANGED
@@ -453,22 +453,36 @@ class EsiAgent:
453
  level: GAIA difficulty (1,2,3)
454
  """
455
  # 1) Build the raw_payload
 
456
  payload = {
457
  "task_id": None,
458
  "question": question,
459
  "files": files or [],
460
  "level": level
461
  }
 
462
 
463
  # 2) Wrap in your custom state class
464
  state = GaiaAgentState(raw_payload=payload)
465
-
466
  # 3) Invoke the graph end-to-end
467
  final_state = self.graph.invoke(state)
468
 
469
  # 4) Pull out the final answer
470
  return final_state.final_answer
471
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  # def run(self, question: str) -> str:
473
  # """
474
  # Runs the agent end‑to‑end on a single question string and returns
 
453
  level: GAIA difficulty (1,2,3)
454
  """
455
  # 1) Build the raw_payload
456
+ print(11111111111, question)
457
  payload = {
458
  "task_id": None,
459
  "question": question,
460
  "files": files or [],
461
  "level": level
462
  }
463
+ print(2222222222, payload)
464
 
465
  # 2) Wrap in your custom state class
466
  state = GaiaAgentState(raw_payload=payload)
467
+ print(33333333333, state)
468
  # 3) Invoke the graph end-to-end
469
  final_state = self.graph.invoke(state)
470
 
471
  # 4) Pull out the final answer
472
  return final_state.final_answer
473
 
474
+
475
+ # final_state = graph.invoke({
476
+ # "task_id": None,
477
+ # "question": question,
478
+ # "files": [],
479
+ # "level": 1,
480
+ # "plan": [],
481
+ # "tool_results": [],
482
+ # # plus any other initial keys your nodes expect
483
+ # })
484
+
485
+
486
  # def run(self, question: str) -> str:
487
  # """
488
  # Runs the agent end‑to‑end on a single question string and returns