Consider giving this repo a ✨! Thanks!!!
Here's a link to the YouTube video explaining this setup in greater detail:
You need to have the following tools installed:
# To setup uv
uv sync
Note: You can use any OpenAI compatible backend or simply use OpenAI itself.
- Feel free to use any OpenAI compatible API.
- Make sure you have Ollama installed.
- Make sure you have pulled a model. I recommend Qwen 2.5 32B.
- Use this guide to setup inferix to host a OpenAI compatible API capable of function calling.
- Checkout the example dotenv file at
.env.example
. - Create a new
.env
using the example one as a template. - Replace the variables as necessary.
We've got a few scripts in this project:
uv run src/00_humble_call.py
- Making a simple LLM call using thepydantic-ai
sdk.uv run src/02_structured_responses.py
- Demonstration of how structured responses work.uv run src/03_tool_call.py
- Demonstration of how to use tools with pydantic ai.uv run src/04_the_real_deal.py
- A complete agentic workflow made using pydantic ai.