WebsocketService
Base websocket service with automatic reconnection and error handling.
- class pipecat.services.websocket_service.WebsocketService(*, reconnect_on_error=True, **kwargs)[source]
Bases:
ABC
Base class for websocket-based services with automatic reconnection.
Provides websocket connection management, automatic reconnection with exponential backoff, connection verification, and error handling. Subclasses implement service-specific connection and message handling logic.
- Parameters:
reconnect_on_error (bool) – Whether to automatically reconnect on connection errors.
**kwargs – Additional arguments (unused, for compatibility).