Daniel Amendoeira commited on
Commit
a38ba97
·
verified ·
1 Parent(s): 9815922

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +5 -2
agent.py CHANGED
@@ -90,9 +90,12 @@ builder.add_conditional_edges(
90
  {"Action": "environment", # name returned by should_continue : Name of the next node
91
  END: END}
92
  )
93
- builder.add_edge("environment", "llm_call")
 
94
 
95
- gaia_agent = builder.compile()
 
 
96
 
97
  # Call the Agent
98
  def run_gaia(question: str):
 
90
  {"Action": "environment", # name returned by should_continue : Name of the next node
91
  END: END}
92
  )
93
+ # If tool calls -> "Action" -> environment (executes the tool)
94
+ # If no tool calls -> END
95
 
96
+ builder.add_edge("environment", "llm_call") # after running the tools go back to the LLM for another round of reasoning
97
+
98
+ gaia_agent = builder.compile() # converts my builder into a runnable agent by using gaia_agent.invoke()
99
 
100
  # Call the Agent
101
  def run_gaia(question: str):