Merge pull request #2774 from pipecat-ai/mb/docs-fixes-0.0.87

Fix: Resolve docstring build issues before 0.0.87 release
This commit is contained in:
Mark Backman
2025-10-02 12:34:27 -04:00
committed by GitHub
5 changed files with 58 additions and 44 deletions

View File

@@ -130,9 +130,11 @@ class PipelineTask(BasePipelineTask):
- on_pipeline_finished: Called after the pipeline has reached any terminal state. - on_pipeline_finished: Called after the pipeline has reached any terminal state.
This includes: This includes:
- StopFrame: pipeline was stopped (processors keep connections open) - StopFrame: pipeline was stopped (processors keep connections open)
- EndFrame: pipeline ended normally - EndFrame: pipeline ended normally
- CancelFrame: pipeline was cancelled - CancelFrame: pipeline was cancelled
Use this event for cleanup, logging, or post-processing tasks. Users can inspect Use this event for cleanup, logging, or post-processing tasks. Users can inspect
the frame if they need to handle specific cases. the frame if they need to handle specific cases.

View File

@@ -99,29 +99,41 @@ async def parse_telephony_websocket(websocket: WebSocket):
tuple: (transport_type: str, call_data: dict) tuple: (transport_type: str, call_data: dict)
call_data contains provider-specific fields: call_data contains provider-specific fields:
- Twilio: {
"stream_id": str, - Twilio::
"call_id": str,
"body": dict {
} "stream_id": str,
- Telnyx: { "call_id": str,
"stream_id": str, "body": dict
"call_control_id": str, }
"outbound_encoding": str,
"from": str, - Telnyx::
"to": str,
} {
- Plivo: { "stream_id": str,
"stream_id": str, "call_control_id": str,
"call_id": str, "outbound_encoding": str,
} "from": str,
- Exotel: { "to": str,
"stream_id": str, }
"call_id": str,
"account_sid": str, - Plivo::
"from": str,
"to": str, {
} "stream_id": str,
"call_id": str,
}
- Exotel::
{
"stream_id": str,
"call_id": str,
"account_sid": str,
"from": str,
"to": str,
}
Example usage:: Example usage::

View File

@@ -79,7 +79,7 @@ class DeepgramFluxSTTService(WebsocketSTTService):
This class defines all available connection parameters for the Deepgram Flux API This class defines all available connection parameters for the Deepgram Flux API
based on the official documentation. based on the official documentation.
Attributes: Parameters:
eager_eot_threshold: Optional. EagerEndOfTurn/TurnResumed are off by default. eager_eot_threshold: Optional. EagerEndOfTurn/TurnResumed are off by default.
You can turn them on by setting eager_eot_threshold to a valid value. You can turn them on by setting eager_eot_threshold to a valid value.
Lower values = more aggressive EagerEndOfTurning (faster response, more LLM calls). Lower values = more aggressive EagerEndOfTurning (faster response, more LLM calls).
@@ -126,24 +126,24 @@ class DeepgramFluxSTTService(WebsocketSTTService):
If None, default parameters will be used. If None, default parameters will be used.
**kwargs: Additional arguments passed to the parent WebsocketSTTService class. **kwargs: Additional arguments passed to the parent WebsocketSTTService class.
Example: Examples:
```python Basic usage with default parameters::
# Basic usage with default parameters
stt = DeepgramFluxSTTService(api_key="your-api-key")
# Advanced usage with custom parameters stt = DeepgramFluxSTTService(api_key="your-api-key")
params = DeepgramFluxSTTService.InputParams(
eager_eot_threshold=0.5, Advanced usage with custom parameters::
eot_threshold=0.8,
keyterm=["AI", "machine learning", "neural network"], params = DeepgramFluxSTTService.InputParams(
tag=["production", "voice-agent"] eager_eot_threshold=0.5,
) eot_threshold=0.8,
stt = DeepgramFluxSTTService( keyterm=["AI", "machine learning", "neural network"],
api_key="your-api-key", tag=["production", "voice-agent"]
model="flux-general-en", )
params=params stt = DeepgramFluxSTTService(
) api_key="your-api-key",
``` model="flux-general-en",
params=params
)
""" """
super().__init__(sample_rate=sample_rate, **kwargs) super().__init__(sample_rate=sample_rate, **kwargs)

View File

@@ -354,10 +354,10 @@ class LiveKitTransportClient:
logger.error(f"Error sending data: {e}") logger.error(f"Error sending data: {e}")
async def send_dtmf(self, digit: str): async def send_dtmf(self, digit: str):
"""Send DTMF tone to the room. r"""Send DTMF tone to the room.
Args: Args:
digit: The DTMF digit to send (0-9, *, #). digit: The DTMF digit to send (0-9, \*, #).
""" """
if not self._connected: if not self._connected:
return return

View File

@@ -29,7 +29,7 @@ class EventHandler:
This data class stores the event name, a list of handlers to run for this This data class stores the event name, a list of handlers to run for this
event, and whether these handlers will be executed in a task. event, and whether these handlers will be executed in a task.
Attributes: Parameters:
name (str): The name of the event handler. name (str): The name of the event handler.
handlers (List[Any]): A list of functions to be called when this event is triggered. handlers (List[Any]): A list of functions to be called when this event is triggered.
is_sync (bool): Indicates whether the functions are executed in a task. is_sync (bool): Indicates whether the functions are executed in a task.