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
- Host: GitHub
- URL: https://github.com/nicolasollier/ask-gpt
- Owner: nicolasollier
- Created: 2023-10-26T12:42:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-26T20:58:34.000Z (over 2 years ago)
- Last Synced: 2025-10-09T04:42:48.740Z (9 months ago)
- Topics: chatbot, openai, shell
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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'