You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8d7e8cd
Browse filesBrowse the repository at this point in the historyBrowse files
chore: Remove SdkClassPatch config that only repeats the discovery docs
Some class and field descriptions now match the API reference.
FUTURE_COPYBARA_INTEGRATE_REVIEW=#3249 from googleapis:release-please--branches--main 4b4b0f3
PiperOrigin-RevId: 1015939709
"""Token generation reached a natural stopping point or a configured stop sequence."""
527
+
"""The model reached a natural stopping point or a configured stop sequence."""
527
528
MAX_TOKENS = 'MAX_TOKENS'
528
-
"""Token generation reached the configured maximum output tokens."""
529
+
"""The model generated the maximum number of tokens allowed by the `max_output_tokens` parameter."""
529
530
SAFETY = 'SAFETY'
530
-
"""Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][] is empty if content filters blocks the output."""
531
+
"""The model stopped generating because the content potentially violates safety policies. NOTE: When streaming, the `content` field is empty if content filters block the output."""
531
532
RECITATION = 'RECITATION'
532
-
"""The token generation stopped because of potential recitation."""
533
+
"""The model stopped generating because the content may be a recitation from a source."""
533
534
LANGUAGE = 'LANGUAGE'
534
-
"""The token generation stopped because of using an unsupported language."""
535
+
"""The response candidate content was flagged for using an unsupported language. This enum value is not supported in Vertex AI."""
535
536
OTHER = 'OTHER'
536
-
"""All other reasons that stopped the token generation."""
537
+
"""The model stopped generating for a reason not otherwise specified."""
537
538
BLOCKLIST = 'BLOCKLIST'
538
-
"""Token generation stopped because the content contains forbidden terms."""
539
+
"""The model stopped generating because the content contains a term from a configured blocklist."""
539
540
PROHIBITED_CONTENT = 'PROHIBITED_CONTENT'
540
-
"""Token generation stopped for potentially containing prohibited content."""
541
+
"""The model stopped generating because the content may be prohibited."""
541
542
SPII = 'SPII'
542
-
"""Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII)."""
543
+
"""The model stopped generating because the content may contain sensitive personally identifiable information (SPII)."""
"""Image generation stopped because the generated images have prohibited content."""
549
+
"""The generated image may contain prohibited content."""
550
+
IMAGE_OTHER = 'IMAGE_OTHER'
551
+
"""The image generation stopped for a reason not otherwise specified."""
553
552
NO_IMAGE = 'NO_IMAGE'
554
-
"""The model was expected to generate an image, but none was generated."""
553
+
"""The model was expected to generate an image, but didn't."""
555
554
IMAGE_RECITATION = 'IMAGE_RECITATION'
556
-
"""Image generation stopped because the generated image may be a recitation from a source."""
557
-
IMAGE_OTHER = 'IMAGE_OTHER'
558
-
"""Image generation stopped for a reason not otherwise specified."""
559
-
CONTINUATION = 'CONTINUATION'
560
-
"""Token generation stopped because the response reached the per-request token limit, but generation is not yet complete. The response can be continued by passing the returned `continuation_token` in a subsequent request."""
555
+
"""The generated image may be a recitation from a source."""
556
+
UNEXPECTED_TOOL_CALL = 'UNEXPECTED_TOOL_CALL'
557
+
"""The model generated a function call that is semantically invalid. This can happen, for example, if function calling is not enabled or the generated function is not in the function declaration."""
558
+
TOO_MANY_TOOL_CALLS = 'TOO_MANY_TOOL_CALLS'
559
+
"""The model made too many tool calls in a single request, so the server-side tool loop stopped before the model returned a final answer."""
"""Request has at least one thought signature missing. This enum value is not supported in Vertex AI."""
561
562
MALFORMED_RESPONSE = 'MALFORMED_RESPONSE'
562
-
"""Token generation stopped because the response was malformed."""
563
+
"""Finishes due to malformed response."""
564
+
ESCALATION = 'ESCALATION'
565
+
"""Request was filtered by an escalation rule. This enum value is not supported in Vertex AI."""
566
+
PUP_LIMITED_DISABLED = 'PUP_LIMITED_DISABLED'
567
+
"""Indicates that token generation stopped because the user account is limited or disabled due to Prohibited Use Policy (PUP) violations. This enum value is not supported in Vertex AI."""
568
+
CONTINUATION = 'CONTINUATION'
569
+
"""Token generation was stopped because the response reached the per-request token limit, but generation is not yet complete. The model response can be continued via a subsequent request using the returned `continuation_token`."""
570
+
MODEL_ARMOR = 'MODEL_ARMOR'
571
+
"""The model response was blocked by Model Armor. This enum value is not supported in Gemini API."""
563
572
564
573
565
574
class HarmProbability(_common.CaseInSensitiveEnum):
@@ -843,14 +852,24 @@ class MatchOperation(_common.CaseInSensitiveEnum):
843
852
844
853
845
854
class ReinforcementTuningThinkingLevel(_common.CaseInSensitiveEnum):
846
-
"""Represents how much to think for the tuning job."""
855
+
"""Indicates the maximum thinking depth during tuning.
856
+
857
+
Starting from Gemini 3.5 models, the old thinking_budget will no longer be
858
+
supported and will result in a user error if set. Instead, users should use
859
+
the thinking_level parameter to control the maximum thinking depth. This enum
description="""Optional. Score indicating how likely information from google
8045
-
search could help answer the prompt. The score is in the range [0, 1],
8046
-
where 0 is the least likely and 1 is the most likely. This score is only
8047
-
populated when google search grounding and dynamic retrieval is enabled.
8048
-
It will be compared to the threshold to determine whether to trigger
8049
-
Google search.""",
8066
+
description="""Optional. A score indicating how likely it is that a Google Search query could help answer the prompt. The score is in the range of `[0, 1]`. A score of 1 means the model is confident that a search will be helpful, and 0 means it is not. This score is populated only when Google Search grounding and dynamic retrieval are enabled. The score is used to determine whether to trigger a search.""",
8050
8067
)
8051
8068
8052
8069
8053
8070
class RetrievalMetadataDict(TypedDict, total=False):
8054
-
"""Metadata returned to client when grounding is enabled."""
8071
+
"""Metadata related to the retrieval grounding source.
8072
+
8073
+
This is part of the `GroundingMetadata` returned when grounding is enabled.
"""Optional. Score indicating how likely information from google
8058
-
search could help answer the prompt. The score is in the range [0, 1],
8059
-
where 0 is the least likely and 1 is the most likely. This score is only
8060
-
populated when google search grounding and dynamic retrieval is enabled.
8061
-
It will be compared to the threshold to determine whether to trigger
8062
-
Google search."""
8077
+
"""Optional. A score indicating how likely it is that a Google Search query could help answer the prompt. The score is in the range of `[0, 1]`. A score of 1 means the model is confident that a search will be helpful, and 0 means it is not. This score is populated only when Google Search grounding and dynamic retrieval are enabled. The score is used to determine whether to trigger a search."""
"""The entry point used to search for grounding sources."""
8084
+
"""An entry point for displaying Google Search results.
8085
+
8086
+
A `SearchEntryPoint` is populated when the grounding source for a model's
8087
+
response is Google Search. It provides information that you can use to display
8088
+
the search results in your application.
8089
+
"""
8070
8090
8071
8091
rendered_content: Optional[str] = Field(
8072
8092
default=None,
8073
-
description="""Optional. Web content snippet that can be embedded in a web page
8074
-
or an app webview.""",
8093
+
description="""Optional. An HTML snippet that can be embedded in a web page or an application's webview. This snippet displays a search result, including the title, URL, and a brief description of the search result.""",
8075
8094
)
8076
8095
sdk_blob: Optional[bytes] = Field(
8077
8096
default=None,
8078
-
description="""Optional. JSON representing array of tuples.""",
8097
+
description="""Optional. A base64-encoded JSON object that contains a list of search queries and their corresponding search URLs. This information can be used to build a custom search UI.""",
8079
8098
)
8080
8099
8081
8100
8082
8101
class SearchEntryPointDict(TypedDict, total=False):
8083
-
"""The entry point used to search for grounding sources."""
8102
+
"""An entry point for displaying Google Search results.
8103
+
8104
+
A `SearchEntryPoint` is populated when the grounding source for a model's
8105
+
response is Google Search. It provides information that you can use to display
8106
+
the search results in your application.
8107
+
"""
8084
8108
8085
8109
rendered_content: Optional[str]
8086
-
"""Optional. Web content snippet that can be embedded in a web page
8087
-
or an app webview."""
8110
+
"""Optional. An HTML snippet that can be embedded in a web page or an application's webview. This snippet displays a search result, including the title, URL, and a brief description of the search result."""
8088
8111
8089
8112
sdk_blob: Optional[bytes]
8090
-
"""Optional. JSON representing array of tuples."""
8113
+
"""Optional. A base64-encoded JSON object that contains a list of search queries and their corresponding search URLs. This information can be used to build a custom search UI."""
description="""How much this single reward contributes to the total overall reward. Total reward is a linear combination of single rewards with their corresponding weights, i.e., ``` total_reward = ( weight_a * reward_a + weight_b * reward_b + ... ) / (weight_a + weight_b + ...) ```""",
13785
-
)
13786
-
13787
-
13788
-
class CompositeReinforcementTuningRewardConfigWeightedRewardConfigDict(
"""How much this single reward contributes to the total overall reward. Total reward is a linear combination of single rewards with their corresponding weights, i.e., ``` total_reward = ( weight_a * reward_a + weight_b * reward_b + ... ) / (weight_a + weight_b + ...) ```"""
description="""How much this single reward contributes to the total overall reward. Total reward is a linear combination of single rewards with their corresponding weights, i.e., ``` total_reward = ( weight_a * reward_a + weight_b * reward_b + ... ) / (weight_a + weight_b + ...) ```""",
13903
+
)
13904
+
13905
+
13906
+
class CompositeReinforcementTuningRewardConfigWeightedRewardConfigDict(
13907
+
TypedDict, total=False
13908
+
):
13909
+
"""Reward function configuration with a weight.
13910
+
13911
+
The weight is used to combine the reward with other rewards. This data type is
"""How much this single reward contributes to the total overall reward. Total reward is a linear combination of single rewards with their corresponding weights, i.e., ``` total_reward = ( weight_a * reward_a + weight_b * reward_b + ... ) / (weight_a + weight_b + ...) ```"""
0 commit comments