github simonw/llm 0.23a0

latest releases: 0.28, 0.27.1, 0.27...
pre-release9 months ago

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

Don't miss a new llm release

NewReleases is sending notifications on new releases.