Function Calling with LLMs: A (Very) Basic Python Example

Learn how to empower your local LLM with dynamic function calling using only a system prompt and a few lines of Python. This guide walks through a practical example with Microsoft’s Phi-4, showing how to trigger real-time web searches via DuckDuckGo—no orchestration framework required.