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 test, create, and use assistants, which were launched on OpenAI Dev Day, November 2023.

Threads, messages, and message runs are abstracted, so make the user experience more seamless. If runs reach a time limit, they will be canceled.

Use at your own risk. I built this for myself, but 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 with

OPENAI_API_KEY  = "[your key]"
OPEN_AI_MODEL_TYPE = "gpt-4-1106-preview"
OPEN_AI_VISION_MODEL_TYPE = "gpt-4-1106-vision-preview"

On first run, oaicli installs a directory in the project location

/oaicli/agent/agents.yaml (agent names-> ids)
/oaicli/agent/[agent id]/instructions.yaml
/oaicli/threads/threads.yaml (thread names-> ids)
/oaicli/threads/[thread id]/[message id].txt
/oaicli/files/[file id]/[filename]

The above directory structure should let you check in your work to your code repository and track changes.

Agents and threads are given names to make it easier Files can be added to conversation.

Commands

oaicli -h | --help for help

Threads are stored in append only textfiles.

  • oicli start - allows you to start up, choose a thread by name

Roadmap

v0.2

  • oaicli thread.list [agent] lists current threads
  • oaicli thread.join [agent] [thread choice from thread.list]
  • oaicli thread.new [agent] [thread title] - stored locally matched to thread id

Maintanence functions

  • oaicli agent.list - list agents
  • oaicli agent.create [agent name] - create a new agent
  • oaicli agent.edit [agent] [prompt | name | params] - edit something about the agent
  • oaicli agent.delete [agent] - delete an agent (don't be mean)
  • oaicli agent.file-upload [agent] [path] - send a file to your agent
  • oaicli agent.directory-upload [agent] [path] - takes all text files and pdf files and uploads content
  • oaicli agent.url-upload [agent] [URL]
  • oaicli agent.file-list [agent] - list an agents files

v0.3

  • 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

v0.4

Development

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.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

oaicli-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for oaicli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 100fcf4a041586d577acc138584de5a23f78d64f31dcbcf313fcd4ea41c89d84
MD5 1b1926704585b4192b2629b37bacc55f
BLAKE2b-256 d1cd2c77665ae7e78a1fc8ee5f3ee5a0c27d5abcdbe90a0ec13dfff713171eea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: oaicli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0295eb38e1c482d9cd65b830c6b4353463efabe6983b0c4f27eb2e3e56bcf857
MD5 7fa117f7afcfa0d71a2d8888c26bdfe2
BLAKE2b-256 f5cac13cc01c64b6723cc8e7c749618149cac4fbf4a1d281a05e361106306ba2

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