This project is a minimal Demo to showcase OpenAI's chat API, with streaming answers. The demo uses the following Open Source frameworks/libraries:
- Nuxt Framework
- Vuetify UI Components
- MDI Font icons
- Vue-Showdown for formatting Markdown to HTML
- OpenAI-streams for easy use of streamed responses from OpenAI's API
- Node.js version 18.16.0 or greater
- npm and yarn (yarn can be installed using
npm install -g yarn
) - OpenAI API Key
- Put the API Key in the
nuxt.config.ts
file, at line 4 - To switch between GPT3.5 and GPT 4 change the
model
innuxt.config.ts
to either"gpt-3.5-turbo"
or"gpt-4"
Make sure to install the dependencies:
yarn install
Build the application for production:
yarn build
Run a preview of the build:
yarn preview
The Website can now be accessed at http://localhost:3000
Start a development server with live-refresh and Nuxt Devtools
yarn dev