An open API service indexing awesome lists of open source software.

https://github.com/nicolasollier/ask-gpt

A small bash script to run ChatGPT from shell
https://github.com/nicolasollier/ask-gpt

chatbot openai shell

Last synced: 2 months ago
JSON representation

A small bash script to run ChatGPT from shell

Awesome Lists containing this project

README

          

## README: Simple Chat Assistant with OpenAI

This script creates a basic chatbot interface in the terminal, powered by OpenAI's GPT-3.5 Turbo model.

### Requirements:
- `jq` for JSON parsing.
- `curl` to make API requests.
- An OpenAI account to obtain the API key.

### Setup:
1. Make sure you have `jq` and `curl` installed.
```bash
sudo apt install jq curl
```
or
```node
npm -i jq curl
2. Store your OpenAI API key in a file named openai_env.sh inside ~/bin/ or elsewhere safe with the following content:
```bash
export OPENAI_API_KEY='YOUR_API_KEY_HERE'