A Command Line Interface to Open AI
Project description
OAICLI 🕶️
A Command Line Interface to Open AI (pronounced Oakley (IPA oʊk.li)
OAICLI is designed to help developers create and use assistants, which were launched on OpenAI Dev Day, November 2023.
Threads, messages, and thread runs are abstracted, to make the user experience of creating and chatting with agents simpler.
Your files, agent prompts, and messages will be saved to .oaicli
, from which you can edit prompts and files.
Use at your own risk.
I built this for myself. Feel free to open issues and PRs. If you want a complete implementation of what Assistants are capable of, you can use the friendly OpenAI playground.
installation
pip install oaicli
Next, creat an .env
file in your project home:
OPENAI_API_KEY = "[your key]"
OPEN_AI_MODEL_TYPE = "gpt-4-1106-preview"
OPEN_AI_VISION_MODEL_TYPE = "gpt-4-1106-vision-preview"
When you first run oaicli
, it will install the .oaicli
directory in the project location.
You could version prompts for example in your repo, and then update your agents.
Threads are given names to make it easier to choose.
Commands
oaicli -h | --help for help
Quickstart
oaicli start
- allows you to start up quickly, choose a thread, agent, and start communicating.
If runs reach a time limit, they will be canceled.
File and Agent maintenance
Otherwise there is some agent and file maintenence.
oaicli file upload
oaicli file list
oaicli file download-all
experimental
Probably broken. If you want autocompletion (useful for editing agents and uploading files)
For Bash:
eval "$(_OAICLI_COMPLETE=source_bash oaicli)"
For Zsh:
eval "$(_OAICLI_COMPLETE=source_zsh oaicli)"
Roadmap
v0.3
- upload doc from url, or get web contents
- cat a directory into a single file and upload
- share publicically OAICLI help agent, uploading entire github repo. For example "what changes would you make to README.md based on the source code"
v1.x
Have agents select and talk to each other.
Other:
- agent.dialog [agent name one] [agent name two] ... - have agents talk to eachother ala autoGPT
- agent.local-rag [agent] - add a file to local rag for use with an agent
- agent.function [agent] - add a file to local rag for use with an agent
- pydantic, mypy for typing
- tox and testing
- shell completion for commands and directories and files (clicko?)
- SQL lite for RAG and storage
- tools support https://platform.openai.com/docs/api-reference/assistants/createAssistant#assistants-createassistant-tools
- function call support
Development
https://github.com/HumanAssistedIntelligence/OAICLI https://pypi.org/project/oaicli/
pyenv install 3.12
pyenv virtualenv 3.12 oaicli
export PYTHONPATH="[project path]/oaicli
pip install .
Project details
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
File details
Details for the file oaicli-0.2.1.tar.gz
.
File metadata
- Download URL: oaicli-0.2.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ecd213924d53982321639f7ec3b031f9e0dd9f05abe1783c08968f51abfff32 |
|
MD5 | 0eb91c8b7baf30191316b7bca960a5f6 |
|
BLAKE2b-256 | 29bea2762efb2821acfdc0584a64dd581cb9232a49d93767c84324ce682a79b0 |
File details
Details for the file oaicli-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: oaicli-0.2.1-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14cb23c216541db5c76c88f53f7aeb73d45aae05c550c8a3011c4271e531b77c |
|
MD5 | 17c3e9c3fda5804025a2951f73734202 |
|
BLAKE2b-256 | 77467b6ec5cb98a941668f9b8426aa61e83d9270a6df0347bd02b05b60c1b072 |