An AI-powered assistant built with Astro and multiple language model integrations.
- 🤖 Multi-model support (GPT, Claude, Gemini, DeepSeek)
- 🌓 Dark/Light theme
- ✨ Markdown & LaTeX support
- 💾 Chat history with local storage
- 📱 Responsive design
- 🔒 Password-protected access
Before deploying, make sure to configure these environment variables:
PUBLIC_OPENAI_API_KEY= # Your OpenAI API key
PUBLIC_ANTHROPIC_API_KEY= # Your Anthropic API key
PUBLIC_GOOGLE_API_KEY= # Your Google API key
PUBLIC_DEEPSEEK_API_KEY= # Your DeepSeek API key
PUBLIC_DEFAULT_MODEL= # Default model (e.g., "gpt-3.5-turbo")
PUBLIC_SHOW_SETTINGS= # Show settings page ("true" or "false")
PUBLIC_ACCESS_PASSWORD= # Password for accessing the application
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file with the required environment variables - Start the development server:
npm run dev
All commands are run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
Visit the following sites to obtain your API keys:
- 🔵 OpenAI: https://platform.openai.com/account/api-keys
- 🟣 Anthropic: https://console.anthropic.com/
- 🟡 Google AI: https://aistudio.google.com/app/apikey
- 🟢 DeepSeek: https://platform.deepseek.com/
- Pull the Docker image:
docker pull xhh1128/astro-ai:latest
- Create
.env
file with your API keys:
PUBLIC_OPENAI_API_KEY=your-openai-key
PUBLIC_ANTHROPIC_API_KEY=your-anthropic-key
PUBLIC_GOOGLE_API_KEY=your-google-key
PUBLIC_DEEPSEEK_API_KEY=your-deepseek-key
PUBLIC_DEFAULT_MODEL=gpt-4-turbo-preview
PUBLIC_SHOW_SETTINGS=true
- Run with Docker:
docker run -d \
--name astro-ai \
-p 4321:4321 \
--env-file .env \
xhh1128/astro-ai:latest
Or use Docker Compose:
Create docker-compose.yml
:
version: '3.8'
services:
astro-ai:
image: xhh1128/astro-ai:latest
ports:
- "4321:4321"
environment:
- PUBLIC_OPENAI_API_KEY=${PUBLIC_OPENAI_API_KEY}
- PUBLIC_ANTHROPIC_API_KEY=${PUBLIC_ANTHROPIC_API_KEY}
- PUBLIC_GOOGLE_API_KEY=${PUBLIC_GOOGLE_API_KEY}
- PUBLIC_DEEPSEEK_API_KEY=${PUBLIC_DEEPSEEK_API_KEY}
- PUBLIC_DEFAULT_MODEL=${PUBLIC_DEFAULT_MODEL}
- PUBLIC_SHOW_SETTINGS=${PUBLIC_SHOW_SETTINGS}
- PUBLIC_ACCESS_PASSWORD=${PUBLIC_ACCESS_PASSWORD}
restart: unless-stopped
Then run:
docker-compose up -d
- Access the application at
http://localhost:4321
- Fork this repository
- Click the "Deploy with Vercel" button above
- Configure the required environment variables in Vercel:
- PUBLIC_OPENAI_API_KEY
- PUBLIC_ANTHROPIC_API_KEY
- PUBLIC_GOOGLE_API_KEY
- PUBLIC_DEEPSEEK_API_KEY
- PUBLIC_DEFAULT_MODEL
- PUBLIC_SHOW_SETTINGS
- PUBLIC_ACCESS_PASSWORD
- Deploy and enjoy! 🎉
⚠️ Make sure to set up all required API keys in your environment variables- ⚙️ The settings page can be enabled/disabled using
PUBLIC_SHOW_SETTINGS
- 💾 Chat history is stored in localStorage
MIT License