Fix Sphinx docstring RST formatting warnings

Replace Markdown code blocks with RST syntax in genesys.py, fix
deprecated directive transitions in nvidia and summarization modules,
remove stray bullet prefix in whisper arg docs, restructure code block
in turn completion mixin, and add deepgram mock to Sphinx conf.
This commit is contained in:
Mark Backman
2026-04-03 09:55:27 -04:00
parent 5490820338
commit f078b8b867
8 changed files with 24 additions and 19 deletions

View File

@@ -97,6 +97,8 @@ autodoc_mock_imports = [
"fastapi.middleware",
"fastapi.responses",
"uvicorn",
# Deepgram dependencies
"deepgram",
]
# HTML output settings

View File

@@ -95,8 +95,8 @@ class GenesysAudioHookSerializer(FrameSerializer):
- Text WebSocket frames for JSON control messages
- Binary WebSocket frames for audio data
Example usage:
```python
Example usage::
serializer = GenesysAudioHookSerializer(
params=GenesysAudioHookSerializer.InputParams(
channel=AudioHookChannel.EXTERNAL,
@@ -122,7 +122,6 @@ class GenesysAudioHookSerializer(FrameSerializer):
# Set output variables to return to Architect
serializer.set_output_variables({"intent": "billing", "resolved": True})
```
Attributes:
PROTOCOL_VERSION: The AudioHook protocol version (currently "2").
@@ -246,8 +245,8 @@ class GenesysAudioHookSerializer(FrameSerializer):
Args:
variables: Dictionary of custom variables to send to Genesys.
Example:
```python
Example::
# During the conversation, collect data and set it
serializer.set_output_variables({
"intent": "billing_inquiry",
@@ -255,7 +254,6 @@ class GenesysAudioHookSerializer(FrameSerializer):
"summary": "Customer asked about their bill",
"transfer_to": "billing_queue"
})
```
"""
self._output_variables = variables
logger.debug(f"Output variables set: {variables}")
@@ -413,8 +411,8 @@ class GenesysAudioHookSerializer(FrameSerializer):
Returns:
Dictionary of the closed response message.
Example:
```python
Example::
# Pass custom data back to Genesys
serializer.create_closed_response(
output_variables={
@@ -423,7 +421,6 @@ class GenesysAudioHookSerializer(FrameSerializer):
"summary": "Customer asked about their bill"
}
)
```
"""
parameters: Optional[Dict[str, Any]] = None

View File

@@ -520,8 +520,7 @@ class GoogleTTSSettings(TTSSettings):
speaking_rate: float | None | _NotGiven = field(default_factory=lambda: NOT_GIVEN)
#: .. deprecated:: 0.0.105
#: Use ``GoogleTTSService.Settings`` instead.
#: *Deprecated since 0.0.105:* Use ``GoogleTTSService.Settings`` instead.
GoogleStreamTTSSettings = GoogleTTSSettings

View File

@@ -269,7 +269,9 @@ class NvidiaSTTService(STTService):
.. deprecated:: 0.0.104
Model cannot be changed after initialization for NVIDIA Riva streaming STT.
Set model and function id in the constructor instead, e.g.::
Set model and function id in the constructor instead.
Example::
NvidiaSTTService(
api_key=...,

View File

@@ -163,7 +163,9 @@ class NvidiaTTSService(TTSService):
.. deprecated:: 0.0.104
Model cannot be changed after initialization for NVIDIA Riva TTS.
Set model and function id in the constructor instead, e.g.::
Set model and function id in the constructor instead.
Example::
NvidiaTTSService(
api_key=...,

View File

@@ -168,7 +168,7 @@ class BaseWhisperSTTService(SegmentedSTTService):
include_prob_metrics: If True, enables probability metrics in API response.
Each service implements this differently (see child classes).
Defaults to False.
push_empty_transcripts: - If true, allow empty `TranscriptionFrame` frames to be
push_empty_transcripts: If true, allow empty `TranscriptionFrame` frames to be
pushed downstream instead of discarding them. This is intended for situations
where VAD fires even though the user did not speak. In these cases, it is
useful to know that nothing was transcribed so that the agent can resume

View File

@@ -191,9 +191,7 @@ class UserTurnCompletionLLMServiceMixin:
When incomplete timeouts expire, the mixin automatically prompts the LLM
with a contextual follow-up message to re-engage the user.
Usage:
The LLM service controls when to use turn completion by calling
_push_turn_text instead of push_frame:
Usage example::
# With turn completion:
if self._filter_incomplete_user_turns:
@@ -201,7 +199,10 @@ class UserTurnCompletionLLMServiceMixin:
else:
await self.push_frame(LLMTextFrame(chunk.text))
The mixin requires that the base class has a `push_frame` method compatible
The LLM service controls when to use turn completion by calling
``_push_turn_text`` instead of ``push_frame``.
The mixin requires that the base class has a ``push_frame`` method compatible
with FrameProcessor's signature.
"""

View File

@@ -168,7 +168,9 @@ class LLMContextSummarizationConfig:
.. deprecated:: 0.0.104
Use :class:`LLMAutoContextSummarizationConfig` with a nested
:class:`LLMContextSummaryConfig` instead::
:class:`LLMContextSummaryConfig` instead.
Example::
LLMAutoContextSummarizationConfig(
max_context_tokens=8000,