function-calling
OpenAI Function Calling (also called tool calling) is a mechanism that lets large language models connect to external data and systems. In an API request, the application declares the available tools (functions defined with JSON Schema, plus custom tools with free-text input and output); when needed, the model returns tool calls with arguments, the application executes the code and sends the results back to the model, which then generates the final answer. It is suited to scenarios that require external data or actions, such as checking the weather, reading account information, or issuing a refund.