Search and AI Chat Setup
This guide explains how to set up search functionality and AI chat for your PipeLLM Gateway documentation.🔍 Search Configuration
Option 1: Algolia (Recommended)
-
Create Algolia Account
- Sign up at Algolia
- Create a new index (e.g.,
pipellm-docs)
-
Update
docs.json
- Index Your Documentation
- Mintlify automatically indexes your content
- Search updates typically take a few minutes
Option 2: Google Custom Search
Option 3: Local Search
🤖 AI Chat Configuration
Option 1: Anthropic Claude (Recommended)
-
Get API Key
- Sign up at Anthropic Console
- Create an API key
-
Update
docs.json
Option 2: OpenAI GPT
Option 3: Google Gemini
⚙️ Environment Variables
For security, store API keys in environment variables:Create .env.local file
Update docs.json to use environment variables
🚀 Deployment Considerations
Vercel Deployment
-
Add Environment Variables
- In Vercel Dashboard, go to Settings → Environment Variables
- Add all required API keys
- Build Configuration
Mintlify Deployment
-
Add Environment Variables
- In Mintlify Console, go to Settings → Environment Variables
- Add required API keys
-
Automatic Indexing
- Mintlify automatically handles search indexing
- AI chat configuration is processed during build
🎨 Customization
Search Styling
AI Chat Widget
🔧 Troubleshooting
Search Issues
-
Search not working
- Check API keys are correct
- Verify index exists and is populated
- Check browser console for errors
-
Indexing problems
- Wait 5-10 minutes for indexing to complete
- Check Algolia dashboard for indexing status
- Re-deploy if needed
AI Chat Issues
-
Chat not responding
- Verify API key is valid
- Check rate limits on your API provider
- Ensure model name is correct
-
Poor responses
- Adjust system prompt
- Try different model (e.g., gpt-4 vs gpt-3.5-turbo)
- Check prompt length limits
📊 Monitoring and Analytics
Search Analytics
- Algolia: Built-in analytics dashboard
- Google: Search Console integration
- Local: Basic usage statistics
AI Chat Analytics
- Track usage patterns
- Monitor response quality
- Set up alerts for high usage
🛡️ Security Best Practices
-
API Key Security
- Never commit API keys to version control
- Use environment variables
- Set up API key restrictions where possible
-
Rate Limiting
- Configure appropriate rate limits
- Monitor usage patterns
- Set up alerts for unusual activity
-
Content Safety
- Use appropriate system prompts
- Implement content filtering
- Monitor for inappropriate usage
📝 Next Steps
- Test search functionality
- Test AI chat responses
- Monitor usage and performance
- Optimize based on user feedback
Need help? Contact [email protected] for assistance with search and AI chat setup.