Definitions:
- An Assistant: An AI assistant built with the Assistants API
- A Custom GPT: Custom versions of ChatGPT that you can create for a specific purpose at chat.openai.com/create
Function calling vs Actions
As per the Assistants API docs:
Functions: the API allows you to define custom function signatures, with similar behavior as our function calling feature.
Also, as per the “Actions in GPTs” docs:
In addition to using our built-in capabilities, you can also define custom actions by making one or more APIs available to the GPT. Like plugins, actions allow GPTs to integrate external data or interact with the real-world. […]
So, with Custom GPTs you can define an OpenAPI specification which allows you to connect a GPT to a custom API. Then, you can define Endpoints, and your Custom GPT will be able to make a request to those endpoints.
However, the Assistants API seems to not have that option. Am I missing something? Is it possible to define an “Action” for an Assistant to use it?
Disclaimer
You can create function that implements an API call. However, the real value in directly specifying “Actions” in Assistants becomes apparent for two primary reasons:
- Accessibility for Non-Coders: The ability to craft and set an OpenAPI specification, which then enables the Assistant to handle API calls directly, is a significant advantage. This feature is especially beneficial for individuals who may not have programming skills. It aligns perfectly with OpenAI’s vision of enabling the creation of Custom GPTs without requiring any coding expertise. By removing the barrier of needing to implement the API call through code, it opens up more possibilities for a broader range of users.
- Convenience for Coders: For those who are versed in coding, “Actions” provide a straightforward and efficient method to integrate external functionalities. By setting up a backend endpoint and crafting an OpenAPI specification, one can easily integrate this with their Assistant. This approach in Custom GPTs is not only handy but also saves significant time and effort. It eliminates the need to develop a custom Python function for initiating the API call and handling the response, streamlining the entire process.