Skip to content
Open
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
6 changes: 3 additions & 3 deletions google/genai/_interactions/types/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ class URLContext(BaseModel):
class ComputerUse(BaseModel):
"""A tool that can be used by the model to interact with the computer."""

type: Literal["computer_use"]

environment: Optional[Literal["browser"]] = None
environment: Literal["browser"]
"""The environment being operated."""

type: Literal["computer_use"]

excluded_predefined_functions: Optional[List[str]] = FieldInfo(alias="excludedPredefinedFunctions", default=None)
"""The list of predefined functions that are excluded from the model call."""

Expand Down
6 changes: 3 additions & 3 deletions google/genai/_interactions/types/tool_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ class URLContext(TypedDict, total=False):
class ComputerUse(TypedDict, total=False):
"""A tool that can be used by the model to interact with the computer."""

type: Required[Literal["computer_use"]]

environment: Literal["browser"]
environment: Required[Literal["browser"]]
"""The environment being operated."""

type: Required[Literal["computer_use"]]

excluded_predefined_functions: Annotated[SequenceNotStr[str], PropertyInfo(alias="excludedPredefinedFunctions")]
"""The list of predefined functions that are excluded from the model call."""

Expand Down