Spaces:
Running
Running
Daniel Amendoeira
commited on
Update agent.py
Browse files
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 |
-
|
|
|
94 |
|
95 |
-
|
|
|
|
|
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):
|