A
CLI utility and
Python library for interacting with Large Language Models, both via remote APIs and models that can be installed and run on your own machine.
REPO:
Code:
https://github.com/simonw/llm
DOCS:
Code:
https://llm.datasette.io/en/stable/
INSTALL:
or
Code:
python -m pip install llm
USAGE:
Obtain a chatgpt/openai API key from their site. You need to register to openai. When you set your api to llm you can use chatgpt from commmand prompt:
Code:
# Paste your OpenAI API key into this
llm keys set openai
# 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"
My experience after setting open ai api:
Code:
$ llm "Ten fun names for a pet pelican"
Error: You exceeded your current quota, please check your plan and billing details.