Access large language models from the command-line
Find a file
2023-07-10 21:45:07 -07:00
.github/workflows Show cog on usage.md to help debug #82 2023-07-10 14:00:21 -07:00
docs Fix a warning about _static in docs builds 2023-07-10 21:45:07 -07:00
llm Example for logit_bias, closes #36 2023-07-10 15:43:44 -07:00
tests Renamed template.execute() to template.evaluate() and added type hints 2023-07-10 08:27:28 -07:00
.gitignore Initial prototype, refs #1 2023-04-01 14:28:24 -07:00
Justfile Run black at end of just fix 2023-07-10 07:41:49 -07:00
LICENSE Initial prototype, refs #1 2023-04-01 14:28:24 -07:00
MANIFEST.in Don't include tests/ in the package 2023-07-01 11:45:00 -07:00
mypy.ini Added mypy, plus some fixes to make it happy - refs #77 2023-07-02 12:36:22 -07:00
README.md Link to license on main 2023-07-03 13:10:30 -07:00
ruff.toml Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
setup.py types-click 2023-07-06 20:45:10 -07:00

LLM

PyPI Documentation Changelog Tests License

Access large language models from the command-line

Full documentation: llm.datasette.io

See llm, ttok and strip-tags—CLI tools for working with ChatGPT and other LLMs for more on this project.

Installation

Install this tool using pip:

pip install llm

Or using Homebrew:

brew install simonw/llm/llm

Detailed installation instructions.

Getting started

First, create an OpenAI API key and save it to the tool like this:

llm keys set openai

This will prompt you for your key like so:

$ llm keys set openai
Enter key:

Now that you've saved a key you can run a prompt like this:

llm "Five cute names for a pet penguin"
1. Waddles
2. Pebbles
3. Bubbles
4. Flappy
5. Chilly

Read the usage instructions for more.

Help

For help, run:

llm --help

You can also use:

python -m llm --help