Clarify discrete vs continuous contrast in WebsocketLLMService docstring

This commit is contained in:
Paul Kompfner
2026-03-30 23:46:23 -04:00
parent 77cfb181f6
commit f2b3f87661

View File

@@ -1004,11 +1004,13 @@ class WebsocketReconnectedError(Exception):
class WebsocketLLMService(LLMService, WebsocketService): class WebsocketLLMService(LLMService, WebsocketService):
"""Base class for websocket-based LLM services. """Base class for websocket-based LLM services.
Each inference is a self-contained exchange: send a request, receive Each LLM inference is a discrete request/response exchange: send one
events inline until a terminal event, then move on to the next. request, receive events inline until a terminal event, then wait for
Unlike ``WebsocketTTSService`` / ``WebsocketSTTService`` which run a the next frame to trigger an inference. This contrasts with
continuous background receive loop (``_receive_task_handler``), this ``WebsocketTTSService`` / ``WebsocketSTTService`` which stream data
class does **not** start one. continuously via a background receive loop
(``_receive_task_handler``). This class does **not** start a
background receive loop.
Provides connection lifecycle management (connect on start, disconnect Provides connection lifecycle management (connect on start, disconnect
on stop/cancel), automatic reconnection with exponential backoff, and on stop/cancel), automatic reconnection with exponential backoff, and