A simple CLI to chat with OpenAI GPT Models
Project description
llm-term
Chat with OpenAI's GPT models directly from the command line.
Screen Recording
Check Out the Docs
Installation
pipx install llm-term
Usage
Then, you can chat with the model directly from the command line:
llm-term
Make sure you have an OpenAI API key set as an environment variable
(this can also set via the --api-key
/ -k
flag in the CLI):
export OPENAI_API_KEY="xxxxxxxxxxxxxx"
Optionally, you can set a custom model. llm-term defaults
to gpt-3.5-turbo
(this can also set via the
--model
/ -m
flag in the CLI):
export OPENAI_MODEL="gpt-4"
Want to start the conversion directly from the command line? No problem,
just pass your prompt to llm-term
:
llm-term show me python code to detect a palindrome
You can also set a custom system prompt. llm-term defaults to a reasonable
prompt for chatting with the model, but you can set your own prompt (this
can also set via the --system
/ -s
flag in the CLI):
export OPENAI_SYSTEM_MESSAGE="You are a helpful assistant who talks like a pirate."
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for llm_term-0.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2567259320d77dfa2283f7ff5537e628119fc781cb1525ac855e911218e68ef3 |
|
MD5 | 67beb16bf63e2323b180cd3bca0c03b9 |
|
BLAKE2b-256 | 0393c266fcfea8414feb000ddbcbba3144d9b28060e05f0bda05c4b06f9e9794 |