This is an open source AI Chatbot with awesome prompts powered by TiDB Serverless.
This project is built based on ai-chatbot. Thanks for the great work!
- Awesome prompts for you to chat with AI.
- Share your chat powered by TiDB Serverless.
- Isolated chat (and the chat history) from different users.
Use GitHub OAuth App and next-auth GitHub provider to authenticate users.
The chat is powered by ChatGPT. Vercel AI SDK is used for streaming chat UI.
The prompts come from awesome prompts.
Chat history, prompts and userID are stored in a TiDB Serverless. This provides:
- Share your chat with others and the chat history will be kept forever.
- Isolated chat from different users.
- Prompts management
The project can be deployed on Vercel.
Here are the environment variables you need to set:
- AUTH_SECRET: Generate a random secret: https://generate-secret.vercel.app/32 or
openssl rand -base64 32
- AUTH_GITHUB_ID: Create a GitHub OAuth app here: https://github.com/settings/applications/new
- AUTH_GITHUB_SECRET: Authorization callback URL: https://authjs.dev/reference/core/providers_github#callback-url
- OPENAI_API_KEY: The OpenAI API key
If you skip the Vercel TiDB integration, you need add the following environment variables by yourself:
- TIDB_HOST: The host of your TiDB Serverless
- TIDB_USER: The user of your TiDB Serverless
- TIDB_PASSWORD: The password of your TiDB Serverless