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

https://github.com/emanuelefavero/chatgpt-api

This is a terminal based chatbot that uses the OpenAI API
https://github.com/emanuelefavero/chatgpt-api

chatbot chatgpt command-line gpt-3 gpt-4 javascript npm opeanai terminal

Last synced: 3 months ago
JSON representation

This is a terminal based chatbot that uses the OpenAI API

Awesome Lists containing this project

README

        

# chatGPT API

This is a terminal based chatbot that uses the OpenAI API (gpt-4 and gpt-3) to generate responses to user input

#### screenshot

screenshot

## Installation

- clone the repository and `cd` into it
- run `npm install` to install the dependencies
- go to [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys) and get your API key
- create a `.env` file and add your API key to it:

```bash
API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

## Usage

- run `npm run dev` to start the chatbot
- ask the chatbot a question
- type one of the following to exit the chatbot: `exit`, `quit`, `e`, `q`