The admin dashboard now includes a comprehensive Ollama management interface, allowing you to manage the AI assistant directly from the web interface without SSH access.
- Navigate to:
https://politiquera.com/admin - Sign in with Google (superadmin account)
- Click the 🧠 AI Assistant tab
Real-time status display:
- ✓ Ollama service running/stopped
- Version information
- API availability check
- Number of installed models
- One-click refresh button
If Ollama is not installed:
- Shows installation prompt
- 📦 Install Ollama button
- Automated installation process
- Progress tracking in action log
Automatic update checker:
- Checks for new Ollama versions
- Compares current vs latest version
- Visual indicator when updates available
One-click updates:
- ⬆️ Update Now button
- Downloads and installs latest version
- Automatically restarts Ollama service
- Shows update progress in action log
- Requires superadmin role
Update process:
- Click ⬆️ Update Now
- Confirm update dialog
- System downloads latest version
- Ollama service restarts automatically
- Status refreshes to show new version
View installed models:
- Model name and version
- File size (GB/MB)
- Last modified date
- Recommended model badge (Llama 3.2 3B)
Pull new models:
- Click ➕ Pull New Model
- Enter model name (e.g.,
llama3.2:3b-instruct,llama3.2:1b) - System downloads model
- Progress shown in action log
- Model appears in list when complete
Available models:
llama3.2:3b-instruct(Recommended, 2GB)llama3.2:1b(Lightweight, 1GB)llama3.2:8b-instruct(High quality, 5GB)phi-3:mini(Alternative, 1.5GB)- Any model from Ollama registry
Test models:
- Click 🧪 Test button on any model
- Runs sample SQL generation query
- Shows response time (ms)
- Displays sample output
- Verifies model is working correctly
Delete models:
- Click 🗑️ Delete button
- Confirmation dialog
- Permanently removes model
- Frees up disk space
- Requires superadmin role
Metrics displayed:
- Total queries processed
- Average response time
- Success rate percentage
- Memory usage
Future enhancements:
- Query history
- Performance graphs
- Usage trends
- Error rate tracking
Real-time operation tracking:
- Timestamped entries
- All operations logged
- Success/failure indicators
- Detailed error messages
- Auto-scrolls to latest entry
Logged operations:
- Ollama installation
- Version updates
- Model pulls
- Model deletions
- Model tests
- Status checks
All endpoints require authentication. Some require superadmin role.
Auth: Required
Returns: Service status, version, models list
{
"ollama_installed": true,
"ollama_version": "0.1.17",
"api_available": true,
"models_count": 1,
"models": [
{
"name": "llama3.2:3b-instruct",
"size": 2147483648,
"modified_at": "2024-03-04T12:00:00Z"
}
]
}Auth: Required
Returns: Update availability status
{
"update_available": true,
"current_version": "0.1.16",
"latest_version": "0.1.17"
}Auth: Superadmin required
Returns: Update result
{
"success": true,
"output": "Ollama updated successfully..."
}Auth: Superadmin required
Returns: Installation result
{
"success": true,
"output": "Ollama installed successfully..."
}Auth: Required
Body: {"model": "llama3.2:3b-instruct"}
Returns: Pull result
{
"success": true,
"model": "llama3.2:3b-instruct"
}Auth: Superadmin required
Body: {"model": "llama3.2:3b-instruct"}
Returns: Deletion result
{
"success": true,
"model": "llama3.2:3b-instruct"
}Auth: Required
Body: {"model": "llama3.2:3b-instruct"}
Returns: Test result
{
"success": true,
"model": "llama3.2:3b-instruct",
"response_time": 2341,
"sample_output": "SELECT * FROM voters WHERE congressional_district = 'TX-15'..."
}Auth: Required
Returns: Usage statistics
{
"total_queries": 1247,
"avg_response_time": "2.3s",
"success_rate": "98.5%",
"memory_usage": "2.1 GB"
}Authenticated Users:
- View status
- Check for updates
- Pull new models
- Test models
- View statistics
Superadmin Only:
- Install Ollama
- Update Ollama
- Delete models
All operations are logged with:
- Timestamp
- User who performed action
- Operation type
- Success/failure status
- Error details (if failed)
- Click 📦 Install Ollama button
- Wait for installation to complete
- Check action log for progress
- Refresh status after installation
- Check if Ollama service is running:
systemctl status ollama
- Restart service if needed:
systemctl restart ollama
- Refresh status in admin dashboard
- Check action log for error details
- Try manual update via SSH:
curl -fsSL https://ollama.com/install.sh | sh systemctl restart ollama - Refresh admin dashboard
- Check internet connectivity
- Verify model name is correct
- Check disk space (models are 1-5GB)
- Try again or use different model
- Check if model is fully downloaded
- Verify Ollama service is running
- Try restarting Ollama service
- Check action log for error details
- Start with:
llama3.2:3b-instruct(recommended, 2GB) - For low memory:
llama3.2:1b(1GB) - For better quality:
llama3.2:8b-instruct(5GB, slower)
- Check for updates weekly
- Update during low-traffic periods
- Test AI search after updates
- Keep at least one model installed
- Each model: 1-5GB
- Keep 10GB free for operations
- Delete unused models
- Monitor disk usage
- Test models after installation
- Monitor response times
- Check success rates
- Restart service if slow
- Check service status
- Review action log for errors
- Check for Ollama updates
- Review performance stats
- Test models if issues reported
- Clean up unused models
- Review disk space usage
- Update to latest version
- Automatic update scheduling
- Model performance comparison
- Query history viewer
- Usage analytics dashboard
- Email alerts for failures
- Backup/restore configurations
- Multi-model A/B testing
- Custom model fine-tuning
- Slack notifications for updates
- Prometheus metrics export
- Grafana dashboard integration
- Automated health checks
- Load balancing multiple models
- Check action log for error details
- Review troubleshooting section
- Check Ollama documentation: https://ollama.com/docs
- Contact system administrator
Include:
- Screenshot of error
- Action log entries
- Service status details
- Steps to reproduce
Admin Dashboard Ollama Management - Making AI assistant management accessible and easy!