This directory contains tutorials on extending LLM capabilities through tool calling and function calling, enabling LLMs to interact with external APIs, databases, and services.
Each tutorial in this directory includes its own setup and installation instructions. Please refer to the individual tutorial files for specific requirements.
Common requirements:
- Python 3.10 - 3.13
- IBM watsonx.ai account
- Install dependencies (see Installation above)
- Navigate to this directory:
cd tutorials/06-tool-calling-and-function-calling - Open and run your first tutorial
Learn the fundamentals of function calling with LLMs.
- Topics: Function definitions, schemas, execution, error handling
- Time: 30-40 minutes
Explore LangChain's built-in tools and create custom tools.
- Topics: Tool creation, tool integration, custom tools, tool chains
- Time: 35-45 minutes
Use tools with locally-running Ollama models.
- Topics: Local LLM tool calling, Ollama integration, offline tools
- Prerequisites: Ollama installed and running locally
- Time: 30-40 minutes
Tool calling (also called function calling) allows LLMs to:
- Invoke external functions based on user requests
- Access real-time data from APIs and databases
- Perform actions like sending emails, creating files
- Extend capabilities beyond text generation
- Define Functions: Specify available functions with schemas
- User Query: User asks a question requiring external data
- LLM Decision: LLM decides which function(s) to call
- Function Execution: Your code executes the function
- Result Integration: LLM uses results to generate response
- Data Retrieval: Fetch information from databases or APIs
- Calculations: Perform complex computations
- Web Search: Search the internet for current information
- File Operations: Read, write, or manipulate files
- API Integration: Interact with external services
- Database Queries: Execute SQL or NoSQL queries
- Main Repository README
- IBM Watsonx Documentation
- LangChain Tools Documentation
- OpenAI Function Calling Guide
Found an issue or want to add a new tool calling tutorial? See our Contributing Guide.
See the LICENSE file in the repository root.