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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openacli-0.2.tar.gz.
File metadata
- Download URL: openacli-0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a0dc7422f6e9364e0177e951d8f93c825ea767e54004288389d04ba980e0bcd
|
|
| MD5 |
7ef2f5c469228239cd4b11dc20d8aa11
|
|
| BLAKE2b-256 |
081e43bb1c87f267cc3f3e1e11e962d4632229a3ae934b40265b4a276f214b71
|
File details
Details for the file openacli-0.2-py3-none-any.whl.
File metadata
- Download URL: openacli-0.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a6eb70629b82ca0bda7d03ee626c8f0507fd6d6209f99fd7f3088ad465770c
|
|
| MD5 |
99cdeeb006790d4aa3f9a4d528f69f94
|
|
| BLAKE2b-256 |
1fe241706aeac6fabf9a3305f1a890f0f6c7cced80846c61858f0639a073b822
|