This project is developed based on other excellent projects on Github, including but not limited to:
Thanks to the selfless contributions of these developers.
Features
- Support multiple OpenAPI keys by creating multiple ChatAPI clients for load balancing
- Supports conversation
- Supports switching of assistant role
- Supports PC/Mobile devices
- Custom OpenAI API
- TODO: Persistent conversation
- TODO: Supports login
Getting Started
If you want to experience it directly, you can visit ai-assistant demo. (If you find that it is unable to answer, it might be because the key balance is insufficient, you can raise an issue)
Deploy with vercel
Deploy with pm2
prerequisites
- nodejs
- npm
- ensure your server can access api.openai.com
ping ai.openai.com
curl https://api.openai.com # re 'Invalid URL (GET /)' message means ok.
- clone
ai-assistant
git clone https://github.com/youking-lib/ai-assistant.git
npm i -g pnpm pm2
- add
.env
file
# SITE_GOOGLE_ANALYTICS=
# Supports multi API_KEY, split with ','
OPENAI_API_KEY=KEY_1,KEY_2
- deploy
sh deploy.sh
Deploy with docker
# TODO
Local
Same as deploy with pm2
οΌ
- Clone this project.
- Add the .env file (or .env.local for development purposes, which will not be committed).
- Run the following script:
pnpm i
pnpm run dev
The server has started and is now running on localhost at port 3000.