https://github.com/alanfriedman/chatgpt
Minimal command-line interface for ChatGPT Completions API
https://github.com/alanfriedman/chatgpt
chatgpt chatgpt-api openai
Last synced: 2 months ago
JSON representation
Minimal command-line interface for ChatGPT Completions API
- Host: GitHub
- URL: https://github.com/alanfriedman/chatgpt
- Owner: alanfriedman
- License: mit
- Created: 2023-01-14T19:18:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-14T19:43:50.000Z (over 2 years ago)
- Last Synced: 2025-02-13T11:46:15.830Z (4 months ago)
- Topics: chatgpt, chatgpt-api, openai
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Minimal ChatGPT Completions CLI
## Setup
1. Generate an [OpenAI API key](https://beta.openai.com/account/api-keys) and write it to a file in the root directory named `openai_api_key`
2. Install the `openai` Python package, following instructions [here](https://beta.openai.com/docs/libraries/python-bindings)## Usage
Run `./main.py -h` for a list of options. If a prompt isn't provided using `--prompt PROMPT`, you can enter one interactively.
Responses and some metadata are also logged to `chatgpt.log`.
## Compatibility
Tested on Python 3.10.9.