Skip to main content

A tiny GPT CLI tool

Project description

oregpt

workflow license release python-version pypi

A tiny GPT CLI tool. You can chat with the GPT model developped by OpenAI and save the conversation as json.

oregpt

Installation

Get your own OpenAI API Key

Assuming you have an environment variable with key named OPENAI_API_KEY. If you don't have a OpenAI API key visit here, generate one and add it as an environment variable

export OPENAI_API_KEY=<YOUR-OPENAI-API-KEY>

Instal from PyPI

You can install the package using pip:

$ pip install oregpt

Usage

Once you have installed oregpt, you can run it by typing:

$ oregpt

Configuration

You can specify the place of conversation log, style (color etc) and the model supported in /v1/chat/completions endpoint provided by OpenAI in ~/.oregpt/config.yml

❯ cat ~/.oregpt/config.yml
log: /tmp/oregpt/
openai:
    model: gpt-3.5-turbo
# You can also specify OpenAI's API key here
#     api_key: <your-api-key>
character:
    user:
        name: Me
        style: "#00BEFE"
    assistant:
        name: AI
        style: "#87CEEB"
    system:
        name: System
        style: "#cc0000"

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

oregpt-0.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

oregpt-0.1.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

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