feat: Support interactions API for calling models

Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com>
PiperOrigin-RevId: 843032402
This commit is contained in:
Xiang (Sean) Zhou
2025-12-10 21:21:14 -08:00
committed by Copybara-Service
parent f0bdcaba44
commit c6320caaa5
8 changed files with 2238 additions and 1 deletions
+7
View File
@@ -135,6 +135,13 @@ class LlmResponse(BaseModel):
This field is automatically populated when citation is enabled.
"""
interaction_id: Optional[str] = None
"""The interaction ID from the interactions API.
This field is populated when using the interactions API for model invocation.
It can be used to identify and chain interactions for stateful conversations.
"""
@staticmethod
def create(
generate_content_response: types.GenerateContentResponse,