Skip to content

jun-low/chat-with-gpt

Repository files navigation

Chat with GPT

convex

A chat application using the OpenAI API along with Convex. In this setup, Convex stores the messages and handles server-side functions for interacting with OpenAI.

This app started with a minimal setup to get React working in Vite with HMR and some ESLint rules and from the official ChatGPT Convex demo.

Features:

  • Have a conversation with the Chat GPT API.
  • Start new threads to create new conversation with Chat GPT.
  • Specify what the chat identity is and change it mid-thread.
  • Create new identities/AI agents.
  • Moderate user inputs for offensive content by using the moderation API.
demo.mov
convex_demo.mov

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
   parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
   },
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list

About

Built with React + TypeScript + Vite + Convex

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published