Skip to main content

A Command Line Interface to Open AI

Project description

OAICLI 🕶️

A Command Line Interface to Open AI (pronounced Oakley (IPA oʊk.li), like the sunglasses)

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

  • oaicli agent.delete [agent] - delete an agent (don't be mean)
  • upload doc from url, or get web contents
  • cat a directory into a single file and upload
  • create 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:

Development

https://github.com/HumanAssistedIntelligence/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

oaicli-0.2.0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

oaicli-0.2.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file oaicli-0.2.0.tar.gz.

File metadata

  • Download URL: oaicli-0.2.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for oaicli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e36d299a631877b0bfd51520c131e4b62d4bfc315b08208da961cc5689d8d566
MD5 b563a21bd20c31876a1e51e4191ff811
BLAKE2b-256 553229abe57855d6cfc8a21b5139b1a0642f2b208a6da5d64b535136eabb683f

See more details on using hashes here.

File details

Details for the file oaicli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: oaicli-0.2.0-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

Hashes for oaicli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 062890793c54f9ccefeec24831cf71ebad5cf2e4ef050b717c4d586ffdde2003
MD5 b62d545cd2df2c5a38d3ae00226a7a12
BLAKE2b-256 7e48391722ac3241d54e521eaafdee30b98183508fd6a7a9af0f3a8ec920164f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page