Skip to main content

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.

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

There are a few options:

$ oregpt --help
Usage: oregpt [OPTIONS]

Options:
  -V, -v, --version          Show the version and exit.
  -m, --model_name TEXT      Model name in OpenAI (e.g, gpt-3.5-turbo, gpt-4)
  -a, --assistant_role TEXT  Role setting for Assistant (AI)
  --help                     Show this message and exit.

Supported commands on chat

Commands such as saving and loading conversations are available as the following:

Command Description
/exit Exit from this chat tool
/quit Exit from this chat tool
/q Exit from this chat tool
/clear Clear chat history all
/history Show chat history in json format
/save Save chat history in json format
/load Load chat history from a json file
/help Show all commands which you can use in this chat tool

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 ~/.config/oregpt/config.yml

❯ cat ~/.config/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"
        role: "You are a chat bot"
    system:
        name: System
        style: "#cc0000"

Metadata

Release files for oregpt 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oregpt 0.2.1
File Size Uploaded Provenance Actions
oregpt-0.2.1.tar.gz 9.1 kB Without provenance Details for oregpt-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oregpt 0.2.1
File Interpreter ABI Platform Actions
oregpt-0.2.1-py3-none-any.whl Python 3 none any Details for oregpt-0.2.1-py3-none-any.whl

Total release size: 17.4 kB

Release files / oregpt-0.2.1.tar.gz

Download URL oregpt-0.2.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0d2f891828fe3fcfac765ca616831c34163d25c00e93c38398a2501b99b01010
BLAKE2b-256 checksum
How to use checksums
eb2097dc09403bebd82b9abca820cea386ae5f0a11817c046b254eba8fe335a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.11.3 Darwin/22.3.0

Release files / oregpt-0.2.1-py3-none-any.whl

Download URL oregpt-0.2.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e83944406ac889edd616ff66915cc7cc0de9ecd849ff402f36424a45a01858db
BLAKE2b-256 checksum
How to use checksums
749141b93232fc3c2170268ae8d1084f7025abbb65f8bb9ea8e5ce0031f82497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.11.3 Darwin/22.3.0

Security for oregpt 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page