Skip to content

Learn how to use Pydantic with LLMs through practical Python notebooks. Covers basics, response validation, and tool calling. Perfect for developers exploring structured data validation in AI workflows.

Notifications You must be signed in to change notification settings

mdavala/pydantic_for_llms

Repository files navigation

110818415

Pydantic for LLMs 🚀

This repository contains Python notebooks demonstrating how to use Pydantic with Large Language Models (LLMs).
It covers everything from basics to advanced use cases like validating LLM responses and using Pydantic in tool calling.

📘 What’s Inside

  • Pydantic basics and data validation
  • Validating LLM responses with Pydantic
  • Using Pydantic for tool calling
  • Practical, hands-on Python notebooks

🛠️ Installation

Clone this repo: git clone https://github.com/your-username/pydantic-llms.git cd pydantic_for_llms pip install -r requirements.txt

▶️ Usage Open the Jupyter notebooks to explore:

jupyter notebook

📜 License Would you like me to also create a sample requirements.txt with the most common dependencies (like pydantic, jupyter, openai/litellm) to go along with this?

🙏 Courtesy

Some of the ideas and inspiration for these notebooks come from the excellent courses and materials by DeepLearning.AI. Huge thanks to their team for making AI education accessible!

About

Learn how to use Pydantic with LLMs through practical Python notebooks. Covers basics, response validation, and tool calling. Perfect for developers exploring structured data validation in AI workflows.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published