Find answers from the community

Updated last year

Is there a way to load multiple tools

At a glance

The community member is asking how to load multiple tools, such as a Gmail tool and a query engine, into an agent at once. The comments provide the answer, which is to use the OpenAIAgent.from_tools() method and pass in a list of the tools. Additionally, the community members discuss how to also set a system prompt for the agent.

Is there a way to load multiple tools into an agent at once? I'm trying to pass in a gmail tool and a query engine at the same time but unsure how to do so
L
L
6 comments
OpenAIAgent.from_tools([gmail_tool, query_engine_tool], ...)
Ahhhh, thanks! Is there also a way to give that agent a system prompt?
I assume service context is fine?
OpenAIAgent.from_tools([gmail_tool, query_engine_tool], system_prompt="...", ...)
yea no service context -- your IDE should hopefully be showing all the kwargs there πŸ™‚
I see, thank you Logan!
Add a reply
Sign up and join the conversation on Discord