You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A comprehensive collection of examples demonstrating structured data extraction and JSON output generation using various language models and frameworks. This repository showcases different approaches to ensure LLMs return well-formatted, schema-compliant responses.
🚀 Features
Multiple Framework Support: Examples for LangChain, vLLM, Outlines, Ollama,OpenAI and more
Pydantic Integration: Type-safe structured outputs with validation
Batch Processing: Efficient handling of multiple prompts
Vision Model Support: Structured outputs from multimodal models
Flexible Backends: Support for local models, API services, and GGUF formats
frompydanticimportBaseModelfromtypingimportOptionalclassPersonInfo(BaseModel):
name: strage: Optional[int] =None# Use any of the provided scripts with this schema