Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions google/genai/_gaos/resources/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
from ...types.interactions.model import Model
from ...types.interactions.modeloutputstep import ModelOutputStep
from ...types.interactions.placecitation import PlaceCitation
from ...types.interactions.processingcallstep import ProcessingCallStep
from ...types.interactions.processingresultstep import ProcessingResultStep
from ...types.interactions.retrievalcallarguments import RetrievalCallArguments
from ...types.interactions.retrievalcalldelta import RetrievalCallDelta
from ...types.interactions.retrievalresultdelta import RetrievalResultDelta
Expand Down Expand Up @@ -186,6 +188,8 @@
"Model",
"ModelOutputStep",
"PlaceCitation",
"ProcessingCallStep",
"ProcessingResultStep",
"RetrievalCallArguments",
"RetrievalCallDelta",
"RetrievalResultDelta",
Expand Down
10 changes: 10 additions & 0 deletions google/genai/_gaos/types/interactions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,12 @@
)
from .placecitation import PlaceCitation, PlaceCitationParam
from .processingcalldelta import ProcessingCallDelta, ProcessingCallDeltaTypedDict
from .processingcallstep import ProcessingCallStep, ProcessingCallStepParam
from .processingresultdelta import (
ProcessingResultDelta,
ProcessingResultDeltaTypedDict,
)
from .processingresultstep import ProcessingResultStep, ProcessingResultStepParam
from .ragresource import RagResource, RagResourceParam
from .ragretrievalconfig import RagRetrievalConfig, RagRetrievalConfigParam
from .ragstoreconfig import RagStoreConfig, RagStoreConfigParam
Expand Down Expand Up @@ -672,10 +674,14 @@
"Processing",
"ProcessingCallDelta",
"ProcessingCallDeltaTypedDict",
"ProcessingCallStep",
"ProcessingCallStepParam",
"ProcessingEnum",
"ProcessingParam",
"ProcessingResultDelta",
"ProcessingResultDeltaTypedDict",
"ProcessingResultStep",
"ProcessingResultStepParam",
"RagResource",
"RagResourceParam",
"RagRetrievalConfig",
Expand Down Expand Up @@ -1074,8 +1080,12 @@
"PlaceCitationParam": ".placecitation",
"ProcessingCallDelta": ".processingcalldelta",
"ProcessingCallDeltaTypedDict": ".processingcalldelta",
"ProcessingCallStep": ".processingcallstep",
"ProcessingCallStepParam": ".processingcallstep",
"ProcessingResultDelta": ".processingresultdelta",
"ProcessingResultDeltaTypedDict": ".processingresultdelta",
"ProcessingResultStep": ".processingresultstep",
"ProcessingResultStepParam": ".processingresultstep",
"RagResource": ".ragresource",
"RagResourceParam": ".ragresource",
"RagRetrievalConfig": ".ragretrievalconfig",
Expand Down
85 changes: 85 additions & 0 deletions google/genai/_gaos/types/interactions/processingcallstep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .. import (
Base64EncodedString,
Base64FileInput,
BaseModel,
UNSET_SENTINEL,
)
from ...utils import validate_const
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import AfterValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class ProcessingCallStepParam(TypedDict):
r"""A server-initiated processing step for media analysis (e.g. video
understanding).
"""

id: str
r"""Required. A unique ID for this specific tool call."""
signature: NotRequired[Union[str, Base64FileInput]]
r"""A signature hash for backend validation."""
type: Literal["processing_call"]


class ProcessingCallStep(BaseModel):
r"""A server-initiated processing step for media analysis (e.g. video
understanding).
"""

id: str
r"""Required. A unique ID for this specific tool call."""

signature: Optional[Base64EncodedString] = None
r"""A signature hash for backend validation."""

type: Annotated[
Annotated[
Literal["processing_call"],
AfterValidator(validate_const("processing_call")),
],
pydantic.Field(alias="type"),
] = "processing_call"

@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["signature"])
serialized = handler(self)
m = {}

for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))

if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val

return m


try:
ProcessingCallStep.model_rebuild()
except NameError:
pass
81 changes: 81 additions & 0 deletions google/genai/_gaos/types/interactions/processingresultstep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# pyformat: disable

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .. import (
Base64EncodedString,
Base64FileInput,
BaseModel,
UNSET_SENTINEL,
)
from ...utils import validate_const
import pydantic
from pydantic import model_serializer
from pydantic.functional_validators import AfterValidator
from typing import Literal, Optional, Union
from typing_extensions import Annotated, NotRequired, TypedDict


class ProcessingResultStepParam(TypedDict):
r"""The result of a server-initiated media processing step."""

call_id: str
r"""Required. ID to match the ID from the function call block."""
signature: NotRequired[Union[str, Base64FileInput]]
r"""A signature hash for backend validation."""
type: Literal["processing_result"]


class ProcessingResultStep(BaseModel):
r"""The result of a server-initiated media processing step."""

call_id: str
r"""Required. ID to match the ID from the function call block."""

signature: Optional[Base64EncodedString] = None
r"""A signature hash for backend validation."""

type: Annotated[
Annotated[
Literal["processing_result"],
AfterValidator(validate_const("processing_result")),
],
pydantic.Field(alias="type"),
] = "processing_result"

@model_serializer(mode="wrap")
def serialize_model(self, handler):
optional_fields = set(["signature"])
serialized = handler(self)
m = {}

for n, f in type(self).model_fields.items():
k = f.alias or n
val = serialized.get(k, serialized.get(n))

if val != UNSET_SENTINEL:
if val is not None or k not in optional_fields:
m[k] = val

return m


try:
ProcessingResultStep.model_rebuild()
except NameError:
pass
10 changes: 9 additions & 1 deletion google/genai/_gaos/types/interactions/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
MCPServerToolResultStepParam,
)
from .modeloutputstep import ModelOutputStep, ModelOutputStepParam
from .processingcallstep import ProcessingCallStep, ProcessingCallStepParam
from .processingresultstep import ProcessingResultStep, ProcessingResultStepParam
from .thoughtstep import ThoughtStep, ThoughtStepParam
from .urlcontextcallstep import URLContextCallStep, URLContextCallStepParam
from .urlcontextresultstep import URLContextResultStep, URLContextResultStepParam
Expand All @@ -57,9 +59,11 @@
FileSearchCallStepParam,
FileSearchResultStepParam,
ThoughtStepParam,
ProcessingResultStepParam,
ProcessingCallStepParam,
FunctionCallStepParam,
GoogleMapsCallStepParam,
GoogleMapsResultStepParam,
GoogleMapsCallStepParam,
CodeExecutionCallStepParam,
URLContextCallStepParam,
GoogleSearchCallStepParam,
Expand Down Expand Up @@ -98,6 +102,8 @@ class UnknownStep(BaseModel):
"mcp_server_tool_call": MCPServerToolCallStep,
"mcp_server_tool_result": MCPServerToolResultStep,
"model_output": ModelOutputStep,
"processing_call": ProcessingCallStep,
"processing_result": ProcessingResultStep,
"thought": ThoughtStep,
"url_context_call": URLContextCallStep,
"url_context_result": URLContextResultStep,
Expand All @@ -120,6 +126,8 @@ class UnknownStep(BaseModel):
MCPServerToolCallStep,
MCPServerToolResultStep,
ModelOutputStep,
ProcessingCallStep,
ProcessingResultStep,
ThoughtStep,
URLContextCallStep,
URLContextResultStep,
Expand Down
Loading