An interactive service that integrates with ChatGPT using Next.js and Prisma, offering a chat-style interface.
-
Clone the repository
-
Set up the environment variables
- Rename the
.env.example
file to.env
- Fill in the
.env
file with the appropriate valuesGITHUB_SECRET
GITHUB_ID
NEXTAUTH_SECRET
NEXTAUTH_URL
DATABASE_URL
OPENAI_API_KEY
ALLOWED_EMAILS
- Rename the
-
Run
yarn install
to install the dependencies -
Apply the database migrations using
yarn dlx prisma migrate dev
-
Generate Prisma client using
yarn dlx prisma generate
-
Start your server by running
yarn dev
- Authentication via GitHub, with the capability to restrict access to specified email addresses
- Supports multiple chat sessions
- Allows the selection of the model (GPT-4 or GPT-3.5-Turbo)
- Calculates token usage and the corresponding cost in USD