Find answers from the community

Updated 2 months ago

Hi! Is there a way to use 'query_engine_

Hi! Is there a way to use 'query_engine_tools' and custom tools (e,g. 'add' , 'multiply') simultaneously for the openai agent? For example, how can I add my custom tools to the below code?

Plain Text
context_agent = ContextRetrieverOpenAIAgent.from_tools_and_retriever(
    query_engine_tools,
    context_index.as_retriever(similarity_top_k=1),
    verbose=True,
)

Thanks!
L
M
2 comments
Since tools is just a list, you can add any combination of tools

Plain Text
context_agent = ContextRetrieverOpenAIAgent.from_tools_and_retriever(
    [query_engine_tool_1, add_tool, multiply_tool],
    context_index.as_retriever(similarity_top_k=1),
    verbose=True,
)
Sounds good thanks!
Add a reply
Sign up and join the conversation on Discord