OpenAI AI Assistants API Function Calling
Jump to navigation
Jump to search
An OpenAI AI Assistants API Function Calling is a feature of the OpenAI AI Assistants API that allows developers to create structured function calls using OpenAI's models.
- Context:
- It can (typically) involve describing Functions (to OpenAI's models)
- It can (typically) enable receiving a JSON object (containing arguments to call those functions).
- It can (often) enable calling External APIs.
- It can (typically) be based on OpenAI LLMs trained to detect when a function should be called (and to respond with JSON adhering to the function signature).
- It can be a vital tool in building more interactive and capable AI assistants.
- It can require developers to have a good understanding of JSON and the specific API they are interacting with.
- It can be accessed through the OpenAI Python SDK or OpenAI Node.js SDKs.
- …
- Example(s):
- Counter-Example(s):
- …
- See: OpenAI AI Assistants API, JSON Object, External API Integration, Natural Language Processing.
References
2023
- (Bing chat, 2023)
- The Function calling tool enables developers to describe functions to OpenAI's model, and the model will output a JSON object containing arguments to call those functions. Function calling allows developers to get structured data back from the model. For example, developers can create assistants that answer questions by calling external APIs, convert natural language into API calls, or extract structured data from text ¹².
The latest models (gpt-3.5-turbo-1006 and gpt-4-1106-preview) have been trained to both detect when a function should be called (depending on the input) and to respond with JSON that adheres to the function signature more closely than previous models ¹.
To learn more about the Function calling tool, developers can visit the OpenAI website and refer to the Assistants Tools page ¹.
- Source: Conversation with Bing, 11/11/2023
- Function calling - OpenAI API. https://platform.openai.com/docs/guides/function-calling.
- Using the OpenAI Assistants API: A Step-by-Step Guide. https://robotdyn.com/using-the-openai-assistants-api-a-step-by-step-guide/.
- OpenAI Function Calling with External API Examples. https://www.pragnakalp.com/openai-function-calling-with-external-api-examples/.
- How to use OpenAI Function Calling feature on GPT-s API’s. https://www.rootstrap.com/blog/how-to-use-openai-function-calling-feature-on-gpt-api.
- The Function calling tool enables developers to describe functions to OpenAI's model, and the model will output a JSON object containing arguments to call those functions. Function calling allows developers to get structured data back from the model. For example, developers can create assistants that answer questions by calling external APIs, convert natural language into API calls, or extract structured data from text ¹².
)