Skip to content

Commit b0131f8

Browse files
IvanLHcopybara-github
authored andcommitted
feat: Added missing FunctionCallResultDelta type and arguments field to the ArgumentDelta type
PiperOrigin-RevId: 914479686
1 parent 1beac80 commit b0131f8

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

google/genai/_interactions/types/step_delta.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
"DeltaMCPServerToolResultResultFunctionResultSubcontentList",
5858
"DeltaFileSearchResult",
5959
"DeltaGoogleMapsResult",
60+
"DeltaFunctionResult",
61+
"DeltaFunctionResultResultFunctionResultSubcontentList",
6062
]
6163

6264

@@ -179,6 +181,8 @@ class DeltaTextAnnotationDelta(BaseModel):
179181
class DeltaArgumentsDelta(BaseModel):
180182
type: Literal["arguments_delta"]
181183

184+
arguments: Optional[str] = None
185+
182186

183187
class DeltaCodeExecutionCall(BaseModel):
184188
arguments: CodeExecutionCallArguments
@@ -310,6 +314,24 @@ class DeltaGoogleMapsResult(BaseModel):
310314
"""A signature hash for backend validation."""
311315

312316

317+
DeltaFunctionResultResultFunctionResultSubcontentList: TypeAlias = Annotated[
318+
Union[TextContent, ImageContent], PropertyInfo(discriminator="type")
319+
]
320+
321+
322+
class DeltaFunctionResult(BaseModel):
323+
call_id: str
324+
"""Required. ID to match the ID from the function call block."""
325+
326+
result: Union[List[DeltaFunctionResultResultFunctionResultSubcontentList], str, object]
327+
328+
type: Literal["function_result"]
329+
330+
is_error: Optional[bool] = None
331+
332+
name: Optional[str] = None
333+
334+
313335
Delta: TypeAlias = Annotated[
314336
Union[
315337
DeltaText,
@@ -333,6 +355,7 @@ class DeltaGoogleMapsResult(BaseModel):
333355
DeltaMCPServerToolResult,
334356
DeltaFileSearchResult,
335357
DeltaGoogleMapsResult,
358+
DeltaFunctionResult,
336359
],
337360
PropertyInfo(discriminator="type"),
338361
]

0 commit comments

Comments
 (0)