lwant commited on
Commit
c4d1642
Β·
1 Parent(s): da0471f

Refactor `gaia_solving_agent` to use `FunctionAgent` with updated tools, LLM integration, and refined functionality.

Browse files
Files changed (1) hide show
  1. src/gaia_solving_agent/agent.py +23 -9
src/gaia_solving_agent/agent.py CHANGED
@@ -128,12 +128,26 @@ You are a helpful assistant that searches Wikipedia and visit Wikipedia pages.
128
  )
129
 
130
 
131
- gaia_solving_agent = AgentWorkflow(
132
- agents = [tavily_search_engine, visit_website, wikipedia_agent],
133
- initial_state = dict(),
134
- root_agent = tavily_search_engine.name,
135
- handoff_prompt = None,
136
- handoff_output_prompt = None,
137
- state_prompt = None,
138
- num_concurrent_runs=1,
139
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  )
129
 
130
 
131
+ # gaia_solving_agent = AgentWorkflow(
132
+ # agents = [tavily_search_engine, visit_web_page_agent, wikipedia_agent],
133
+ # initial_state = dict(),
134
+ # root_agent = tavily_search_engine.name,
135
+ # handoff_prompt = None,
136
+ # handoff_output_prompt = None,
137
+ # state_prompt = None,
138
+ # num_concurrent_runs=1,
139
+ # )
140
+
141
+ gaia_solving_agent = FunctionAgent(
142
+ tools = [
143
+ tavily_search_web,
144
+ *load_and_search_tools_from_toolspec(WikipediaToolSpec()),
145
+ *simple_web_page_reader_toolspec.to_tool_list(),
146
+ *RequestsToolSpec().to_tool_list(),
147
+ ],
148
+ llm=get_llm(),
149
+ system_prompt="""
150
+ You are a helpful assistant that uses tools to browse additional information and resources on the web to answer questions.
151
+ """,
152
+ name="gaia_solving_agent",
153
+ description="Agent that browse additional information and resources on the web.")