#Azure AI – Functions calling compared to plugins


The introduction of function calling in GPT-4 and GPT-3.5 Turbo presents a new method for developers to interact with these models, notably diverging from the previously established plugin system. I haven’t experimented with them yet, nevetheless I tried to gather some preliminary information and use cases.

  1. Usage Scope:
    • Plugins: They are designed exclusively for the ChatGPT User Interface. Their primary use is to extend the functionality of the ChatGPT environment by integrating with external systems or providing additional features within the UI​1​.
    • Function Calling: This feature is intended for broader use cases, encompassing local or remote systems outside of ChatGPT. It’s not tied to a specific user interface and can be utilized in various applications, making it more flexible in terms of integration with other systems​1​.
  2. Implementation:
    • Plugins: They are implemented within the web app or phone app of ChatGPT, providing a direct way to extend the chat interface’s capabilities​2​.
    • Function Calling: This feature is implemented via the Chat Completions API, where developers can describe functions to GPT models, which then intelligently choose to output a JSON object containing arguments to call those functions. It’s a more programmatic approach that allows for the conversion of natural language into actionable function calls, aiding in the interaction with external APIs or tools​3​.
  3. Data Retrieval:
    • Function Calling: It enables a more reliable retrieval of structured data from the models. By defining functions and having the model call them based on user input, developers can obtain precise and structured responses, which can be further used to interact with external systems, databases, or APIs. This feature facilitates the creation of chatbots that can answer questions by calling external tools, convert natural language into API calls or database queries, and extract structured data from text​4​​3​.
  4. Example Applications:
    • Plugins: Primarily used for extending the ChatGPT user interface, enhancing the chat environment with additional functionalities.
    • Function Calling: Examples include creating chatbots that answer questions by calling external APIs, converting natural language queries into function calls like sending emails or fetching current weather data, and extracting structured data from text​3​.

At a high level you can break down working with functions into three steps:

  • Step #1 – Call the chat completions API with your functions and the user’s input
  • Step #2 – Use the model’s response to call your API or function
  • Step #3 – Call the chat completions API again, including the response from your function to get a final response

More info here.

In summary, while both plugins and function calling provide avenues to extend the capabilities of GPT models, their use cases, implementation approaches, and the scope of applications significantly differ. Function calling, with its API-centric approach, offers a more flexible and broader scope of integration with external systems and data retrieval, whereas plugins are more focused on enhancing the ChatGPT user interface.

, , ,

  1. Leave a comment

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.