Releases: simonw/llm
Releases Β· simonw/llm
0.24a1
0.24a0
0.23
Support for schemas, for getting supported models to output JSON that matches a specified JSON schema. See also Structured data extraction from unstructured content using LLM schemas for background on this feature. #776
- New
llm prompt --schema '{JSON schema goes here}option for specifying a schema that should be used for the output from the model. The schemas documentation has more details and a tutorial. - Schemas can also be defined using a concise schema specification, for example
llm prompt --schema 'name, bio, age int'. #790 - Schemas can also be specified by passing a filename and through several other methods. #780
- New llm schemas family of commands:
llm schemas list,llm schemas show, andllm schemas dslfor debugging the new concise schema language. #781 - Schemas can now be saved to templates using
llm --schema X --save template-nameor through modifying the template YAML. #778 - The llm logs command now has new options for extracting data collected using schemas:
--data,--data-key,--data-array,--data-ids. #782 - New
llm logs --id-gt Xand--id-gte Xoptions. #801 - New
llm models --schemasoption for listing models that support schemas. #797 model.prompt(..., schema={...})parameter for specifying a schema from Python. This accepts either a dictionary JSON schema definition or a PydanticBaseModelsubclass, see schemas in the Python API docs.- The default OpenAI plugin now enables schemas across all supported models. Run
llm models --schemasfor a list of these. - The llm-anthropic and llm-gemini plugins have been upgraded to add schema support for those models. Here's documentation on how to add schema support to a model plugin.
Other smaller changes:
- GPT-4.5 preview is now a supported model:
llm -m gpt-4.5 'a joke about a pelican and a wolf'#795 - The prompt string is now optional when calling
model.prompt()from the Python API, somodel.prompt(attachments=llm.Attachment(url=url)))now works. #784 extra-openai-models.yamlnow supports areasoning: trueoption. Thanks, Kasper Primdal Lauritzen. #766- LLM now depends on Pydantic v2 or higher. Pydantic v1 is no longer supported. #520
0.23a0
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 PydanticBaseModelsubclass, 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
0.22
See also LLM 0.22, the annotated release notes.
- Plugins that provide models that use API keys can now subclass the new
llm.KeyModelandllm.AsyncKeyModelclasses. This results in the API key being passed as a newkeyparameter to their.execute()methods, and means that Python users can pass a key as themodel.prompt(..., key=)- see Passing an API key. Plugin developers should consult the new documentation on writing Models that accept API keys. #744 - New OpenAI model:
chatgpt-4o-latest. This model ID accesses the current model being used to power ChatGPT, which can change without warning. #752 - New
llm logs -s/--shortflag, which returns a greatly shortened version of the matching log entries in YAML format with a truncated prompt and without including the response. #737 - Both
llm modelsandllm embed-modelsnow take multiple-qsearch fragments. You can now search for all models matching "gemini" and "exp" usingllm models -q gemini -q exp. #748 - New
llm embed-multi --prepend Xoption for prepending a string to each value before it is embedded - useful for models such as nomic-embed-text-v2-moe that require passages to start with a string like"search_document: ". #745 - The
response.json()andresponse.usage()methods are now documented. - Fixed a bug where conversations that were loaded from the database could not be continued using
asyncioprompts. #742 - New plugin for macOS users: llm-mlx, which provides extremely high performance access to a wide range of local models using Apple's MLX framework.
- The
llm-claude-3plugin has been renamed to llm-anthropic.
0.21
- New model:
o3-mini. #728 - The
o3-miniando1models now support areasoning_effortoption which can be set tolow,mediumorhigh. llm promptandllm logsnow have a--xl/--extract-lastoption for extracting the last fenced code block in the response - a complement to the existing--x/--extractoption. #717
0.20
- New model,
o1. This model does not yet support streaming. #676 o1-previewando1-minimodels now support streaming.- New models,
gpt-4o-audio-previewandgpt-4o-mini-audio-preview. #677 llm prompt -x/--extractoption, which returns just the content of the first fenced code block in the response. Tryllm prompt -x 'Python function to reverse a string'. #681- Creating a template using
llm ... --save xnow supports the-x/--extractoption, which is saved to the template. YAML templates can set this option usingextract: true. - New
llm logs -x/--extractoption extracts the first fenced code block from matching logged responses.
- Creating a template using
- New
llm models -q 'search'option returning models that case-insensitively match the search query. #700 - Installation documentation now also includes
uv. Thanks, Ariel Marcus. #690 and #702 llm modelscommand now shows the current default model at the bottom of the listing. Thanks, Amjith Ramanujam. #688- Plugin directory now includes
llm-venice,llm-bedrock,llm-deepseekandllm-cmd-comp. - Fixed bug where some dependency version combinations could cause a
Client.__init__() got an unexpected keyword argument 'proxies'error. #709 - OpenAI embedding models are now available using their full names of
text-embedding-ada-002,text-embedding-3-smallandtext-embedding-3-large- the previous names are still supported as aliases. Thanks, web-sst. #654
0.19.1
0.19
- Tokens used by a response are now logged to new
input_tokensandoutput_tokensinteger columns and atoken_detailsJSON string column, for the default OpenAI models and models from other plugins that implement this feature. #610 llm promptnow takes a-u/--usageflag to display token usage at the end of the response.llm logs -u/--usageshows token usage information for logged responses.llm prompt ... --asyncresponses are now logged to the database. #641llm.get_models()andllm.get_async_models()functions, documented here. #640response.usage()and async responseawait response.usage()methods, returning aUsage(input=2, output=1, details=None)dataclass. #644response.on_done(callback)andawait response.on_done(callback)methods for specifying a callback to be executed when a response has completed, documented here. #653- Fix for bug running
llm chaton Windows 11. Thanks, Sukhbinder Singh. #495