From f2b3f8766127f075287299f9923694877b2f8daa Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Mon, 30 Mar 2026 23:46:23 -0400 Subject: [PATCH] Clarify discrete vs continuous contrast in WebsocketLLMService docstring --- src/pipecat/services/llm_service.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pipecat/services/llm_service.py b/src/pipecat/services/llm_service.py index ff68e177a..66736f506 100644 --- a/src/pipecat/services/llm_service.py +++ b/src/pipecat/services/llm_service.py @@ -1004,11 +1004,13 @@ class WebsocketReconnectedError(Exception): class WebsocketLLMService(LLMService, WebsocketService): """Base class for websocket-based LLM services. - Each inference is a self-contained exchange: send a request, receive - events inline until a terminal event, then move on to the next. - Unlike ``WebsocketTTSService`` / ``WebsocketSTTService`` which run a - continuous background receive loop (``_receive_task_handler``), this - class does **not** start one. + Each LLM inference is a discrete request/response exchange: send one + request, receive events inline until a terminal event, then wait for + the next frame to trigger an inference. This contrasts with + ``WebsocketTTSService`` / ``WebsocketSTTService`` which stream data + 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 on stop/cancel), automatic reconnection with exponential backoff, and