Skip to content

0.23a0

Pre-release
Pre-release
Compare
Choose a tag to compare
@simonw simonw released this 27 Feb 01:09
· 38 commits to main since this release

Alpha release adding support for schemas, for getting supported models to output JSON that matches a specified JSON schema. #776

  • llm prompt --schema '{JSON schema goes here} option for specifying a schema that should be used for the output from the model, see schemas in the CLI docs.
  • model.prompt(..., schema={...}) parameter for specifying a schema from Python. This accepts either a dictionary JSON schema definition of a Pydantic BaseModel subclass, see schemas in the Python API docs.
  • The default OpenAI plugin now supports schemas across all models.
  • Documentation on how to add schema support to a model plugin.
  • LLM now depends on Pydantic v2 or higher. Pydantic v1 is no longer supported. #520