https://github.com/jmrashed/express-openapi-generator
express-openapi-generator
https://github.com/jmrashed/express-openapi-generator
Last synced: 4 months ago
JSON representation
express-openapi-generator
- Host: GitHub
- URL: https://github.com/jmrashed/express-openapi-generator
- Owner: jmrashed
- Created: 2024-01-23T07:14:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-24T12:55:00.000Z (over 1 year ago)
- Last Synced: 2025-01-07T20:14:40.957Z (6 months ago)
- Language: EJS
- Size: 140 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js OpenAI Chatbot Example
This is a simple Node.js application that uses the OpenAI API to generate a short paragraph based on a given topic.
## Prerequisites
Before running the application, make sure you have the following:
- Node.js installed
- OpenAI API key (you can obtain this from the [OpenAI website](https://beta.openai.com/signup/))## Installation
1. Clone the repository:
```bash
git clone https://github.com/jmrashed/express-openapi-generator.git
```
2. Install dependencies:
```bash
npm install
```
3. Create a .env file in the project root and add your OpenAI API key:
```bash
API_KEY=your_openai_api_key
```# Demo
## Usage
1. Start the server:
```bash
npx nodemon index.js
```
2. Open your browser and go to `http://localhost:3000`.
3. Enter a topic in the input field and click the "Generate" button.
4. The server will use the OpenAI API to generate a short paragraph based on the provided topic.