https://github.com/rootstrap/chat-gpt-nodejs
NodeJS REST-API to interact with OpenAI
https://github.com/rootstrap/chat-gpt-nodejs
Last synced: 11 months ago
JSON representation
NodeJS REST-API to interact with OpenAI
- Host: GitHub
- URL: https://github.com/rootstrap/chat-gpt-nodejs
- Owner: rootstrap
- Created: 2023-03-16T19:41:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-17T17:18:38.000Z (about 3 years ago)
- Last Synced: 2025-04-05T18:50:38.242Z (12 months ago)
- Language: TypeScript
- Size: 96.7 KB
- Stars: 14
- Watchers: 11
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ChatGPT NodeJS .TS Api
This project includes the boilerplate to interact with ChatGPT from a basic rest-api made in Node.js with Express + Typescript.
## Basic Requirements
1. Install Node.js [https://nodejs.org/en/download/](https://nodejs.org/en/download/)
2. Install `TypeScript`
```sh
npm install -g typescript
```
3. Install required dependencies
```sh
npm install
```
4. Get an OpenAI API key: [https://beta.openai.com/signup/](https://beta.openai.com/signup/)
5. Update your `.env` file with your API_KEY
## Build and Run
To build js from typescript source.
```sh
npm run build
```
To start the server from the compiled folder (/dist).
```sh
npm run start
```
## Demo
