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 b07a895
Browse filesBrowse the repository at this point in the historyBrowse files
"""Token generation reached a natural stopping point or a configured stop sequence."""
533
+
"""The model reached a natural stopping point or a configured stop sequence."""
529
534
MAX_TOKENS = 'MAX_TOKENS'
530
-
"""Token generation reached the configured maximum output tokens."""
535
+
"""The model generated the maximum number of tokens allowed by the `max_output_tokens` parameter."""
531
536
SAFETY = 'SAFETY'
532
-
"""Token generation stopped because the content potentially contains safety violations. NOTE: When streaming, [content][] is empty if content filters blocks the output."""
537
+
"""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."""
533
538
RECITATION = 'RECITATION'
534
-
"""The token generation stopped because of potential recitation."""
539
+
"""The model stopped generating because the content may be a recitation from a source."""
535
540
LANGUAGE = 'LANGUAGE'
536
-
"""The token generation stopped because of using an unsupported language."""
541
+
"""The response candidate content was flagged for using an unsupported language. This enum value is not supported in Vertex AI."""
537
542
OTHER = 'OTHER'
538
-
"""All other reasons that stopped the token generation."""
543
+
"""The model stopped generating for a reason not otherwise specified."""
539
544
BLOCKLIST = 'BLOCKLIST'
540
-
"""Token generation stopped because the content contains forbidden terms."""
545
+
"""The model stopped generating because the content contains a term from a configured blocklist."""
541
546
PROHIBITED_CONTENT = 'PROHIBITED_CONTENT'
542
-
"""Token generation stopped for potentially containing prohibited content."""
547
+
"""The model stopped generating because the content may be prohibited."""
543
548
SPII = 'SPII'
544
-
"""Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII)."""
549
+
"""The model stopped generating because the content may contain sensitive personally identifiable information (SPII)."""
"""Image generation stopped because the generated images have prohibited content."""
555
+
"""The generated image may contain prohibited content."""
556
+
IMAGE_OTHER = 'IMAGE_OTHER'
557
+
"""The image generation stopped for a reason not otherwise specified."""
555
558
NO_IMAGE = 'NO_IMAGE'
556
-
"""The model was expected to generate an image, but none was generated."""
559
+
"""The model was expected to generate an image, but didn't."""
557
560
IMAGE_RECITATION = 'IMAGE_RECITATION'
558
-
"""Image generation stopped because the generated image may be a recitation from a source."""
559
-
IMAGE_OTHER = 'IMAGE_OTHER'
560
-
"""Image generation stopped for a reason not otherwise specified."""
561
-
CONTINUATION = 'CONTINUATION'
562
-
"""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."""
561
+
"""The generated image may be a recitation from a source."""
562
+
UNEXPECTED_TOOL_CALL = 'UNEXPECTED_TOOL_CALL'
563
+
"""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."""
564
+
TOO_MANY_TOOL_CALLS = 'TOO_MANY_TOOL_CALLS'
565
+
"""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."""
563
568
MALFORMED_RESPONSE = 'MALFORMED_RESPONSE'
564
-
"""Token generation stopped because the response was malformed."""
569
+
"""Finishes due to malformed response."""
570
+
ESCALATION = 'ESCALATION'
571
+
"""Request was filtered by an escalation rule. This enum value is not supported in Vertex AI."""
572
+
PUP_LIMITED_DISABLED = 'PUP_LIMITED_DISABLED'
573
+
"""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."""
574
+
CONTINUATION = 'CONTINUATION'
575
+
"""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`."""
576
+
MODEL_ARMOR = 'MODEL_ARMOR'
577
+
"""The model response was blocked by Model Armor. This enum value is not supported in Gemini API."""
565
578
566
579
567
580
class HarmProbability(_common.CaseInSensitiveEnum):
@@ -709,10 +722,17 @@ class ServiceTier(_common.CaseInSensitiveEnum):
709
722
710
723
711
724
class MediaResolution(_common.CaseInSensitiveEnum):
712
-
"""The media resolution to use."""
725
+
"""The token resolution at which input media content is sampled.
726
+
727
+
This is used to control the trade-off between the quality of the response and
728
+
the number of tokens used to represent the media. A higher resolution allows
729
+
the model to perceive more detail, which can lead to a more nuanced response,
730
+
but it will also use more tokens. This does not affect the image dimensions
@@ -894,7 +924,7 @@ class JobState(_common.CaseInSensitiveEnum):
894
924
JOB_STATE_EXPIRED = 'JOB_STATE_EXPIRED'
895
925
"""The job has expired."""
896
926
JOB_STATE_UPDATING = 'JOB_STATE_UPDATING'
897
-
"""The job is being updated. Only jobs in the `JOB_STATE_RUNNING` state can be updated. After updating, the job goes back to the `JOB_STATE_RUNNING` state."""
927
+
"""The job is being updated. Only jobs in the `RUNNING` state can be updated. After updating, the job goes back to the `RUNNING` state."""
description="""How the model processes this part's media for understanding.""",
2421
+
description="""Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field.""",
@@ -2624,7 +2660,7 @@ class PartDict(TypedDict, total=False):
2624
2660
"""Output only. The transcription of the audio part."""
2625
2661
2626
2662
media_processing: Optional[MediaProcessing]
2627
-
"""How the model processes this part's media for understanding."""
2663
+
"""Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field."""
2628
2664
2629
2665
speech_metadata: Optional[SpeechMetadataDict]
2630
2666
"""Extra metadata associated with the part for speech synthesis, such
@@ -23740,7 +23776,8 @@ class ComputationBasedMetricSpec(_common.BaseModel):
23740
23776
"""Specification for a computation based metric."""
0 commit comments