Skip to content

Commit a4732a8

Browse files
seanzhougooglecopybara-github
authored andcommitted
chore: Updatedate the doc string of LiveRequest
activity_start, activity_end , and blob is sent via send_realtime_input, according to the docstring : https://github.com/googleapis/python-genai/blob/d98c757c7d9a88026ac0f9eb2b1b578e2e7f3bfe/google/genai/live.py#L251, they should be send separately, so makes sense they are mutally exclusive. And we already make them exclusive in our current logic: https://github.com/google/adk-python/blob/6c0bf85042c38c7bafe1c183f1bba8bee1ba3570/src/google/adk/flows/llm_flows/base_llm_flow.py#L264-L272, make it clear in docstring Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com> PiperOrigin-RevId: 855492864
1 parent 75231a3 commit a4732a8

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

src/google/adk/agents/live_request_queue.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,29 @@ class LiveRequest(BaseModel):
3030
"""The pydantic model config."""
3131

3232
content: Optional[types.Content] = None
33-
"""If set, send the content to the model in turn-by-turn mode."""
33+
"""If set, send the content to the model in turn-by-turn mode.
34+
35+
When multiple fields are set, they are processed by priority (highest first):
36+
activity_start > activity_end > blob > content.
37+
"""
3438
blob: Optional[types.Blob] = None
35-
"""If set, send the blob to the model in realtime mode."""
39+
"""If set, send the blob to the model in realtime mode.
40+
41+
When multiple fields are set, they are processed by priority (highest first):
42+
activity_start > activity_end > blob > content.
43+
"""
3644
activity_start: Optional[types.ActivityStart] = None
37-
"""If set, signal the start of user activity to the model."""
45+
"""If set, signal the start of user activity to the model.
46+
47+
When multiple fields are set, they are processed by priority (highest first):
48+
activity_start > activity_end > blob > content.
49+
"""
3850
activity_end: Optional[types.ActivityEnd] = None
39-
"""If set, signal the end of user activity to the model."""
51+
"""If set, signal the end of user activity to the model.
52+
53+
When multiple fields are set, they are processed by priority (highest first):
54+
activity_start > activity_end > blob > content.
55+
"""
4056
close: bool = False
4157
"""If set, close the queue. queue.shutdown() is only supported in Python 3.13+."""
4258

0 commit comments

Comments
 (0)