Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ustayready/directai
ChatGPT queries via OpenAI API in your terminal
https://github.com/ustayready/directai
Last synced: 3 months ago
JSON representation
ChatGPT queries via OpenAI API in your terminal
- Host: GitHub
- URL: https://github.com/ustayready/directai
- Owner: ustayready
- Created: 2023-02-14T18:57:41.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-02-14T19:11:11.000Z (over 1 year ago)
- Last Synced: 2024-06-15T10:35:43.509Z (5 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 60
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-ChatGPT-repositories - DirectAI - ChatGPT queries via OpenAI API in your terminal (CLIs)
README
DirectAI
==================## Overview ##
ChatGPT queries via OpenAI API in your terminal.A quick utility you can keep in a terminal window to rapidly query OpenAI's ChatGPT via the API and receive the results. There are probably better, more fully featured alternatives out there but I got tired of looking and fighting with pre-reqs so I just threw this together.
Follow me on Twitter ([Mike Felch - @ustayready](https://twitter.com/ustayready))
## Benefits ##
* Uses an OpenAI API key instead of fighting other users on the web interface
* Set the OpenAI API key in an environment variable (OPENAI_API_KEY) or as a flag
* Just input `clear` to clear the terminal
* Just input `quit` to exit the client back to the terminal## Disclaimer ##
* I'm not responsible for your ChatGPT addiction.
* Be careful not to query ChatGPT with sensitive information.## Basic Usage ##
### Requires OpenAI API key
```
usage: direct.py [-h] [--key KEY]Directly query ChatGPT using the API
optional arguments:
-h, --help show this help message and exit
--key KEY OpenAI API key
DirectAI the ChatGPT terminal client
```
## Installation ##
You can install and run with the following command:```bash
$ git clone https://github.com/ustayready/directai
$ cd directai
~/directai $ virtualenv -p python3 .
~/directai $ source bin/activate
(directai) ~/directai $ pip install -r requirements.txt
(directai) ~/directai $ python direct.py
```Note that Python 3.6+ is required.