llm: add page (#11697)

* llm: add page

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
pull/23/head
Gilad Alboher 2023-12-13 08:37:11 +02:00 committed by GitHub
parent 63b089e6b5
commit 70b20b7ae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 0 deletions

28
pages/common/llm.md Normal file
View File

@ -0,0 +1,28 @@
# llm
> Interact with Large Language Models (LLMs) via remote APIs and models that can be installed and run on your machine.
> More information: <https://llm.datasette.io/en/stable/help.html>.
- Set up an OpenAI API Key:
`llm keys set openai`
- Run a prompt:
`llm "{{Ten fun names for a pet pelican}}"`
- Run a [s]ystem prompt against a file:
`cat {{path/to/file.py}} | llm --system "{{Explain this code}}"`
- Install packages from PyPI into the same environment as LLM:
`llm install {{package1 package2 ...}}`
- Download and run a prompt against a [m]odel:
`llm --model {{orca-mini-3b-gguf2-q4_0}} "{{What is the capital of France?}}"`
- Have an interactive chat with a specific [m]odel:
`llm chat --model {{chatgpt}}`