Outlines
Helps developers generate structured language-model responses that follow specified schemas and data types.
Description
Outlines is an open-source Python library for constrained text generation with language models. Developers specify the expected output type or structure instead of accepting unconstrained free-form text. It supports Python types, Pydantic models, JSON Schema, regular expressions, and other generation constraints depending on the backend. Integrations cover local model runtimes and external APIs. For example, an extraction service can provide a customer message and obtain a typed object with predetermined fields for downstream processing. The library is installed with pip and licensed under Apache-2.0. Model and provider support for individual constraints varies, and external model API charges are separate. The .txt hosted API is a different offering, not included with the free library.