Find answers from the community

Updated 11 months ago

Google Colaboratory

hey guys, I love this notebook example from Jerry

https://colab.research.google.com/drive/18aCO8CKoENkPfdq-kTr3D6j5m5zOwR_n?usp=sharing#scrollTo=33d92b77-5975-4d18-a1e8-15aa028a55f5

To easily import OpenAPI and RequestToolSpec. However, with the release of OpenAIAssistants, I wonder if anyone has been able to get this flow to work with assistants.

for me, when I pass the tools to the assistant object it doesn't recognize the function toolspec. Anyone else run into this issue?
v
k
8 comments
@rahul have you bumped into this by any chance?
Let me check the knowledge base for you. One moment! :books:
Sorry @victormimo, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:

Perhaps try again in 15mins?
@kapa.ai can you use these tools with the OpenAIAssistantAgent.from_existing?
from llama_hub.tools.openapi.base import OpenAPIToolSpec
from llama_hub.tools.requests.base import RequestsToolSpec
from llama_index.tools.tool_spec.load_and_search.base import LoadAndSearchToolSpec
Let me check the knowledge base for you. One moment! :books:
----------------------
Based on the information provided in the extracts, the OpenAIAgent.from_tools method is used to create an agent with a list of tools. However, there is no mention of a method called OpenAIAssistantAgent.from_existing.

Here is an example of how to use the OpenAIAgent.from_tools method:

Plain Text
from llama_index.agent import OpenAIAgent
from llama_hub.tools.gmail.base import GmailToolSpec

tool_spec = GmailToolSpec()
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list(), verbose=True)

In this example, a GmailToolSpec is created and converted to a tool list, which is then passed to the OpenAIAgent.from_tools method to create an agent.

If you want to use OpenAPIToolSpec, RequestsToolSpec, and LoadAndSearchToolSpec with an agent, you would need to create instances of these tool specifications, convert them to tool lists, and then pass them to the from_tools method. However, the exact code for doing this is not provided in the extracts.

For more detailed information, you may want to refer to the LlamaIndex documentation () or the LlamaIndex GitHub repository ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
@kapa.ai can you use these tools with the OpenAIAssistantAgent.from_existing?
from llama_hub.tools.openapi.base import OpenAPIToolSpec
from llama_hub.tools.requests.base import RequestsToolSpec
from llama_index.tools.tool_spec.load_and_search.base import LoadAndSearchToolSpec
Add a reply
Sign up and join the conversation on Discord