Design Better AI Agents With Function Calling

preview_player
Показать описание

If you're launching an AI startup or working on a side project, stop wasting time on endless tutorials and start focusing on what really matters. Inside AI Dev Skool, you'll:
✅ Get expert guidance on the best AI frameworks
✅ Cut through the hype and go straight to what works
✅ Maximize your time with curated resources and real-world insights
✅ Build strong connections with like-minded developers and founders

Our best members actively engage, share, and build—gaining skills while turning ideas into real businesses. If you're serious about AI development and want a shortcut to success, this is the place for you.

Masterclass: Using PydanticAI for Creating Multi-Agent Flows

🔗 Links & resources:

Key Concepts:
🏆 Tools: Tools are crucial in PydanticAI. They provide models with additional information to enhance their responses. This is particularly beneficial when it's impractical to include all the necessary context in the system prompt or when you need to make agent behavior more deterministic.
🏆 "Prepare" Parameter: This unique parameter gives developers fine-grained control over when and if a specific tool is used in an agent flow. This level of control enhances the flexibility and reliability.
🏆 Testing with Function Model: PydanticAI allows you to use a "function model" instead of a full language model (LLM) for testing purposes. This enables you to verify the functionality of your tools and ensure they are called with the correct parameters.

The tutorial presents six practical examples that progressively increase in complexity:
🚀 Hello World: This introductory example demonstrates the basic structure of a PydanticAI agent and function calling tools.
🚀 Plain Tools Agent: Introduces the concept of "plain tools" and how to define and use multiple tools within an agent without relying on context.
🚀 Tools with Context: Explores how to pass context among agents, tools, and other components, allowing tools to access and utilize relevant information from the workflow.
🚀 Passing Tools as Keywords: Demonstrates how to pass tools to agents using the "tools" keyword, offering flexibility in tool registration and usage.
🚀 Using the "Prepare" Parameter: Highlights the power of the "prepare" parameter, allowing developers to define conditions for when a tool should be executed.
🚀 Tools in Testing: Utilizes the "function model" and the Griff library to test the functionality of tools and ensure they are called correctly during development.

Masterclass Series:
▶️ Part 13: Multi-Model Agents in PydanticAI: Unlocking Next-Gen AI Capabilities
▶️ Part 14: Mastering RAG in PydanticAI: Better AI Agents with Real-Time Data
▶️ Part 15: Masterclass Final Project: AI Resume Writing with Multiple Agents

Timecodes:
00:00 - Welcome to System Prompts with PydanticAI
00:05 - Introduction to PydanticAI Masterclass
00:29 - Function Tools in PydanticAI
00:48 - How to register tools
01:12 - Why use function tools?
02:05 - Coding tutorial
02:36 - Hello, World! Rolling a Die Example
03:49 - Plain tools agent
05:20 - Tools with context
07:00 - Tools with kwargs
09:38 - Using prepare parameter
13:34 - Using griffe for testing
15:30 - Summary

#ai #openai #pydantic #ollama #pydanticai #mistral #llm #developer #software #tutorial #genai #llama #local #private #chatgpt #tools #function #calling
Рекомендации по теме
Комментарии
Автор

Excellent! Thanks for making this public - worthy of sending a coffee if you have a link set up...

iwswordpress
Автор

Keep up the good work. I've been enjoying this series!

jdmcivicrrr
Автор

I am unable to understand runcontext functionality in kwargs. What it has to do with source code and quality metrics? I did not find its functions 😢. 16:09

KnowledgeUnlocked_
Автор

Besid beeing fascinated of this tools, i really cannot understand what is the scope 😢

ItalianTigeri
Автор

Can you please share videos on daily basis? They are quite helpful.

KnowledgeUnlocked_
Автор

I hear alot about this and also Phidata. What are your thoughts on the alternative?

xevenau
Автор

Are ollama models working with pydanticai tools?

togai-dev
visit shbcf.ru