PydanticAi MultiModal
An example to use MultiModal capabilities with Pydantic-AI to process and analyze images
Install / Use
npx skills add rawheel/PydanticAi-MultiModalInstalls into whichever agent you are using.
README
🖼️ Pydantic-AI MultiModal Image Processor
A demonstration project showcasing how to use MultiModal capabilities with Pydantic-AI to process and analyze images using OpenAI's LLM. This project specifically focuses on resume analysis and information extraction from images, Feel free to customize it as per your needs.
✨ Features
- 🔄 Image processing using OpenAI's LLM
- 📊 Structured data extraction using Pydantic models
- 🎨 Support for multiple image formats
- 📄 Resume information extraction including:
- 🔗 LinkedIn profile
- 💻 GitHub profile
- 💼 Work experience
- 🎓 Education
- 🛠️ Skills
📋 Prerequisites
- 🐍 Python 3.8+
- 🔑 OpenAI API key
- 📦 Git
🚀 Installation
- Clone the repository:
git clone https://github.com/rawheel/Pydantic-ai-MultiModal-Example.git
cd Pydantic-ai-MultiModal-Example
- Set up virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Environment variables:
LLM_MODEL=gpt-4o-mini
OPENAI_API_KEY=your_openai_api_key_here
📝 Usage
Basic usage web URLs:
from app import ImageSummarizer
# Initialize summarizer
summarizer = ImageSummarizer()
# Example image URLs
image_urls = [
'https://example.com/path/to/image.jpg',
# Add more image URLs as needed
]
# Run analysis
summary = summarizer.summarize(image_urls, "summarize the resume")
print(summary)
Run the example script:
python app.py
📁 Project Structure
├── app.py # Main application file
├── config.py # Configuration settings
├── requirements.txt # Project dependencies
├── .env # Environment variables (create this)
└── README.md # Project documentation
⚙️ Configuration
The project uses environment variables for configuration. Available options:
LLM_MODEL: The OpenAI model to use (example: "gpt-4o-mini")OPENAI_API_KEY: Your OpenAI API key
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
👤 Author
Raheel Siddiqui
- 🌐 GitHub: @rawheel
- 💼 LinkedIn: Raheel Siddiqui
⭐️ If you find this project useful, please consider giving it a star!
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
