Debian Codegraph @

llm.egg-info/PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: llm
3 Version: 0.30
4 Summary: CLI utility and Python library for interacting with Large Language Models from organizations like OpenAI, Anthropic and Gemini plus local models installed on your own machine.
5 Author: Simon Willison
6 License-Expression: Apache-2.0
7 Project-URL: Homepage, https://github.com/simonw/llm
8 Project-URL: Documentation, https://llm.datasette.io/
9 Project-URL: Issues, https://github.com/simonw/llm/issues
10 Project-URL: CI, https://github.com/simonw/llm/actions
11 Project-URL: Changelog, https://github.com/simonw/llm/releases
12 Classifier: Development Status :: 4 - Beta
13 Classifier: Intended Audience :: Developers
14 Classifier: Intended Audience :: End Users/Desktop
15 Classifier: Intended Audience :: Science/Research
16 Classifier: Programming Language :: Python :: 3
17 Classifier: Programming Language :: Python :: 3.10
18 Classifier: Programming Language :: Python :: 3.11
19 Classifier: Programming Language :: Python :: 3.12
20 Classifier: Programming Language :: Python :: 3.13
21 Classifier: Programming Language :: Python :: 3.14
22 Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23 Classifier: Topic :: Text Processing :: Linguistic
24 Classifier: Topic :: Utilities
25 Requires-Python: >=3.10
26 Description-Content-Type: text/markdown
27 License-File: LICENSE
28 Requires-Dist: click
29 Requires-Dist: condense-json>=0.1.3
30 Requires-Dist: openai>=1.55.3
31 Requires-Dist: click-default-group>=1.2.3
32 Requires-Dist: sqlite-utils>=3.37
33 Requires-Dist: sqlite-migrate>=0.1a2
34 Requires-Dist: pydantic>=2.0.0
35 Requires-Dist: PyYAML
36 Requires-Dist: pluggy
37 Requires-Dist: python-ulid
38 Requires-Dist: setuptools
39 Requires-Dist: pip
40 Requires-Dist: pyreadline3; sys_platform == "win32"
41 Requires-Dist: puremagic
42 Dynamic: license-file
43
44 <!-- [[[cog
45 # README.md is generated from docs/index.md using sphinx_markdown_builder
46 import tempfile
47 import subprocess
48 from pathlib import Path
49
50 readme_markdown = ''
51
52 with tempfile.TemporaryDirectory() as tmpdir:
53 tmp_path = Path(tmpdir)
54 # Run: sphinx-build -M markdown ./docs ./tmpdir
55 subprocess.run([
56 "sphinx-build",
57 "-M", "markdown",
58 "./docs",
59 str(tmp_path)
60 ], check=True)
61 index_file = tmp_path / "markdown" / "index.md"
62 readme_markdown = index_file.read_text(encoding="utf-8")
63
64 cog.out(readme_markdown)
65 ]]] -->
66 # LLM
67
68 [![GitHub repo](https://img.shields.io/badge/github-repo-green)](https://github.com/simonw/llm)
69 [![PyPI](https://img.shields.io/pypi/v/llm.svg)](https://pypi.org/project/llm/)
70 [![Changelog](https://img.shields.io/github/v/release/simonw/llm?include_prereleases&label=changelog)](https://llm.datasette.io/en/stable/changelog.html)
71 [![Tests](https://github.com/simonw/llm/workflows/Test/badge.svg)](https://github.com/simonw/llm/actions?query=workflow%3ATest)
72 [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm/blob/main/LICENSE)
73 [![Discord](https://img.shields.io/discord/823971286308356157?label=discord)](https://datasette.io/discord-llm)
74 [![Homebrew](https://img.shields.io/homebrew/installs/dy/llm?color=yellow&label=homebrew&logo=homebrew)](https://formulae.brew.sh/formula/llm)
75
76 A CLI tool and Python library for interacting with **OpenAI**, **Anthropic’s Claude**, **Google’s Gemini**, **Meta’s Llama** and dozens of other Large Language Models, both via remote APIs and with models that can be installed and run on your own machine.
77
78 Watch **[Language models on the command-line](https://www.youtube.com/watch?v=QUXQNi6jQ30)** on YouTube for a demo or [read the accompanying detailed notes](https://simonwillison.net/2024/Jun/17/cli-language-models/).
79
80 With LLM you can:
81
82 - [Run prompts from the command-line](https://llm.datasette.io/en/stable/usage.html#usage-executing-prompts)
83 - [Store prompts and responses in SQLite](https://llm.datasette.io/en/stable/logging.html#logging)
84 - [Generate and store embeddings](https://llm.datasette.io/en/stable/embeddings/index.html#embeddings)
85 - [Extract structured content from text and images](https://llm.datasette.io/en/stable/schemas.html#schemas)
86 - [Grant models the ability to execute tools](https://llm.datasette.io/en/stable/tools.html#tools)
87 - … and much, much more
88
89 ## Quick start
90
91 First, install LLM using `pip` or Homebrew or `pipx` or `uv`:
92
93 ```bash
94 pip install llm
95 ```
96
97 Or with Homebrew (see [warning note](https://llm.datasette.io/en/stable/setup.html#homebrew-warning)):
98
99 ```bash
100 brew install llm
101 ```
102
103 Or with [pipx](https://pypa.github.io/pipx/):
104
105 ```bash
106 pipx install llm
107 ```
108
109 Or with [uv](https://docs.astral.sh/uv/guides/tools/)
110
111 ```bash
112 uv tool install llm
113 ```
114
115 If you have an [OpenAI API key](https://platform.openai.com/api-keys) key you can run this:
116
117 ```bash
118 # Paste your OpenAI API key into this
119 llm keys set openai
120
121 # Run a prompt (with the default gpt-4o-mini model)
122 llm "Ten fun names for a pet pelican"
123
124 # Extract text from an image
125 llm "extract text" -a scanned-document.jpg
126
127 # Use a system prompt against a file
128 cat myfile.py | llm -s "Explain this code"
129 ```
130
131 Run prompts against [Gemini](https://aistudio.google.com/apikey) or [Anthropic](https://console.anthropic.com/) with their respective plugins:
132
133 ```bash
134 llm install llm-gemini
135 llm keys set gemini
136 # Paste Gemini API key here
137 llm -m gemini-2.0-flash 'Tell me fun facts about Mountain View'
138
139 llm install llm-anthropic
140 llm keys set anthropic
141 # Paste Anthropic API key here
142 llm -m claude-4-opus 'Impress me with wild facts about turnips'
143 ```
144
145 You can also [install a plugin](https://llm.datasette.io/en/stable/plugins/installing-plugins.html#installing-plugins) to access models that can run on your local device. If you use [Ollama](https://ollama.com/):
146
147 ```bash
148 # Install the plugin
149 llm install llm-ollama
150
151 # Download and run a prompt against the Orca Mini 7B model
152 ollama pull llama3.2:latest
153 llm -m llama3.2:latest 'What is the capital of France?'
154 ```
155
156 To start [an interactive chat](https://llm.datasette.io/en/stable/usage.html#usage-chat) with a model, use `llm chat`:
157
158 ```bash
159 llm chat -m gpt-4.1
160 ```
161
162 ```default
163 Chatting with gpt-4.1
164 Type 'exit' or 'quit' to exit
165 Type '!multi' to enter multiple lines, then '!end' to finish
166 Type '!edit' to open your default editor and modify the prompt.
167 Type '!fragment <my_fragment> [<another_fragment> ...]' to insert one or more fragments
168 > Tell me a joke about a pelican
169 Why don't pelicans like to tip waiters?
170
171 Because they always have a big bill!
172 ```
173
174 More background on this project:
175
176 - [llm, ttok and strip-tags—CLI tools for working with ChatGPT and other LLMs](https://simonwillison.net/2023/May/18/cli-tools-for-llms/)
177 - [The LLM CLI tool now supports self-hosted language models via plugins](https://simonwillison.net/2023/Jul/12/llm/)
178 - [LLM now provides tools for working with embeddings](https://simonwillison.net/2023/Sep/4/llm-embeddings/)
179 - [Build an image search engine with llm-clip, chat with models with llm chat](https://simonwillison.net/2023/Sep/12/llm-clip-and-chat/)
180 - [You can now run prompts against images, audio and video in your terminal using LLM](https://simonwillison.net/2024/Oct/29/llm-multi-modal/)
181 - [Structured data extraction from unstructured content using LLM schemas](https://simonwillison.net/2025/Feb/28/llm-schemas/)
182 - [Long context support in LLM 0.24 using fragments and template plugins](https://simonwillison.net/2025/Apr/7/long-context-llm/)
183
184 See also [the llm tag](https://simonwillison.net/tags/llm/) on my blog.
185
186 ## Contents
187
188 * [Setup](https://llm.datasette.io/en/stable/setup.html)
189 * [Installation](https://llm.datasette.io/en/stable/setup.html#installation)
190 * [Upgrading to the latest version](https://llm.datasette.io/en/stable/setup.html#upgrading-to-the-latest-version)
191 * [Using uvx](https://llm.datasette.io/en/stable/setup.html#using-uvx)
192 * [A note about Homebrew and PyTorch](https://llm.datasette.io/en/stable/setup.html#a-note-about-homebrew-and-pytorch)
193 * [Installing plugins](https://llm.datasette.io/en/stable/setup.html#installing-plugins)
194 * [API key management](https://llm.datasette.io/en/stable/setup.html#api-key-management)
195 * [Saving and using stored keys](https://llm.datasette.io/en/stable/setup.html#saving-and-using-stored-keys)
196 * [Passing keys using the –key option](https://llm.datasette.io/en/stable/setup.html#passing-keys-using-the-key-option)
197 * [Keys in environment variables](https://llm.datasette.io/en/stable/setup.html#keys-in-environment-variables)
198 * [Configuration](https://llm.datasette.io/en/stable/setup.html#configuration)
199 * [Setting a custom default model](https://llm.datasette.io/en/stable/setup.html#setting-a-custom-default-model)
200 * [Setting a custom directory location](https://llm.datasette.io/en/stable/setup.html#setting-a-custom-directory-location)
201 * [Turning SQLite logging on and off](https://llm.datasette.io/en/stable/setup.html#turning-sqlite-logging-on-and-off)
202 * [Usage](https://llm.datasette.io/en/stable/usage.html)
203 * [Executing a prompt](https://llm.datasette.io/en/stable/usage.html#executing-a-prompt)
204 * [Model options](https://llm.datasette.io/en/stable/usage.html#model-options)
205 * [Attachments](https://llm.datasette.io/en/stable/usage.html#attachments)
206 * [System prompts](https://llm.datasette.io/en/stable/usage.html#system-prompts)
207 * [Tools](https://llm.datasette.io/en/stable/usage.html#tools)
208 * [Extracting fenced code blocks](https://llm.datasette.io/en/stable/usage.html#extracting-fenced-code-blocks)
209 * [Schemas](https://llm.datasette.io/en/stable/usage.html#schemas)
210 * [Fragments](https://llm.datasette.io/en/stable/usage.html#fragments)
211 * [Continuing a conversation](https://llm.datasette.io/en/stable/usage.html#continuing-a-conversation)
212 * [Tips for using LLM with Bash or Zsh](https://llm.datasette.io/en/stable/usage.html#tips-for-using-llm-with-bash-or-zsh)
213 * [Completion prompts](https://llm.datasette.io/en/stable/usage.html#completion-prompts)
214 * [Starting an interactive chat](https://llm.datasette.io/en/stable/usage.html#starting-an-interactive-chat)
215 * [Listing available models](https://llm.datasette.io/en/stable/usage.html#listing-available-models)
216 * [Setting default options for models](https://llm.datasette.io/en/stable/usage.html#setting-default-options-for-models)
217 * [OpenAI models](https://llm.datasette.io/en/stable/openai-models.html)
218 * [Configuration](https://llm.datasette.io/en/stable/openai-models.html#configuration)
219 * [OpenAI language models](https://llm.datasette.io/en/stable/openai-models.html#openai-language-models)
220 * [Model features](https://llm.datasette.io/en/stable/openai-models.html#model-features)
221 * [OpenAI embedding models](https://llm.datasette.io/en/stable/openai-models.html#openai-embedding-models)
222 * [OpenAI completion models](https://llm.datasette.io/en/stable/openai-models.html#openai-completion-models)
223 * [Adding more OpenAI models](https://llm.datasette.io/en/stable/openai-models.html#adding-more-openai-models)
224 * [Other models](https://llm.datasette.io/en/stable/other-models.html)
225 * [Installing and using a local model](https://llm.datasette.io/en/stable/other-models.html#installing-and-using-a-local-model)
226 * [OpenAI-compatible models](https://llm.datasette.io/en/stable/other-models.html#openai-compatible-models)
227 * [Extra HTTP headers](https://llm.datasette.io/en/stable/other-models.html#extra-http-headers)
228 * [Tools](https://llm.datasette.io/en/stable/tools.html)
229 * [How tools work](https://llm.datasette.io/en/stable/tools.html#how-tools-work)
230 * [Trying out tools](https://llm.datasette.io/en/stable/tools.html#trying-out-tools)
231 * [LLM’s implementation of tools](https://llm.datasette.io/en/stable/tools.html#llm-s-implementation-of-tools)
232 * [Default tools](https://llm.datasette.io/en/stable/tools.html#default-tools)
233 * [Tips for implementing tools](https://llm.datasette.io/en/stable/tools.html#tips-for-implementing-tools)
234 * [Schemas](https://llm.datasette.io/en/stable/schemas.html)
235 * [Schemas tutorial](https://llm.datasette.io/en/stable/schemas.html#schemas-tutorial)
236 * [Getting started with dogs](https://llm.datasette.io/en/stable/schemas.html#getting-started-with-dogs)
237 * [Extracting people from a news articles](https://llm.datasette.io/en/stable/schemas.html#extracting-people-from-a-news-articles)
238 * [Using JSON schemas](https://llm.datasette.io/en/stable/schemas.html#using-json-schemas)
239 * [Ways to specify a schema](https://llm.datasette.io/en/stable/schemas.html#ways-to-specify-a-schema)
240 * [Concise LLM schema syntax](https://llm.datasette.io/en/stable/schemas.html#concise-llm-schema-syntax)
241 * [Saving reusable schemas in templates](https://llm.datasette.io/en/stable/schemas.html#saving-reusable-schemas-in-templates)
242 * [Browsing logged JSON objects created using schemas](https://llm.datasette.io/en/stable/schemas.html#browsing-logged-json-objects-created-using-schemas)
243 * [Templates](https://llm.datasette.io/en/stable/templates.html)
244 * [Getting started with <code>–save</code>](https://llm.datasette.io/en/stable/templates.html#getting-started-with-save)
245 * [Using a template](https://llm.datasette.io/en/stable/templates.html#using-a-template)
246 * [Listing available templates](https://llm.datasette.io/en/stable/templates.html#listing-available-templates)
247 * [Templates as YAML files](https://llm.datasette.io/en/stable/templates.html#templates-as-yaml-files)
248 * [System prompts](https://llm.datasette.io/en/stable/templates.html#system-prompts)
249 * [Fragments](https://llm.datasette.io/en/stable/templates.html#fragments)
250 * [Options](https://llm.datasette.io/en/stable/templates.html#options)
251 * [Tools](https://llm.datasette.io/en/stable/templates.html#tools)
252 * [Schemas](https://llm.datasette.io/en/stable/templates.html#schemas)
253 * [Additional template variables](https://llm.datasette.io/en/stable/templates.html#additional-template-variables)
254 * [Specifying default parameters](https://llm.datasette.io/en/stable/templates.html#specifying-default-parameters)
255 * [Configuring code extraction](https://llm.datasette.io/en/stable/templates.html#configuring-code-extraction)
256 * [Setting a default model for a template](https://llm.datasette.io/en/stable/templates.html#setting-a-default-model-for-a-template)
257 * [Template loaders from plugins](https://llm.datasette.io/en/stable/templates.html#template-loaders-from-plugins)
258 * [Fragments](https://llm.datasette.io/en/stable/fragments.html)
259 * [Using fragments in a prompt](https://llm.datasette.io/en/stable/fragments.html#using-fragments-in-a-prompt)
260 * [Using fragments in chat](https://llm.datasette.io/en/stable/fragments.html#using-fragments-in-chat)
261 * [Browsing fragments](https://llm.datasette.io/en/stable/fragments.html#browsing-fragments)
262 * [Setting aliases for fragments](https://llm.datasette.io/en/stable/fragments.html#setting-aliases-for-fragments)
263 * [Viewing fragments in your logs](https://llm.datasette.io/en/stable/fragments.html#viewing-fragments-in-your-logs)
264 * [Using fragments from plugins](https://llm.datasette.io/en/stable/fragments.html#using-fragments-from-plugins)
265 * [Listing available fragment prefixes](https://llm.datasette.io/en/stable/fragments.html#listing-available-fragment-prefixes)
266 * [Model aliases](https://llm.datasette.io/en/stable/aliases.html)
267 * [Listing aliases](https://llm.datasette.io/en/stable/aliases.html#listing-aliases)
268 * [Adding a new alias](https://llm.datasette.io/en/stable/aliases.html#adding-a-new-alias)
269 * [Removing an alias](https://llm.datasette.io/en/stable/aliases.html#removing-an-alias)
270 * [Viewing the aliases file](https://llm.datasette.io/en/stable/aliases.html#viewing-the-aliases-file)
271 * [Embeddings](https://llm.datasette.io/en/stable/embeddings/index.html)
272 * [Embedding with the CLI](https://llm.datasette.io/en/stable/embeddings/cli.html)
273 * [llm embed](https://llm.datasette.io/en/stable/embeddings/cli.html#llm-embed)
274 * [llm embed-multi](https://llm.datasette.io/en/stable/embeddings/cli.html#llm-embed-multi)
275 * [llm similar](https://llm.datasette.io/en/stable/embeddings/cli.html#llm-similar)
276 * [llm embed-models](https://llm.datasette.io/en/stable/embeddings/cli.html#llm-embed-models)
277 * [llm collections list](https://llm.datasette.io/en/stable/embeddings/cli.html#llm-collections-list)
278 * [llm collections delete](https://llm.datasette.io/en/stable/embeddings/cli.html#llm-collections-delete)
279 * [Using embeddings from Python](https://llm.datasette.io/en/stable/embeddings/python-api.html)
280 * [Working with collections](https://llm.datasette.io/en/stable/embeddings/python-api.html#working-with-collections)
281 * [Retrieving similar items](https://llm.datasette.io/en/stable/embeddings/python-api.html#retrieving-similar-items)
282 * [SQL schema](https://llm.datasette.io/en/stable/embeddings/python-api.html#sql-schema)
283 * [Writing plugins to add new embedding models](https://llm.datasette.io/en/stable/embeddings/writing-plugins.html)
284 * [`EmbeddingModel`](https://llm.datasette.io/en/stable/embeddings/writing-plugins.html#llm.EmbeddingModel)
285 * [Embedding binary content](https://llm.datasette.io/en/stable/embeddings/writing-plugins.html#embedding-binary-content)
286 * [Embedding storage format](https://llm.datasette.io/en/stable/embeddings/storage.html)
287 * [Plugins](https://llm.datasette.io/en/stable/plugins/index.html)
288 * [Installing plugins](https://llm.datasette.io/en/stable/plugins/installing-plugins.html)
289 * [Listing installed plugins](https://llm.datasette.io/en/stable/plugins/installing-plugins.html#listing-installed-plugins)
290 * [Running with a subset of plugins](https://llm.datasette.io/en/stable/plugins/installing-plugins.html#running-with-a-subset-of-plugins)
291 * [Plugin directory](https://llm.datasette.io/en/stable/plugins/directory.html)
292 * [Local models](https://llm.datasette.io/en/stable/plugins/directory.html#local-models)
293 * [Remote APIs](https://llm.datasette.io/en/stable/plugins/directory.html#remote-apis)
294 * [Tools](https://llm.datasette.io/en/stable/plugins/directory.html#tools)
295 * [Fragments and template loaders](https://llm.datasette.io/en/stable/plugins/directory.html#fragments-and-template-loaders)
296 * [Embedding models](https://llm.datasette.io/en/stable/plugins/directory.html#embedding-models)
297 * [Extra commands](https://llm.datasette.io/en/stable/plugins/directory.html#extra-commands)
298 * [Just for fun](https://llm.datasette.io/en/stable/plugins/directory.html#just-for-fun)
299 * [Plugin hooks](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html)
300 * [register_commands(cli)](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html#register-commands-cli)
301 * [register_models(register, model_aliases)](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html#register-models-register-model-aliases)
302 * [register_embedding_models(register)](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html#register-embedding-models-register)
303 * [register_tools(register)](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html#register-tools-register)
304 * [register_template_loaders(register)](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html#register-template-loaders-register)
305 * [register_fragment_loaders(register)](https://llm.datasette.io/en/stable/plugins/plugin-hooks.html#register-fragment-loaders-register)
306 * [Developing a model plugin](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html)
307 * [The initial structure of the plugin](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#the-initial-structure-of-the-plugin)
308 * [Installing your plugin to try it out](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#installing-your-plugin-to-try-it-out)
309 * [Building the Markov chain](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#building-the-markov-chain)
310 * [Executing the Markov chain](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#executing-the-markov-chain)
311 * [Adding that to the plugin](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#adding-that-to-the-plugin)
312 * [Understanding execute()](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#understanding-execute)
313 * [Prompts and responses are logged to the database](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#prompts-and-responses-are-logged-to-the-database)
314 * [Adding options](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#adding-options)
315 * [Distributing your plugin](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#distributing-your-plugin)
316 * [GitHub repositories](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#github-repositories)
317 * [Publishing plugins to PyPI](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#publishing-plugins-to-pypi)
318 * [Adding metadata](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#adding-metadata)
319 * [What to do if it breaks](https://llm.datasette.io/en/stable/plugins/tutorial-model-plugin.html#what-to-do-if-it-breaks)
320 * [Advanced model plugins](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html)
321 * [Tip: lazily load expensive dependencies](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#tip-lazily-load-expensive-dependencies)
322 * [Models that accept API keys](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#models-that-accept-api-keys)
323 * [Async models](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#async-models)
324 * [Supporting schemas](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#supporting-schemas)
325 * [Supporting tools](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#supporting-tools)
326 * [Attachments for multi-modal models](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#attachments-for-multi-modal-models)
327 * [Tracking token usage](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#tracking-token-usage)
328 * [Tracking resolved model names](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#tracking-resolved-model-names)
329 * [LLM_RAISE_ERRORS](https://llm.datasette.io/en/stable/plugins/advanced-model-plugins.html#llm-raise-errors)
330 * [Utility functions for plugins](https://llm.datasette.io/en/stable/plugins/plugin-utilities.html)
331 * [llm.get_key()](https://llm.datasette.io/en/stable/plugins/plugin-utilities.html#llm-get-key)
332 * [llm.user_dir()](https://llm.datasette.io/en/stable/plugins/plugin-utilities.html#llm-user-dir)
333 * [llm.ModelError](https://llm.datasette.io/en/stable/plugins/plugin-utilities.html#llm-modelerror)
334 * [Response.fake()](https://llm.datasette.io/en/stable/plugins/plugin-utilities.html#response-fake)
335 * [Python API](https://llm.datasette.io/en/stable/python-api.html)
336 * [Basic prompt execution](https://llm.datasette.io/en/stable/python-api.html#basic-prompt-execution)
337 * [System prompts](https://llm.datasette.io/en/stable/python-api.html#system-prompts)
338 * [Attachments](https://llm.datasette.io/en/stable/python-api.html#attachments)
339 * [Tools](https://llm.datasette.io/en/stable/python-api.html#tools)
340 * [Schemas](https://llm.datasette.io/en/stable/python-api.html#schemas)
341 * [Fragments](https://llm.datasette.io/en/stable/python-api.html#fragments)
342 * [Model options](https://llm.datasette.io/en/stable/python-api.html#model-options)
343 * [Passing an API key](https://llm.datasette.io/en/stable/python-api.html#passing-an-api-key)
344 * [Models from plugins](https://llm.datasette.io/en/stable/python-api.html#models-from-plugins)
345 * [Accessing the underlying JSON](https://llm.datasette.io/en/stable/python-api.html#accessing-the-underlying-json)
346 * [Token usage](https://llm.datasette.io/en/stable/python-api.html#token-usage)
347 * [Streaming responses](https://llm.datasette.io/en/stable/python-api.html#streaming-responses)
348 * [Async models](https://llm.datasette.io/en/stable/python-api.html#async-models)
349 * [`AsyncResponse`](https://llm.datasette.io/en/stable/python-api.html#llm.AsyncResponse)
350 * [Tool functions can be sync or async](https://llm.datasette.io/en/stable/python-api.html#tool-functions-can-be-sync-or-async)
351 * [Tool use for async models](https://llm.datasette.io/en/stable/python-api.html#tool-use-for-async-models)
352 * [Conversations](https://llm.datasette.io/en/stable/python-api.html#conversations)
353 * [Conversations using tools](https://llm.datasette.io/en/stable/python-api.html#conversations-using-tools)
354 * [Listing models](https://llm.datasette.io/en/stable/python-api.html#listing-models)
355 * [Running code when a response has completed](https://llm.datasette.io/en/stable/python-api.html#running-code-when-a-response-has-completed)
356 * [Other functions](https://llm.datasette.io/en/stable/python-api.html#other-functions)
357 * [set_alias(alias, model_id)](https://llm.datasette.io/en/stable/python-api.html#set-alias-alias-model-id)
358 * [remove_alias(alias)](https://llm.datasette.io/en/stable/python-api.html#remove-alias-alias)
359 * [set_default_model(alias)](https://llm.datasette.io/en/stable/python-api.html#set-default-model-alias)
360 * [get_default_model()](https://llm.datasette.io/en/stable/python-api.html#get-default-model)
361 * [set_default_embedding_model(alias) and get_default_embedding_model()](https://llm.datasette.io/en/stable/python-api.html#set-default-embedding-model-alias-and-get-default-embedding-model)
362 * [Logging to SQLite](https://llm.datasette.io/en/stable/logging.html)
363 * [Viewing the logs](https://llm.datasette.io/en/stable/logging.html#viewing-the-logs)
364 * [-s/–short mode](https://llm.datasette.io/en/stable/logging.html#s-short-mode)
365 * [Logs for a conversation](https://llm.datasette.io/en/stable/logging.html#logs-for-a-conversation)
366 * [Searching the logs](https://llm.datasette.io/en/stable/logging.html#searching-the-logs)
367 * [Filtering past a specific ID](https://llm.datasette.io/en/stable/logging.html#filtering-past-a-specific-id)
368 * [Filtering by model](https://llm.datasette.io/en/stable/logging.html#filtering-by-model)
369 * [Filtering by prompts that used specific fragments](https://llm.datasette.io/en/stable/logging.html#filtering-by-prompts-that-used-specific-fragments)
370 * [Filtering by prompts that used specific tools](https://llm.datasette.io/en/stable/logging.html#filtering-by-prompts-that-used-specific-tools)
371 * [Browsing data collected using schemas](https://llm.datasette.io/en/stable/logging.html#browsing-data-collected-using-schemas)
372 * [Browsing logs using Datasette](https://llm.datasette.io/en/stable/logging.html#browsing-logs-using-datasette)
373 * [Backing up your database](https://llm.datasette.io/en/stable/logging.html#backing-up-your-database)
374 * [SQL schema](https://llm.datasette.io/en/stable/logging.html#sql-schema)
375 * [Related tools](https://llm.datasette.io/en/stable/related-tools.html)
376 * [strip-tags](https://llm.datasette.io/en/stable/related-tools.html#strip-tags)
377 * [ttok](https://llm.datasette.io/en/stable/related-tools.html#ttok)
378 * [Symbex](https://llm.datasette.io/en/stable/related-tools.html#symbex)
379 * [CLI reference](https://llm.datasette.io/en/stable/help.html)
380 * [llm –help](https://llm.datasette.io/en/stable/help.html#llm-help)
381 * [llm prompt –help](https://llm.datasette.io/en/stable/help.html#llm-prompt-help)
382 * [llm chat –help](https://llm.datasette.io/en/stable/help.html#llm-chat-help)
383 * [llm keys –help](https://llm.datasette.io/en/stable/help.html#llm-keys-help)
384 * [llm logs –help](https://llm.datasette.io/en/stable/help.html#llm-logs-help)
385 * [llm models –help](https://llm.datasette.io/en/stable/help.html#llm-models-help)
386 * [llm templates –help](https://llm.datasette.io/en/stable/help.html#llm-templates-help)
387 * [llm schemas –help](https://llm.datasette.io/en/stable/help.html#llm-schemas-help)
388 * [llm tools –help](https://llm.datasette.io/en/stable/help.html#llm-tools-help)
389 * [llm aliases –help](https://llm.datasette.io/en/stable/help.html#llm-aliases-help)
390 * [llm fragments –help](https://llm.datasette.io/en/stable/help.html#llm-fragments-help)
391 * [llm plugins –help](https://llm.datasette.io/en/stable/help.html#llm-plugins-help)
392 * [llm install –help](https://llm.datasette.io/en/stable/help.html#llm-install-help)
393 * [llm uninstall –help](https://llm.datasette.io/en/stable/help.html#llm-uninstall-help)
394 * [llm embed –help](https://llm.datasette.io/en/stable/help.html#llm-embed-help)
395 * [llm embed-multi –help](https://llm.datasette.io/en/stable/help.html#llm-embed-multi-help)
396 * [llm similar –help](https://llm.datasette.io/en/stable/help.html#llm-similar-help)
397 * [llm embed-models –help](https://llm.datasette.io/en/stable/help.html#llm-embed-models-help)
398 * [llm collections –help](https://llm.datasette.io/en/stable/help.html#llm-collections-help)
399 * [llm openai –help](https://llm.datasette.io/en/stable/help.html#llm-openai-help)
400 * [Contributing](https://llm.datasette.io/en/stable/contributing.html)
401 * [Updating recorded HTTP API interactions and associated snapshots](https://llm.datasette.io/en/stable/contributing.html#updating-recorded-http-api-interactions-and-associated-snapshots)
402 * [Debugging tricks](https://llm.datasette.io/en/stable/contributing.html#debugging-tricks)
403 * [Documentation](https://llm.datasette.io/en/stable/contributing.html#documentation)
404 * [Release process](https://llm.datasette.io/en/stable/contributing.html#release-process)
405
406 * [Changelog](https://llm.datasette.io/en/stable/changelog.html)
407 <!-- [[[end]]] -->