Skip to content

Commit 4bdde3a

Browse files
MarkDaoustcopybara-github
authored andcommitted
feat(interactions): declare continuation_ids on Interaction
Declare continuation_ids (continuationIds / ContinuationIds) on the Interaction model across the Interactions SDKs so callers receive None / null / nil / undefined when automatic continuation is not active instead of missing-attribute errors, with full static type-checking support. PiperOrigin-RevId: 1008986075
1 parent 6e80d42 commit 4bdde3a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎google/genai/_gaos/types/interactions/interaction.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ class InteractionTypedDict(TypedDict):
167167
r"""Configuration parameters for the agent interaction."""
168168
cached_content: NotRequired[str]
169169
r"""The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: cachedContents/{cachedContent}"""
170+
continuation_ids: NotRequired[List[str]]
171+
r"""The IDs of all server interactions merged into this response when automatic continuation is enabled, in order (ending with the final hop's ID).
172+
173+
Note: this is added by the SDK.
174+
"""
170175
continuation_token: NotRequired[str]
171176
r"""Opaque token to resume a long decode. Output: set when status is
172177
REQUIRES_CONTINUATION and decoding can be resumed. Input: pass the latest
@@ -263,6 +268,12 @@ class Interaction(BaseModel):
263268
] = None
264269
r"""The name of the cached content used as context to serve the prediction. Note: only used in explicit caching, where users can have control over caching (e.g. what content to cache) and enjoy guaranteed cost savings. Format: cachedContents/{cachedContent}"""
265270

271+
continuation_ids: Optional[List[str]] = None
272+
r"""The IDs of all server interactions merged into this response when automatic continuation is enabled, in order (ending with the final hop's ID).
273+
274+
Note: this is added by the SDK.
275+
"""
276+
266277
continuation_token: Optional[str] = None
267278
r"""Opaque token to resume a long decode. Output: set when status is
268279
REQUIRES_CONTINUATION and decoding can be resumed. Input: pass the latest
@@ -380,6 +391,7 @@ def _serialize_model(self, handler):
380391
"agent",
381392
"agent_config",
382393
"cached_content",
394+
"continuation_ids",
383395
"continuation_token",
384396
"created",
385397
"environment",

0 commit comments

Comments
 (0)