llm/docs/index.md

72 lines
2.5 KiB
Markdown
Raw Normal View History

# LLM
2023-06-17 17:03:05 +00:00
[![PyPI](https://img.shields.io/pypi/v/llm.svg)](https://pypi.org/project/llm/)
[![Changelog](https://img.shields.io/github/v/release/simonw/llm?include_prereleases&label=changelog)](https://llm.datasette.io/en/stable/changelog.html)
[![Tests](https://github.com/simonw/llm/workflows/Test/badge.svg)](https://github.com/simonw/llm/actions?query=workflow%3ATest)
2023-07-03 20:11:33 +00:00
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm/blob/main/LICENSE)
2023-07-12 01:56:38 +00:00
[![Discord](https://img.shields.io/discord/823971286308356157?label=discord)](https://datasette.io/discord-llm)
2023-09-03 18:50:18 +00:00
[![Homebrew](https://img.shields.io/homebrew/installs/dy/llm?color=yellow&label=homebrew&logo=homebrew)](https://formulae.brew.sh/formula/llm)
2023-06-17 17:03:05 +00:00
A CLI utility and Python library for interacting with Large Language Models, including OpenAI, PaLM and local models installed on your own machine.
Background on this project:
- [llm, ttok and strip-tags—CLI tools for working with ChatGPT and other LLMs](https://simonwillison.net/2023/May/18/cli-tools-for-llms/)
- [The LLM CLI tool now supports self-hosted language models via plugins](https://simonwillison.net/2023/Jul/12/llm/)
2023-07-18 21:24:32 +00:00
- [Accessing Llama 2 from the command-line with the llm-replicate plugin](https://simonwillison.net/2023/Jul/18/accessing-llama-2/)
2023-08-12 16:27:36 +00:00
- [Run Llama 2 on your own Mac using LLM and Homebrew](https://simonwillison.net/2023/Aug/1/llama-2-mac/)
- [Catching up on the weird world of LLMs](https://simonwillison.net/2023/Aug/3/weird-world-of-llms/)
For more check out [the llm tag](https://simonwillison.net/tags/llm/) on my blog.
2023-06-17 17:01:48 +00:00
## Quick start
First, install LLM using `pip` or Homebrew:
2023-06-17 17:01:48 +00:00
```bash
pip install llm
2023-07-24 15:36:42 +00:00
```
Or with Homebrew:
```bash
brew install llm
```
If you have an [OpenAI API key](https://platform.openai.com/account/api-keys) key you can run this:
```bash
# Paste your OpenAI API key into this
llm keys set openai
2023-06-17 17:01:48 +00:00
# Run a prompt
llm "Ten fun names for a pet pelican"
# Run a system prompt against a file
cat myfile.py | llm -s "Explain this code"
```
Or you can {ref}`install a plugin <installing-plugins>` and use models that can run on your local device:
```bash
# Install the plugin
llm install llm-gpt4all
2023-09-02 18:47:06 +00:00
# Download and run a prompt against the Orca Mini 7B model
llm -m orca-mini-7b 'What is the capital of France?'
```
2023-06-17 17:01:48 +00:00
## Contents
```{toctree}
---
maxdepth: 3
---
setup
usage
other-models
embeddings/index
plugins/index
2023-08-12 05:55:59 +00:00
aliases
python-api
2023-06-17 07:40:46 +00:00
templates
logging
related-tools
help
contributing
2023-06-16 08:06:30 +00:00
changelog
```