OpenAI CLI Interface
Project description
OpenAclI
Wanted a tool to use OpenAI on the command line. Also supports showing images.
Installation
> pip install openacli
Usage
You'll need an OpenAI API key to use this library.
Chat
> oacli
me> "<prompt with quotes>"
ai> <some response>
Image
> oacli -i "<some prompt with quotes>"
Python Pillow will bring up and image
Prompt
> oacli "<some prompt with quotes>"
<response from OpenAI>
Settings
Several configuration settings are exposed through environment variables. If they aren't provided, the defaults below will be applied.
# OpenAI Settings
OPENAI_DEFAULT_ENGINE="text-davinci-003"
OPENAI_DEFAULT_TEMPERATURE=.5
OPENAI_DEFAULT_FREQUENCY_PENALTY=0
OPENAI_DEFAULT_PRESENCE_PENALTY=0
OPENAI_DEFAULT_MAX_TOKENS=2048
OPENAI_DEFAULT_IMAGE_NUMBER=1
OPENAI_DEFAULT_IMAGE_SIZE="1024x1024"
# OAclI Settings
OACLI_INPUT_COLOR=Green
OACLI_OUTPUT_COLOR=Red
Examples
Chat
Image
Prompt
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
openacli-0.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
openacli-0.2-py3-none-any.whl
(5.2 kB
view hashes)