/example-openai-vuejs

Example chat application using vue 3 and openai api

Primary LanguageVue

example-vuejs-openai

This is a simple example of how to use OpenAI with Vue.js.

Build and deploy application

Project Setup

yarn

Compile and Hot-Reload for Development

yarn dev

Type-Check, Compile and Minify for Production

yarn build

Run Unit Tests with Vitest

yarn test:unit

Run End-to-End Tests with Playwright

# Install browsers for the first run
npx playwright install

# When testing on CI, must build the project first
yarn build

# Runs the end-to-end tests
yarn test:e2e
# Runs the tests only on Chromium
yarn test:e2e --project=chromium
# Runs the tests of a specific file
yarn test:e2e tests/example.spec.ts
# Runs the tests in debug mode
yarn test:e2e --debug

Lint with ESLint

yarn lint

ToDo

  • Make model select- and configurable
  • Add more models for code and image generation
  • Loading animation
  • Change favicon and title
  • Add more tests
  • Add more documentation
  • Use components from Vitesse
  • Add more types