Amplitica Logo
SalesAI v0.1.0
© 2025 Amplitica s.r.o.

SalesAI

SETTINGS

System Settings & Diagnostics

Configure your SalesAI system settings and run diagnostics tests.

API Configuration

This is the base URL for API requests. Edit in services/api.js to change.

WebSocket connection URL. Edit in utils/websocket.js to change.

When enabled, the application will not attempt to use WebSockets and will fall back to HTTP requests.

When enabled, the application will automatically attempt to reconnect WebSockets when connections are lost.

API Token: No token

WebSocket Connection Diagnostics

WebSocket Status:
Unknown

If WebSocket connections are failing, check the following:

  • Make sure the backend server is running at http://localhost:8000
  • Verify the WebSocket endpoint is properly configured on the server
  • Ensure your authentication token is valid
  • Check for network restrictions blocking WebSocket connections
  • If using HTTPS, make sure the server supports secure WebSockets (WSS)
  • Confirm the server has CORS configured to allow your origin

System Requirements

Backend API Requirements

For the WebSocket chat functionality to work properly, the following backend components must be configured:

  • WebSocket Endpoint: The backend must expose a WebSocket endpoint at http:localhost/ws/chat/{conversation_id}
  • Authentication: The WebSocket endpoint must accept JWT authentication via ?token=[JWT_TOKEN] query parameter
  • Message Format: The WebSocket server must accept and send messages in the following format:
    {
      "type": "message",
      "content": "Hello world"
    }
                                
  • Typing Indicators: The WebSocket server must accept typing status updates in the following format:
    {
      "type": "typing",
      "is_typing": true
    }
                                
  • CORS Configuration: If your frontend is hosted on a different domain than the backend, the WebSocket server must be configured to accept cross-origin requests.

Troubleshooting

  • Error 1006: This usually indicates that the WebSocket server is not available or reachable. Verify that the backend server is running and that the WebSocket endpoint is properly configured.
  • HTTPS to WS: If your frontend is using HTTPS, your WebSocket connection must use WSS (WebSocket Secure). Regular WS connections from HTTPS pages will be blocked by the browser.
  • HTTP Fallback: Even if WebSockets are not available, the application will automatically fall back to using HTTP requests for message sending and retrieval.