This repository was developed using openai-node and based on openai-quickstart-node, with several additional elements added.
- Supports styled-components and TypeScript
- Remember conversation context instead of one-time responses
- More intuitive and clean UI with easy customization options
-
If you don’t have Node.js installed, install it from here (Node.js version >= 14.6.0 required)
-
Clone this repository
-
Navigate into the project directory
$ cd openai-poc
-
Install the requirements
$ npm install
-
Make a copy of the example environment variables file
On Linux systems:
$ cp .env.example .env
On Windows:
$ copy .env.example .env
-
Add your API key to the newly created
.env
file -
Run the app
$ npm run dev
-
Deploy it to the cloud with Vercel (Documentation)
You can customize the following model-related variables in the setting.ts
file.
Variable | Description | Option | Type |
---|---|---|---|
PREFIX |
Prefix to include in all conversations | Whatever you want (language, role, tone..) | string |
MODEL |
Models | Available models | string |
TEMPERATURE |
Adjust your settings | Number between 0 and 1 | number |
MAX_TOKENS |
What are tokens and how to count them? | Maximum number of tokens allowed by each model | number |