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.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85fb252bcc23af865d640be48d0b5fe553beb486073904bbebedb95a5d6be06b |
|
MD5 | af8d4dd5d134417eda546a0f8373f285 |
|
BLAKE2b-256 | 40c04c1459fadcbffc5541363c494074d01956dd03663e16fdf4d71607b2ed7c |