Documentation/Troubleshooting

Troubleshooting Guide

Solutions to common issues and debugging tips for Sensei AI Assistant.

Common Issues

Debug Checklist
Systematic approach to identifying issues

1. Check Browser Console

// Open browser console (F12) and look for:
- JavaScript errors
- Failed network requests
- CORS issues
- Missing resources

2. Verify API Endpoints

// Test chat API
curl -X POST https://sensei-ai-eight.vercel.app/api/chat \
  -H "Content-Type: application/json" \
  -d '{"clientId": "YOUR_CLIENT_ID", "message": "test"}'

3. Check Database

-- Check if client exists
SELECT * FROM clients WHERE id = 'YOUR_CLIENT_ID';

-- Check document count
SELECT COUNT(*) FROM documents WHERE client_id = 'YOUR_CLIENT_ID';

-- Check recent chat sessions
SELECT * FROM chat_sessions 
WHERE client_id = 'YOUR_CLIENT_ID' 
ORDER BY created_at DESC LIMIT 5;
Still Need Help?

If you're still experiencing issues after trying these solutions:

1.
Gather Information:
  • • Browser console errors
  • • Network request details
  • • Steps to reproduce
  • • Environment details
2.
Check Resources:
  • • Review the API documentation
  • • Check the FAQ section
  • • Search existing issues
3.
Contact Support:

Create a detailed issue report with all gathered information