MCPcopy Index your code
hub / github.com/edmar/whenx / create_react_agent

Function create_react_agent

whenx/services/create_react_agent.py:10–14  ·  view source on GitHub ↗
(agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION)

Source from the content-addressed store, hash-verified

8
9
10def create_react_agent(agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION):
11 llm = ChatOpenAI(model='gpt-4', temperature=0)
12 tools = load_tools(["serpapi"], llm=llm)
13 agent = initialize_agent(tools, llm, agent=agent_type)
14 return agent

Callers 2

create_reportFunction · 0.90
runMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected