Skip to content

hongquandev/openai-assistant-react

Repository files navigation

ChatGPT Assistant React App Demo

Try the demo online

This is a simple React application that uses the OpenAI GPT-3 API to create a chat interface. Using the OpenAI Assistant API, you can create a chat interface that can answer questions, provide information, and more. Link to the OpenAI Assistant API

Start

Run the following commands in your command line. (without the $ sign)

First, install the dependencies.

# npm
$ npm install

# yarn
$ yarn add

# pnpm
$ pnpm install

Then, start the dev server:

# npm
$ npm run dev

# yarn
$ yarn dev

# pnpm
$ pnpm dev

You should see the application running at http://localhost:5173 by default.

Usage

When you start the application, you should see there is a arrow in the top bar.

when you have click it, it will open a popper that contains an API key input box.

Input your own API key, and then enjoy using it!

Tips

The first message may respond very slowly, because it's loading the language bundles that are used to highlight the code.

After that, it will resume to normal response speed. (I supposed)