Pydantic校验
原名:instructor
Structured LLM outputs validated with Pydantic.
- 分类
- 开发提效
- 版本
- v1.0.0
- 作者
- 弈韬(@ra1nzzz)
- 下载
- 2
- 收藏
- 0
- 发布
- 2026-08-25
- 更新
- 2026-09-30
- TRACE 评分
- 4.2 / 5
内容概览
Use Instructor when you need to: - Extract structured data from LLM responses reliably - Validate outputs against Pydantic schemas automatically - Retry failed extractions with automatic error handling - Parse complex JSON with type safety and validation - Stream partial results for real-time processing - Support multiple LLM providers with consistent API GitHub Stars : 15,000+ Battle-tested : 100,000+ developers Response models define the structure and validation rules for LLM outputs. Benefits: - Type safety with Python type hints - Automatic validation (word count 0) - Self-documenting with Field descriptions - IDE autocomplete support Pydantic validates LLM outputs automatically. If validation fails, Instructor retries. Instructor retries automatically when validation fails, providing error feedback to the LLM. How it works: 1. LLM generates output 2. Pydantic validates 3. If invalid…