Function Calling
Function Calling is a capability within Large Language Models (LLMs) that allows the model to determine when and how to call external functions or APIs based on a user's natural language request. Instead of generating a direct answer, the LLM outputs a structured JSON object specifying the function name and the required arguments.
LLMs, in their base form, are knowledge engines, not action engines. Function Calling bridges this gap. It allows the abstract reasoning power of the LLM to be connected to the concrete, real-world capabilities of external systems, such as databases, weather services, or booking platforms. This transforms a conversational AI into an actionable agent.
get_weather function is appropriate.{"name": "get_weather", "arguments": {"location": "London"}}).