Skip to content

Commit 6cd176e

Browse files
google-genai-botcopybara-github
authored andcommitted
feat: update discovery doc
PiperOrigin-RevId: 1003180656
1 parent ddd7d82 commit 6cd176e

1 file changed

Lines changed: 33 additions & 29 deletions

File tree

‎google/genai/types.py‎

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -296,34 +296,34 @@ class SafetyPolicy(_common.CaseInSensitiveEnum):
296296
"""SafetyPolicy"""
297297

298298
SAFETY_POLICY_UNSPECIFIED = 'SAFETY_POLICY_UNSPECIFIED'
299-
"""Unspecified safety policy. This value should not be used."""
299+
"""The safety policy is unspecified."""
300300
FINANCIAL_TRANSACTIONS = 'FINANCIAL_TRANSACTIONS'
301-
"""Financial transactions safety policy."""
301+
"""Policy that restricts financial transactions."""
302302
SENSITIVE_DATA_MODIFICATION = 'SENSITIVE_DATA_MODIFICATION'
303-
"""Sensitive data modification safety policy."""
303+
"""Policy that restricts modification of sensitive data."""
304304
COMMUNICATION_TOOL = 'COMMUNICATION_TOOL'
305-
"""Communication tool safety policy."""
305+
"""Policy that restricts the use of communication tools."""
306306
ACCOUNT_CREATION = 'ACCOUNT_CREATION'
307-
"""Account creation safety policy."""
307+
"""Policy that restricts the creation of accounts."""
308308
DATA_MODIFICATION = 'DATA_MODIFICATION'
309-
"""Data modification safety policy."""
309+
"""Policy that restricts general data modification."""
310310
USER_CONSENT_MANAGEMENT = 'USER_CONSENT_MANAGEMENT'
311-
"""User consent management safety policy."""
311+
"""Policy that restricts user consent management."""
312312
LEGAL_TERMS_AND_AGREEMENTS = 'LEGAL_TERMS_AND_AGREEMENTS'
313-
"""Legal terms and agreements safety policy."""
313+
"""Policy that restricts interaction with legal terms and agreements."""
314314

315315

316316
class Environment(_common.CaseInSensitiveEnum):
317-
"""The environment being operated."""
317+
"""The target environment where the computer use tool operates."""
318318

319319
ENVIRONMENT_UNSPECIFIED = 'ENVIRONMENT_UNSPECIFIED'
320-
"""Defaults to browser."""
320+
"""The environment is unspecified."""
321321
ENVIRONMENT_BROWSER = 'ENVIRONMENT_BROWSER'
322-
"""Operates in a web browser."""
322+
"""The tool operates in a web browser."""
323323
ENVIRONMENT_MOBILE = 'ENVIRONMENT_MOBILE'
324-
"""Operates in a mobile environment."""
324+
"""The tool operates in a mobile environment."""
325325
ENVIRONMENT_DESKTOP = 'ENVIRONMENT_DESKTOP'
326-
"""Operates in a desktop environment."""
326+
"""The tool operates in a desktop environment."""
327327

328328

329329
class PhishBlockThreshold(_common.CaseInSensitiveEnum):
@@ -4574,39 +4574,40 @@ class RetrievalDict(TypedDict, total=False):
45744574

45754575

45764576
class ComputerUse(_common.BaseModel):
4577-
"""Tool to support computer use."""
4577+
"""A tool that enables the model to interact directly with a computer environment."""
45784578

45794579
environment: Optional[Environment] = Field(
4580-
default=None, description="""Required. The environment being operated."""
4580+
default=None,
4581+
description="""Required. The target environment where the computer use tool operates.""",
45814582
)
45824583
excluded_predefined_functions: Optional[list[str]] = Field(
45834584
default=None,
4584-
description="""Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.""",
4585+
description="""Optional. A list of predefined functions to explicitly exclude from the model call. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included. Excluding functions allows for a more restricted action space or custom definitions for predefined functions.""",
45854586
)
45864587
enable_prompt_injection_detection: Optional[bool] = Field(
45874588
default=None,
4588-
description="""Optional. Enables the prompt injection detection check on computer-use request.""",
4589+
description="""Optional. Whether to enable the prompt injection detection check on the computer use request.""",
45894590
)
45904591
disabled_safety_policies: Optional[list[SafetyPolicy]] = Field(
45914592
default=None,
4592-
description="""Optional. Disabled safety policies for computer use.""",
4593+
description="""Optional. A list of safety policies to disable for the computer use tool.""",
45934594
)
45944595

45954596

45964597
class ComputerUseDict(TypedDict, total=False):
4597-
"""Tool to support computer use."""
4598+
"""A tool that enables the model to interact directly with a computer environment."""
45984599

45994600
environment: Optional[Environment]
4600-
"""Required. The environment being operated."""
4601+
"""Required. The target environment where the computer use tool operates."""
46014602

46024603
excluded_predefined_functions: Optional[list[str]]
4603-
"""Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions."""
4604+
"""Optional. A list of predefined functions to explicitly exclude from the model call. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included. Excluding functions allows for a more restricted action space or custom definitions for predefined functions."""
46044605

46054606
enable_prompt_injection_detection: Optional[bool]
4606-
"""Optional. Enables the prompt injection detection check on computer-use request."""
4607+
"""Optional. Whether to enable the prompt injection detection check on the computer use request."""
46074608

46084609
disabled_safety_policies: Optional[list[SafetyPolicy]]
4609-
"""Optional. Disabled safety policies for computer use."""
4610+
"""Optional. A list of safety policies to disable for the computer use tool."""
46104611

46114612

46124613
ComputerUseOrDict = Union[ComputerUse, ComputerUseDict]
@@ -8405,9 +8406,7 @@ class Candidate(_common.BaseModel):
84058406
)
84068407
continuation_token: Optional[bytes] = Field(
84078408
default=None,
8408-
description="""An opaque continuation token returned when `finish_reason` is
8409-
`CONTINUATION`. Pass it in a subsequent request to continue generation.
8410-
""",
8409+
description="""Output only. An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation.""",
84118410
)
84128411

84138412

@@ -8456,9 +8455,7 @@ class CandidateDict(TypedDict, total=False):
84568455
"""Output only. Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL."""
84578456

84588457
continuation_token: Optional[bytes]
8459-
"""An opaque continuation token returned when `finish_reason` is
8460-
`CONTINUATION`. Pass it in a subsequent request to continue generation.
8461-
"""
8458+
"""Output only. An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation."""
84628459

84638460

84648461
CandidateOrDict = Union[Candidate, CandidateDict]
@@ -23273,6 +23270,10 @@ class PredefinedMetricSpec(_common.BaseModel):
2327323270
default=None,
2327423271
description="""The parameters needed to run the pre-defined metric.""",
2327523272
)
23273+
step_autorater_configs: Optional[dict[str, AutoraterConfig]] = Field(
23274+
default=None,
23275+
description="""Optional. Per-step autorater overrides for this predefined metric. Keys are evaluation stage names (snake_case). Valid keys: "intent_extraction", "rubric_generation", "rubric_validation". Unknown keys return INVALID_ARGUMENT.""",
23276+
)
2327623277

2327723278

2327823279
class PredefinedMetricSpecDict(TypedDict, total=False):
@@ -23285,6 +23286,9 @@ class PredefinedMetricSpecDict(TypedDict, total=False):
2328523286
metric_spec_parameters: Optional[dict[str, Any]]
2328623287
"""The parameters needed to run the pre-defined metric."""
2328723288

23289+
step_autorater_configs: Optional[dict[str, AutoraterConfigDict]]
23290+
"""Optional. Per-step autorater overrides for this predefined metric. Keys are evaluation stage names (snake_case). Valid keys: "intent_extraction", "rubric_generation", "rubric_validation". Unknown keys return INVALID_ARGUMENT."""
23291+
2328823292

2328923293
PredefinedMetricSpecOrDict = Union[
2329023294
PredefinedMetricSpec, PredefinedMetricSpecDict

0 commit comments

Comments
 (0)