google-genai 1.16.0__py3-none-any.whl → 1.17.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/genai/_automatic_function_calling_util.py +1 -0
- google/genai/_extra_utils.py +3 -6
- google/genai/_live_converters.py +106 -31
- google/genai/_mcp_utils.py +3 -6
- google/genai/_replay_api_client.py +51 -1
- google/genai/_tokens_converters.py +54 -6
- google/genai/_transformers.py +20 -2
- google/genai/caches.py +60 -6
- google/genai/live.py +23 -1
- google/genai/models.py +314 -14
- google/genai/tunings.py +6 -0
- google/genai/types.py +316 -154
- google/genai/version.py +1 -1
- {google_genai-1.16.0.dist-info → google_genai-1.17.0.dist-info}/METADATA +2 -2
- google_genai-1.17.0.dist-info/RECORD +35 -0
- {google_genai-1.16.0.dist-info → google_genai-1.17.0.dist-info}/WHEEL +1 -1
- google_genai-1.16.0.dist-info/RECORD +0 -35
- {google_genai-1.16.0.dist-info → google_genai-1.17.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.16.0.dist-info → google_genai-1.17.0.dist-info}/top_level.txt +0 -0
google/genai/types.py
CHANGED
@@ -98,6 +98,27 @@ class Language(_common.CaseInSensitiveEnum):
|
|
98
98
|
"""Python >= 3.10, with numpy and simpy available."""
|
99
99
|
|
100
100
|
|
101
|
+
class Type(_common.CaseInSensitiveEnum):
|
102
|
+
"""Optional. The type of the data."""
|
103
|
+
|
104
|
+
TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED'
|
105
|
+
"""Not specified, should not be used."""
|
106
|
+
STRING = 'STRING'
|
107
|
+
"""OpenAPI string type"""
|
108
|
+
NUMBER = 'NUMBER'
|
109
|
+
"""OpenAPI number type"""
|
110
|
+
INTEGER = 'INTEGER'
|
111
|
+
"""OpenAPI integer type"""
|
112
|
+
BOOLEAN = 'BOOLEAN'
|
113
|
+
"""OpenAPI boolean type"""
|
114
|
+
ARRAY = 'ARRAY'
|
115
|
+
"""OpenAPI array type"""
|
116
|
+
OBJECT = 'OBJECT'
|
117
|
+
"""OpenAPI object type"""
|
118
|
+
NULL = 'NULL'
|
119
|
+
"""Null type"""
|
120
|
+
|
121
|
+
|
101
122
|
class HarmCategory(_common.CaseInSensitiveEnum):
|
102
123
|
"""Required. Harm category."""
|
103
124
|
|
@@ -112,7 +133,7 @@ class HarmCategory(_common.CaseInSensitiveEnum):
|
|
112
133
|
HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT'
|
113
134
|
"""The harm category is sexually explicit content."""
|
114
135
|
HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY'
|
115
|
-
"""The harm category is civic integrity."""
|
136
|
+
"""Deprecated: Election filter is not longer supported. The harm category is civic integrity."""
|
116
137
|
|
117
138
|
|
118
139
|
class HarmBlockMethod(_common.CaseInSensitiveEnum):
|
@@ -147,25 +168,6 @@ class HarmBlockThreshold(_common.CaseInSensitiveEnum):
|
|
147
168
|
"""Turn off the safety filter."""
|
148
169
|
|
149
170
|
|
150
|
-
class Type(_common.CaseInSensitiveEnum):
|
151
|
-
"""Optional. The type of the data."""
|
152
|
-
|
153
|
-
TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED'
|
154
|
-
"""Not specified, should not be used."""
|
155
|
-
STRING = 'STRING'
|
156
|
-
"""OpenAPI string type"""
|
157
|
-
NUMBER = 'NUMBER'
|
158
|
-
"""OpenAPI number type"""
|
159
|
-
INTEGER = 'INTEGER'
|
160
|
-
"""OpenAPI integer type"""
|
161
|
-
BOOLEAN = 'BOOLEAN'
|
162
|
-
"""OpenAPI boolean type"""
|
163
|
-
ARRAY = 'ARRAY'
|
164
|
-
"""OpenAPI array type"""
|
165
|
-
OBJECT = 'OBJECT'
|
166
|
-
"""OpenAPI object type"""
|
167
|
-
|
168
|
-
|
169
171
|
class Mode(_common.CaseInSensitiveEnum):
|
170
172
|
"""The mode of the predictor to be used in dynamic retrieval."""
|
171
173
|
|
@@ -295,7 +297,7 @@ class Modality(_common.CaseInSensitiveEnum):
|
|
295
297
|
IMAGE = 'IMAGE'
|
296
298
|
"""Indicates the model should return images."""
|
297
299
|
AUDIO = 'AUDIO'
|
298
|
-
"""Indicates the model should return
|
300
|
+
"""Indicates the model should return audio."""
|
299
301
|
|
300
302
|
|
301
303
|
class MediaResolution(_common.CaseInSensitiveEnum):
|
@@ -604,19 +606,6 @@ class Scale(_common.CaseInSensitiveEnum):
|
|
604
606
|
"""B major or Ab minor."""
|
605
607
|
|
606
608
|
|
607
|
-
class MusicGenerationMode(_common.CaseInSensitiveEnum):
|
608
|
-
"""The mode of music generation."""
|
609
|
-
|
610
|
-
MUSIC_GENERATION_MODE_UNSPECIFIED = 'MUSIC_GENERATION_MODE_UNSPECIFIED'
|
611
|
-
"""This value is unused."""
|
612
|
-
QUALITY = 'QUALITY'
|
613
|
-
"""Steer text prompts to regions of latent space with higher quality
|
614
|
-
music."""
|
615
|
-
DIVERSITY = 'DIVERSITY'
|
616
|
-
"""Steer text prompts to regions of latent space with a larger diversity
|
617
|
-
of music."""
|
618
|
-
|
619
|
-
|
620
609
|
class LiveMusicPlaybackControl(_common.CaseInSensitiveEnum):
|
621
610
|
"""The playback control signal to apply to the music generation."""
|
622
611
|
|
@@ -699,6 +688,38 @@ class BlobDict(TypedDict, total=False):
|
|
699
688
|
BlobOrDict = Union[Blob, BlobDict]
|
700
689
|
|
701
690
|
|
691
|
+
class FileData(_common.BaseModel):
|
692
|
+
"""URI based data."""
|
693
|
+
|
694
|
+
display_name: Optional[str] = Field(
|
695
|
+
default=None,
|
696
|
+
description="""Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. It is not currently used in the Gemini GenerateContent calls.""",
|
697
|
+
)
|
698
|
+
file_uri: Optional[str] = Field(
|
699
|
+
default=None, description="""Required. URI."""
|
700
|
+
)
|
701
|
+
mime_type: Optional[str] = Field(
|
702
|
+
default=None,
|
703
|
+
description="""Required. The IANA standard MIME type of the source data.""",
|
704
|
+
)
|
705
|
+
|
706
|
+
|
707
|
+
class FileDataDict(TypedDict, total=False):
|
708
|
+
"""URI based data."""
|
709
|
+
|
710
|
+
display_name: Optional[str]
|
711
|
+
"""Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. It is not currently used in the Gemini GenerateContent calls."""
|
712
|
+
|
713
|
+
file_uri: Optional[str]
|
714
|
+
"""Required. URI."""
|
715
|
+
|
716
|
+
mime_type: Optional[str]
|
717
|
+
"""Required. The IANA standard MIME type of the source data."""
|
718
|
+
|
719
|
+
|
720
|
+
FileDataOrDict = Union[FileData, FileDataDict]
|
721
|
+
|
722
|
+
|
702
723
|
class CodeExecutionResult(_common.BaseModel):
|
703
724
|
"""Result of executing the [ExecutableCode].
|
704
725
|
|
@@ -763,31 +784,6 @@ class ExecutableCodeDict(TypedDict, total=False):
|
|
763
784
|
ExecutableCodeOrDict = Union[ExecutableCode, ExecutableCodeDict]
|
764
785
|
|
765
786
|
|
766
|
-
class FileData(_common.BaseModel):
|
767
|
-
"""URI based data."""
|
768
|
-
|
769
|
-
file_uri: Optional[str] = Field(
|
770
|
-
default=None, description="""Required. URI."""
|
771
|
-
)
|
772
|
-
mime_type: Optional[str] = Field(
|
773
|
-
default=None,
|
774
|
-
description="""Required. The IANA standard MIME type of the source data.""",
|
775
|
-
)
|
776
|
-
|
777
|
-
|
778
|
-
class FileDataDict(TypedDict, total=False):
|
779
|
-
"""URI based data."""
|
780
|
-
|
781
|
-
file_uri: Optional[str]
|
782
|
-
"""Required. URI."""
|
783
|
-
|
784
|
-
mime_type: Optional[str]
|
785
|
-
"""Required. The IANA standard MIME type of the source data."""
|
786
|
-
|
787
|
-
|
788
|
-
FileDataOrDict = Union[FileData, FileDataDict]
|
789
|
-
|
790
|
-
|
791
787
|
class FunctionCall(_common.BaseModel):
|
792
788
|
"""A function call."""
|
793
789
|
|
@@ -798,7 +794,7 @@ class FunctionCall(_common.BaseModel):
|
|
798
794
|
)
|
799
795
|
args: Optional[dict[str, Any]] = Field(
|
800
796
|
default=None,
|
801
|
-
description="""Optional.
|
797
|
+
description="""Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.""",
|
802
798
|
)
|
803
799
|
name: Optional[str] = Field(
|
804
800
|
default=None,
|
@@ -814,7 +810,7 @@ class FunctionCallDict(TypedDict, total=False):
|
|
814
810
|
`function_call` and return the response with the matching `id`."""
|
815
811
|
|
816
812
|
args: Optional[dict[str, Any]]
|
817
|
-
"""Optional.
|
813
|
+
"""Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details."""
|
818
814
|
|
819
815
|
name: Optional[str]
|
820
816
|
"""Required. The name of the function to call. Matches [FunctionDeclaration.name]."""
|
@@ -888,6 +884,9 @@ class Part(_common.BaseModel):
|
|
888
884
|
inline_data: Optional[Blob] = Field(
|
889
885
|
default=None, description="""Optional. Inlined bytes data."""
|
890
886
|
)
|
887
|
+
file_data: Optional[FileData] = Field(
|
888
|
+
default=None, description="""Optional. URI based data."""
|
889
|
+
)
|
891
890
|
code_execution_result: Optional[CodeExecutionResult] = Field(
|
892
891
|
default=None,
|
893
892
|
description="""Optional. Result of executing the [ExecutableCode].""",
|
@@ -896,9 +895,6 @@ class Part(_common.BaseModel):
|
|
896
895
|
default=None,
|
897
896
|
description="""Optional. Code generated by the model that is meant to be executed.""",
|
898
897
|
)
|
899
|
-
file_data: Optional[FileData] = Field(
|
900
|
-
default=None, description="""Optional. URI based data."""
|
901
|
-
)
|
902
898
|
function_call: Optional[FunctionCall] = Field(
|
903
899
|
default=None,
|
904
900
|
description="""Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.""",
|
@@ -985,15 +981,15 @@ class PartDict(TypedDict, total=False):
|
|
985
981
|
inline_data: Optional[BlobDict]
|
986
982
|
"""Optional. Inlined bytes data."""
|
987
983
|
|
984
|
+
file_data: Optional[FileDataDict]
|
985
|
+
"""Optional. URI based data."""
|
986
|
+
|
988
987
|
code_execution_result: Optional[CodeExecutionResultDict]
|
989
988
|
"""Optional. Result of executing the [ExecutableCode]."""
|
990
989
|
|
991
990
|
executable_code: Optional[ExecutableCodeDict]
|
992
991
|
"""Optional. Code generated by the model that is meant to be executed."""
|
993
992
|
|
994
|
-
file_data: Optional[FileDataDict]
|
995
|
-
"""Optional. URI based data."""
|
996
|
-
|
997
993
|
function_call: Optional[FunctionCallDict]
|
998
994
|
"""Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values."""
|
999
995
|
|
@@ -1150,59 +1146,6 @@ class HttpOptionsDict(TypedDict, total=False):
|
|
1150
1146
|
HttpOptionsOrDict = Union[HttpOptions, HttpOptionsDict]
|
1151
1147
|
|
1152
1148
|
|
1153
|
-
class ModelSelectionConfig(_common.BaseModel):
|
1154
|
-
"""Config for model selection."""
|
1155
|
-
|
1156
|
-
feature_selection_preference: Optional[FeatureSelectionPreference] = Field(
|
1157
|
-
default=None, description="""Options for feature selection preference."""
|
1158
|
-
)
|
1159
|
-
|
1160
|
-
|
1161
|
-
class ModelSelectionConfigDict(TypedDict, total=False):
|
1162
|
-
"""Config for model selection."""
|
1163
|
-
|
1164
|
-
feature_selection_preference: Optional[FeatureSelectionPreference]
|
1165
|
-
"""Options for feature selection preference."""
|
1166
|
-
|
1167
|
-
|
1168
|
-
ModelSelectionConfigOrDict = Union[
|
1169
|
-
ModelSelectionConfig, ModelSelectionConfigDict
|
1170
|
-
]
|
1171
|
-
|
1172
|
-
|
1173
|
-
class SafetySetting(_common.BaseModel):
|
1174
|
-
"""Safety settings."""
|
1175
|
-
|
1176
|
-
method: Optional[HarmBlockMethod] = Field(
|
1177
|
-
default=None,
|
1178
|
-
description="""Determines if the harm block method uses probability or probability
|
1179
|
-
and severity scores.""",
|
1180
|
-
)
|
1181
|
-
category: Optional[HarmCategory] = Field(
|
1182
|
-
default=None, description="""Required. Harm category."""
|
1183
|
-
)
|
1184
|
-
threshold: Optional[HarmBlockThreshold] = Field(
|
1185
|
-
default=None, description="""Required. The harm block threshold."""
|
1186
|
-
)
|
1187
|
-
|
1188
|
-
|
1189
|
-
class SafetySettingDict(TypedDict, total=False):
|
1190
|
-
"""Safety settings."""
|
1191
|
-
|
1192
|
-
method: Optional[HarmBlockMethod]
|
1193
|
-
"""Determines if the harm block method uses probability or probability
|
1194
|
-
and severity scores."""
|
1195
|
-
|
1196
|
-
category: Optional[HarmCategory]
|
1197
|
-
"""Required. Harm category."""
|
1198
|
-
|
1199
|
-
threshold: Optional[HarmBlockThreshold]
|
1200
|
-
"""Required. The harm block threshold."""
|
1201
|
-
|
1202
|
-
|
1203
|
-
SafetySettingOrDict = Union[SafetySetting, SafetySettingDict]
|
1204
|
-
|
1205
|
-
|
1206
1149
|
class JSONSchemaType(Enum):
|
1207
1150
|
"""The type of the data supported by JSON Schema.
|
1208
1151
|
|
@@ -1368,6 +1311,18 @@ class Schema(_common.BaseModel):
|
|
1368
1311
|
be added in the future as needed.
|
1369
1312
|
"""
|
1370
1313
|
|
1314
|
+
additional_properties: Optional[Any] = Field(
|
1315
|
+
default=None,
|
1316
|
+
description="""Optional. Can either be a boolean or an object; controls the presence of additional properties.""",
|
1317
|
+
)
|
1318
|
+
defs: Optional[dict[str, 'Schema']] = Field(
|
1319
|
+
default=None,
|
1320
|
+
description="""Optional. A map of definitions for use by `ref` Only allowed at the root of the schema.""",
|
1321
|
+
)
|
1322
|
+
ref: Optional[str] = Field(
|
1323
|
+
default=None,
|
1324
|
+
description="""Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root `defs`. For example, the following schema defines a reference to a schema node named "Pet": type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring""",
|
1325
|
+
)
|
1371
1326
|
any_of: Optional[list['Schema']] = Field(
|
1372
1327
|
default=None,
|
1373
1328
|
description="""Optional. The value should be validated against any (one or more) of the subschemas in the list.""",
|
@@ -1779,6 +1734,15 @@ class SchemaDict(TypedDict, total=False):
|
|
1779
1734
|
be added in the future as needed.
|
1780
1735
|
"""
|
1781
1736
|
|
1737
|
+
additional_properties: Optional[Any]
|
1738
|
+
"""Optional. Can either be a boolean or an object; controls the presence of additional properties."""
|
1739
|
+
|
1740
|
+
defs: Optional[dict[str, 'SchemaDict']]
|
1741
|
+
"""Optional. A map of definitions for use by `ref` Only allowed at the root of the schema."""
|
1742
|
+
|
1743
|
+
ref: Optional[str]
|
1744
|
+
"""Optional. Allows indirect references between schema nodes. The value should be a valid reference to a child of the root `defs`. For example, the following schema defines a reference to a schema node named "Pet": type: object properties: pet: ref: #/defs/Pet defs: Pet: type: object properties: name: type: string The value of the "pet" property is a reference to the schema node named "Pet". See details in https://json-schema.org/understanding-json-schema/structuring"""
|
1745
|
+
|
1782
1746
|
any_of: Optional[list['SchemaDict']]
|
1783
1747
|
"""Optional. The value should be validated against any (one or more) of the subschemas in the list."""
|
1784
1748
|
|
@@ -1849,6 +1813,59 @@ class SchemaDict(TypedDict, total=False):
|
|
1849
1813
|
SchemaOrDict = Union[Schema, SchemaDict]
|
1850
1814
|
|
1851
1815
|
|
1816
|
+
class ModelSelectionConfig(_common.BaseModel):
|
1817
|
+
"""Config for model selection."""
|
1818
|
+
|
1819
|
+
feature_selection_preference: Optional[FeatureSelectionPreference] = Field(
|
1820
|
+
default=None, description="""Options for feature selection preference."""
|
1821
|
+
)
|
1822
|
+
|
1823
|
+
|
1824
|
+
class ModelSelectionConfigDict(TypedDict, total=False):
|
1825
|
+
"""Config for model selection."""
|
1826
|
+
|
1827
|
+
feature_selection_preference: Optional[FeatureSelectionPreference]
|
1828
|
+
"""Options for feature selection preference."""
|
1829
|
+
|
1830
|
+
|
1831
|
+
ModelSelectionConfigOrDict = Union[
|
1832
|
+
ModelSelectionConfig, ModelSelectionConfigDict
|
1833
|
+
]
|
1834
|
+
|
1835
|
+
|
1836
|
+
class SafetySetting(_common.BaseModel):
|
1837
|
+
"""Safety settings."""
|
1838
|
+
|
1839
|
+
method: Optional[HarmBlockMethod] = Field(
|
1840
|
+
default=None,
|
1841
|
+
description="""Determines if the harm block method uses probability or probability
|
1842
|
+
and severity scores.""",
|
1843
|
+
)
|
1844
|
+
category: Optional[HarmCategory] = Field(
|
1845
|
+
default=None, description="""Required. Harm category."""
|
1846
|
+
)
|
1847
|
+
threshold: Optional[HarmBlockThreshold] = Field(
|
1848
|
+
default=None, description="""Required. The harm block threshold."""
|
1849
|
+
)
|
1850
|
+
|
1851
|
+
|
1852
|
+
class SafetySettingDict(TypedDict, total=False):
|
1853
|
+
"""Safety settings."""
|
1854
|
+
|
1855
|
+
method: Optional[HarmBlockMethod]
|
1856
|
+
"""Determines if the harm block method uses probability or probability
|
1857
|
+
and severity scores."""
|
1858
|
+
|
1859
|
+
category: Optional[HarmCategory]
|
1860
|
+
"""Required. Harm category."""
|
1861
|
+
|
1862
|
+
threshold: Optional[HarmBlockThreshold]
|
1863
|
+
"""Required. The harm block threshold."""
|
1864
|
+
|
1865
|
+
|
1866
|
+
SafetySettingOrDict = Union[SafetySetting, SafetySettingDict]
|
1867
|
+
|
1868
|
+
|
1852
1869
|
class FunctionDeclaration(_common.BaseModel):
|
1853
1870
|
"""Defines a function that the model can generate JSON inputs for.
|
1854
1871
|
|
@@ -2333,6 +2350,14 @@ class VertexAISearch(_common.BaseModel):
|
|
2333
2350
|
default=None,
|
2334
2351
|
description="""Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`""",
|
2335
2352
|
)
|
2353
|
+
filter: Optional[str] = Field(
|
2354
|
+
default=None,
|
2355
|
+
description="""Optional. Filter strings to be passed to the search API.""",
|
2356
|
+
)
|
2357
|
+
max_results: Optional[int] = Field(
|
2358
|
+
default=None,
|
2359
|
+
description="""Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.""",
|
2360
|
+
)
|
2336
2361
|
|
2337
2362
|
|
2338
2363
|
class VertexAISearchDict(TypedDict, total=False):
|
@@ -2348,6 +2373,12 @@ class VertexAISearchDict(TypedDict, total=False):
|
|
2348
2373
|
engine: Optional[str]
|
2349
2374
|
"""Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`"""
|
2350
2375
|
|
2376
|
+
filter: Optional[str]
|
2377
|
+
"""Optional. Filter strings to be passed to the search API."""
|
2378
|
+
|
2379
|
+
max_results: Optional[int]
|
2380
|
+
"""Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10."""
|
2381
|
+
|
2351
2382
|
|
2352
2383
|
VertexAISearchOrDict = Union[VertexAISearch, VertexAISearchDict]
|
2353
2384
|
|
@@ -2440,7 +2471,7 @@ class RagRetrievalConfigRankingLlmRanker(_common.BaseModel):
|
|
2440
2471
|
|
2441
2472
|
model_name: Optional[str] = Field(
|
2442
2473
|
default=None,
|
2443
|
-
description="""Optional. The model name used for ranking.
|
2474
|
+
description="""Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).""",
|
2444
2475
|
)
|
2445
2476
|
|
2446
2477
|
|
@@ -2448,7 +2479,7 @@ class RagRetrievalConfigRankingLlmRankerDict(TypedDict, total=False):
|
|
2448
2479
|
"""Config for LlmRanker."""
|
2449
2480
|
|
2450
2481
|
model_name: Optional[str]
|
2451
|
-
"""Optional. The model name used for ranking.
|
2482
|
+
"""Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models)."""
|
2452
2483
|
|
2453
2484
|
|
2454
2485
|
RagRetrievalConfigRankingLlmRankerOrDict = Union[
|
@@ -2681,7 +2712,7 @@ class Tool(_common.BaseModel):
|
|
2681
2712
|
)
|
2682
2713
|
code_execution: Optional[ToolCodeExecution] = Field(
|
2683
2714
|
default=None,
|
2684
|
-
description="""Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
|
2715
|
+
description="""Optional. CodeExecution tool type. Enables the model to execute code as part of generation.""",
|
2685
2716
|
)
|
2686
2717
|
|
2687
2718
|
|
@@ -2713,7 +2744,7 @@ class ToolDict(TypedDict, total=False):
|
|
2713
2744
|
"""Optional. Tool to support URL context retrieval."""
|
2714
2745
|
|
2715
2746
|
code_execution: Optional[ToolCodeExecutionDict]
|
2716
|
-
"""Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
|
2747
|
+
"""Optional. CodeExecution tool type. Enables the model to execute code as part of generation."""
|
2717
2748
|
|
2718
2749
|
|
2719
2750
|
ToolOrDict = Union[Tool, ToolDict]
|
@@ -2806,6 +2837,9 @@ class RetrievalConfig(_common.BaseModel):
|
|
2806
2837
|
lat_lng: Optional[LatLng] = Field(
|
2807
2838
|
default=None, description="""Optional. The location of the user."""
|
2808
2839
|
)
|
2840
|
+
language_code: Optional[str] = Field(
|
2841
|
+
default=None, description="""The language code of the user."""
|
2842
|
+
)
|
2809
2843
|
|
2810
2844
|
|
2811
2845
|
class RetrievalConfigDict(TypedDict, total=False):
|
@@ -2814,6 +2848,9 @@ class RetrievalConfigDict(TypedDict, total=False):
|
|
2814
2848
|
lat_lng: Optional[LatLngDict]
|
2815
2849
|
"""Optional. The location of the user."""
|
2816
2850
|
|
2851
|
+
language_code: Optional[str]
|
2852
|
+
"""The language code of the user."""
|
2853
|
+
|
2817
2854
|
|
2818
2855
|
RetrievalConfigOrDict = Union[RetrievalConfig, RetrievalConfigDict]
|
2819
2856
|
|
@@ -3244,7 +3281,7 @@ class GenerationConfigRoutingConfigManualRoutingMode(_common.BaseModel):
|
|
3244
3281
|
|
3245
3282
|
model_name: Optional[str] = Field(
|
3246
3283
|
default=None,
|
3247
|
-
description="""The model name to use. Only the public LLM models are accepted.
|
3284
|
+
description="""The model name to use. Only the public LLM models are accepted. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).""",
|
3248
3285
|
)
|
3249
3286
|
|
3250
3287
|
|
@@ -3254,7 +3291,7 @@ class GenerationConfigRoutingConfigManualRoutingModeDict(
|
|
3254
3291
|
"""When manual routing is set, the specified model will be used directly."""
|
3255
3292
|
|
3256
3293
|
model_name: Optional[str]
|
3257
|
-
"""The model name to use. Only the public LLM models are accepted.
|
3294
|
+
"""The model name to use. Only the public LLM models are accepted. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models)."""
|
3258
3295
|
|
3259
3296
|
|
3260
3297
|
GenerationConfigRoutingConfigManualRoutingModeOrDict = Union[
|
@@ -3865,9 +3902,64 @@ class UrlContextMetadataDict(TypedDict, total=False):
|
|
3865
3902
|
UrlContextMetadataOrDict = Union[UrlContextMetadata, UrlContextMetadataDict]
|
3866
3903
|
|
3867
3904
|
|
3905
|
+
class RagChunkPageSpan(_common.BaseModel):
|
3906
|
+
"""Represents where the chunk starts and ends in the document."""
|
3907
|
+
|
3908
|
+
first_page: Optional[int] = Field(
|
3909
|
+
default=None,
|
3910
|
+
description="""Page where chunk starts in the document. Inclusive. 1-indexed.""",
|
3911
|
+
)
|
3912
|
+
last_page: Optional[int] = Field(
|
3913
|
+
default=None,
|
3914
|
+
description="""Page where chunk ends in the document. Inclusive. 1-indexed.""",
|
3915
|
+
)
|
3916
|
+
|
3917
|
+
|
3918
|
+
class RagChunkPageSpanDict(TypedDict, total=False):
|
3919
|
+
"""Represents where the chunk starts and ends in the document."""
|
3920
|
+
|
3921
|
+
first_page: Optional[int]
|
3922
|
+
"""Page where chunk starts in the document. Inclusive. 1-indexed."""
|
3923
|
+
|
3924
|
+
last_page: Optional[int]
|
3925
|
+
"""Page where chunk ends in the document. Inclusive. 1-indexed."""
|
3926
|
+
|
3927
|
+
|
3928
|
+
RagChunkPageSpanOrDict = Union[RagChunkPageSpan, RagChunkPageSpanDict]
|
3929
|
+
|
3930
|
+
|
3931
|
+
class RagChunk(_common.BaseModel):
|
3932
|
+
"""A RagChunk includes the content of a chunk of a RagFile, and associated metadata."""
|
3933
|
+
|
3934
|
+
page_span: Optional[RagChunkPageSpan] = Field(
|
3935
|
+
default=None,
|
3936
|
+
description="""If populated, represents where the chunk starts and ends in the document.""",
|
3937
|
+
)
|
3938
|
+
text: Optional[str] = Field(
|
3939
|
+
default=None, description="""The content of the chunk."""
|
3940
|
+
)
|
3941
|
+
|
3942
|
+
|
3943
|
+
class RagChunkDict(TypedDict, total=False):
|
3944
|
+
"""A RagChunk includes the content of a chunk of a RagFile, and associated metadata."""
|
3945
|
+
|
3946
|
+
page_span: Optional[RagChunkPageSpanDict]
|
3947
|
+
"""If populated, represents where the chunk starts and ends in the document."""
|
3948
|
+
|
3949
|
+
text: Optional[str]
|
3950
|
+
"""The content of the chunk."""
|
3951
|
+
|
3952
|
+
|
3953
|
+
RagChunkOrDict = Union[RagChunk, RagChunkDict]
|
3954
|
+
|
3955
|
+
|
3868
3956
|
class GroundingChunkRetrievedContext(_common.BaseModel):
|
3869
3957
|
"""Chunk from context retrieved by the retrieval tools."""
|
3870
3958
|
|
3959
|
+
rag_chunk: Optional[RagChunk] = Field(
|
3960
|
+
default=None,
|
3961
|
+
description="""Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool.""",
|
3962
|
+
)
|
3871
3963
|
text: Optional[str] = Field(
|
3872
3964
|
default=None, description="""Text of the attribution."""
|
3873
3965
|
)
|
@@ -3882,6 +3974,9 @@ class GroundingChunkRetrievedContext(_common.BaseModel):
|
|
3882
3974
|
class GroundingChunkRetrievedContextDict(TypedDict, total=False):
|
3883
3975
|
"""Chunk from context retrieved by the retrieval tools."""
|
3884
3976
|
|
3977
|
+
rag_chunk: Optional[RagChunkDict]
|
3978
|
+
"""Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool."""
|
3979
|
+
|
3885
3980
|
text: Optional[str]
|
3886
3981
|
"""Text of the attribution."""
|
3887
3982
|
|
@@ -6446,9 +6541,40 @@ class DeleteModelResponseDict(TypedDict, total=False):
|
|
6446
6541
|
DeleteModelResponseOrDict = Union[DeleteModelResponse, DeleteModelResponseDict]
|
6447
6542
|
|
6448
6543
|
|
6544
|
+
class GenerationConfigThinkingConfig(_common.BaseModel):
|
6545
|
+
"""Config for thinking features."""
|
6546
|
+
|
6547
|
+
include_thoughts: Optional[bool] = Field(
|
6548
|
+
default=None,
|
6549
|
+
description="""Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.""",
|
6550
|
+
)
|
6551
|
+
thinking_budget: Optional[int] = Field(
|
6552
|
+
default=None,
|
6553
|
+
description="""Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true.""",
|
6554
|
+
)
|
6555
|
+
|
6556
|
+
|
6557
|
+
class GenerationConfigThinkingConfigDict(TypedDict, total=False):
|
6558
|
+
"""Config for thinking features."""
|
6559
|
+
|
6560
|
+
include_thoughts: Optional[bool]
|
6561
|
+
"""Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available."""
|
6562
|
+
|
6563
|
+
thinking_budget: Optional[int]
|
6564
|
+
"""Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true."""
|
6565
|
+
|
6566
|
+
|
6567
|
+
GenerationConfigThinkingConfigOrDict = Union[
|
6568
|
+
GenerationConfigThinkingConfig, GenerationConfigThinkingConfigDict
|
6569
|
+
]
|
6570
|
+
|
6571
|
+
|
6449
6572
|
class GenerationConfig(_common.BaseModel):
|
6450
6573
|
"""Generation config."""
|
6451
6574
|
|
6575
|
+
model_selection_config: Optional[ModelSelectionConfig] = Field(
|
6576
|
+
default=None, description="""Optional. Config for model selection."""
|
6577
|
+
)
|
6452
6578
|
audio_timestamp: Optional[bool] = Field(
|
6453
6579
|
default=None,
|
6454
6580
|
description="""Optional. If enabled, audio timestamp will be included in the request to the model.""",
|
@@ -6482,6 +6608,9 @@ class GenerationConfig(_common.BaseModel):
|
|
6482
6608
|
default=None,
|
6483
6609
|
description="""Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.""",
|
6484
6610
|
)
|
6611
|
+
response_modalities: Optional[list[Modality]] = Field(
|
6612
|
+
default=None, description="""Optional. The modalities of the response."""
|
6613
|
+
)
|
6485
6614
|
response_schema: Optional[Schema] = Field(
|
6486
6615
|
default=None,
|
6487
6616
|
description="""Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response.""",
|
@@ -6490,6 +6619,9 @@ class GenerationConfig(_common.BaseModel):
|
|
6490
6619
|
default=None, description="""Optional. Routing configuration."""
|
6491
6620
|
)
|
6492
6621
|
seed: Optional[int] = Field(default=None, description="""Optional. Seed.""")
|
6622
|
+
speech_config: Optional[SpeechConfig] = Field(
|
6623
|
+
default=None, description="""Optional. The speech generation config."""
|
6624
|
+
)
|
6493
6625
|
stop_sequences: Optional[list[str]] = Field(
|
6494
6626
|
default=None, description="""Optional. Stop sequences."""
|
6495
6627
|
)
|
@@ -6497,6 +6629,10 @@ class GenerationConfig(_common.BaseModel):
|
|
6497
6629
|
default=None,
|
6498
6630
|
description="""Optional. Controls the randomness of predictions.""",
|
6499
6631
|
)
|
6632
|
+
thinking_config: Optional[GenerationConfigThinkingConfig] = Field(
|
6633
|
+
default=None,
|
6634
|
+
description="""Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.""",
|
6635
|
+
)
|
6500
6636
|
top_k: Optional[float] = Field(
|
6501
6637
|
default=None,
|
6502
6638
|
description="""Optional. If specified, top-k sampling will be used.""",
|
@@ -6510,6 +6646,9 @@ class GenerationConfig(_common.BaseModel):
|
|
6510
6646
|
class GenerationConfigDict(TypedDict, total=False):
|
6511
6647
|
"""Generation config."""
|
6512
6648
|
|
6649
|
+
model_selection_config: Optional[ModelSelectionConfigDict]
|
6650
|
+
"""Optional. Config for model selection."""
|
6651
|
+
|
6513
6652
|
audio_timestamp: Optional[bool]
|
6514
6653
|
"""Optional. If enabled, audio timestamp will be included in the request to the model."""
|
6515
6654
|
|
@@ -6537,6 +6676,9 @@ class GenerationConfigDict(TypedDict, total=False):
|
|
6537
6676
|
response_mime_type: Optional[str]
|
6538
6677
|
"""Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature."""
|
6539
6678
|
|
6679
|
+
response_modalities: Optional[list[Modality]]
|
6680
|
+
"""Optional. The modalities of the response."""
|
6681
|
+
|
6540
6682
|
response_schema: Optional[SchemaDict]
|
6541
6683
|
"""Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response."""
|
6542
6684
|
|
@@ -6546,12 +6688,18 @@ class GenerationConfigDict(TypedDict, total=False):
|
|
6546
6688
|
seed: Optional[int]
|
6547
6689
|
"""Optional. Seed."""
|
6548
6690
|
|
6691
|
+
speech_config: Optional[SpeechConfigDict]
|
6692
|
+
"""Optional. The speech generation config."""
|
6693
|
+
|
6549
6694
|
stop_sequences: Optional[list[str]]
|
6550
6695
|
"""Optional. Stop sequences."""
|
6551
6696
|
|
6552
6697
|
temperature: Optional[float]
|
6553
6698
|
"""Optional. Controls the randomness of predictions."""
|
6554
6699
|
|
6700
|
+
thinking_config: Optional[GenerationConfigThinkingConfigDict]
|
6701
|
+
"""Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking."""
|
6702
|
+
|
6555
6703
|
top_k: Optional[float]
|
6556
6704
|
"""Optional. If specified, top-k sampling will be used."""
|
6557
6705
|
|
@@ -6826,6 +6974,10 @@ class GenerateVideosConfig(_common.BaseModel):
|
|
6826
6974
|
enhance_prompt: Optional[bool] = Field(
|
6827
6975
|
default=None, description="""Whether to use the prompt rewriting logic."""
|
6828
6976
|
)
|
6977
|
+
generate_audio: Optional[bool] = Field(
|
6978
|
+
default=None,
|
6979
|
+
description="""Whether to generate audio along with the video.""",
|
6980
|
+
)
|
6829
6981
|
|
6830
6982
|
|
6831
6983
|
class GenerateVideosConfigDict(TypedDict, total=False):
|
@@ -6867,6 +7019,9 @@ class GenerateVideosConfigDict(TypedDict, total=False):
|
|
6867
7019
|
enhance_prompt: Optional[bool]
|
6868
7020
|
"""Whether to use the prompt rewriting logic."""
|
6869
7021
|
|
7022
|
+
generate_audio: Optional[bool]
|
7023
|
+
"""Whether to generate audio along with the video."""
|
7024
|
+
|
6870
7025
|
|
6871
7026
|
GenerateVideosConfigOrDict = Union[
|
6872
7027
|
GenerateVideosConfig, GenerateVideosConfigDict
|
@@ -7313,6 +7468,10 @@ SupervisedHyperParametersOrDict = Union[
|
|
7313
7468
|
class SupervisedTuningSpec(_common.BaseModel):
|
7314
7469
|
"""Tuning Spec for Supervised Tuning for first party models."""
|
7315
7470
|
|
7471
|
+
export_last_checkpoint_only: Optional[bool] = Field(
|
7472
|
+
default=None,
|
7473
|
+
description="""Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.""",
|
7474
|
+
)
|
7316
7475
|
hyper_parameters: Optional[SupervisedHyperParameters] = Field(
|
7317
7476
|
default=None, description="""Optional. Hyperparameters for SFT."""
|
7318
7477
|
)
|
@@ -7324,15 +7483,14 @@ class SupervisedTuningSpec(_common.BaseModel):
|
|
7324
7483
|
default=None,
|
7325
7484
|
description="""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
7326
7485
|
)
|
7327
|
-
export_last_checkpoint_only: Optional[bool] = Field(
|
7328
|
-
default=None,
|
7329
|
-
description="""Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported.""",
|
7330
|
-
)
|
7331
7486
|
|
7332
7487
|
|
7333
7488
|
class SupervisedTuningSpecDict(TypedDict, total=False):
|
7334
7489
|
"""Tuning Spec for Supervised Tuning for first party models."""
|
7335
7490
|
|
7491
|
+
export_last_checkpoint_only: Optional[bool]
|
7492
|
+
"""Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false."""
|
7493
|
+
|
7336
7494
|
hyper_parameters: Optional[SupervisedHyperParametersDict]
|
7337
7495
|
"""Optional. Hyperparameters for SFT."""
|
7338
7496
|
|
@@ -7342,9 +7500,6 @@ class SupervisedTuningSpecDict(TypedDict, total=False):
|
|
7342
7500
|
validation_dataset_uri: Optional[str]
|
7343
7501
|
"""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file."""
|
7344
7502
|
|
7345
|
-
export_last_checkpoint_only: Optional[bool]
|
7346
|
-
"""Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported."""
|
7347
|
-
|
7348
7503
|
|
7349
7504
|
SupervisedTuningSpecOrDict = Union[
|
7350
7505
|
SupervisedTuningSpec, SupervisedTuningSpecDict
|
@@ -7659,6 +7814,10 @@ SupervisedTuningDatasetDistributionOrDict = Union[
|
|
7659
7814
|
class SupervisedTuningDataStats(_common.BaseModel):
|
7660
7815
|
"""Tuning data statistics for Supervised Tuning."""
|
7661
7816
|
|
7817
|
+
dropped_example_reasons: Optional[list[str]] = Field(
|
7818
|
+
default=None,
|
7819
|
+
description="""Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.""",
|
7820
|
+
)
|
7662
7821
|
total_billable_character_count: Optional[int] = Field(
|
7663
7822
|
default=None,
|
7664
7823
|
description="""Output only. Number of billable characters in the tuning dataset.""",
|
@@ -7669,7 +7828,7 @@ class SupervisedTuningDataStats(_common.BaseModel):
|
|
7669
7828
|
)
|
7670
7829
|
total_truncated_example_count: Optional[int] = Field(
|
7671
7830
|
default=None,
|
7672
|
-
description="""The number of examples in the dataset that have been
|
7831
|
+
description="""Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.""",
|
7673
7832
|
)
|
7674
7833
|
total_tuning_character_count: Optional[int] = Field(
|
7675
7834
|
default=None,
|
@@ -7677,7 +7836,7 @@ class SupervisedTuningDataStats(_common.BaseModel):
|
|
7677
7836
|
)
|
7678
7837
|
truncated_example_indices: Optional[list[int]] = Field(
|
7679
7838
|
default=None,
|
7680
|
-
description="""A partial sample of the indices (starting from 1) of the
|
7839
|
+
description="""Output only. A partial sample of the indices (starting from 1) of the dropped examples.""",
|
7681
7840
|
)
|
7682
7841
|
tuning_dataset_example_count: Optional[int] = Field(
|
7683
7842
|
default=None,
|
@@ -7714,6 +7873,9 @@ class SupervisedTuningDataStats(_common.BaseModel):
|
|
7714
7873
|
class SupervisedTuningDataStatsDict(TypedDict, total=False):
|
7715
7874
|
"""Tuning data statistics for Supervised Tuning."""
|
7716
7875
|
|
7876
|
+
dropped_example_reasons: Optional[list[str]]
|
7877
|
+
"""Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped."""
|
7878
|
+
|
7717
7879
|
total_billable_character_count: Optional[int]
|
7718
7880
|
"""Output only. Number of billable characters in the tuning dataset."""
|
7719
7881
|
|
@@ -7721,13 +7883,13 @@ class SupervisedTuningDataStatsDict(TypedDict, total=False):
|
|
7721
7883
|
"""Output only. Number of billable tokens in the tuning dataset."""
|
7722
7884
|
|
7723
7885
|
total_truncated_example_count: Optional[int]
|
7724
|
-
"""The number of examples in the dataset that have been
|
7886
|
+
"""Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc."""
|
7725
7887
|
|
7726
7888
|
total_tuning_character_count: Optional[int]
|
7727
7889
|
"""Output only. Number of tuning characters in the tuning dataset."""
|
7728
7890
|
|
7729
7891
|
truncated_example_indices: Optional[list[int]]
|
7730
|
-
"""A partial sample of the indices (starting from 1) of the
|
7892
|
+
"""Output only. A partial sample of the indices (starting from 1) of the dropped examples."""
|
7731
7893
|
|
7732
7894
|
tuning_dataset_example_count: Optional[int]
|
7733
7895
|
"""Output only. Number of examples in the tuning dataset."""
|
@@ -7876,7 +8038,7 @@ class DistillationSpec(_common.BaseModel):
|
|
7876
8038
|
|
7877
8039
|
base_teacher_model: Optional[str] = Field(
|
7878
8040
|
default=None,
|
7879
|
-
description="""The base teacher model that is being distilled
|
8041
|
+
description="""The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).""",
|
7880
8042
|
)
|
7881
8043
|
hyper_parameters: Optional[DistillationHyperParameters] = Field(
|
7882
8044
|
default=None,
|
@@ -7884,15 +8046,15 @@ class DistillationSpec(_common.BaseModel):
|
|
7884
8046
|
)
|
7885
8047
|
pipeline_root_directory: Optional[str] = Field(
|
7886
8048
|
default=None,
|
7887
|
-
description="""
|
8049
|
+
description="""Deprecated. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.""",
|
7888
8050
|
)
|
7889
8051
|
student_model: Optional[str] = Field(
|
7890
8052
|
default=None,
|
7891
|
-
description="""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it".""",
|
8053
|
+
description="""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead.""",
|
7892
8054
|
)
|
7893
8055
|
training_dataset_uri: Optional[str] = Field(
|
7894
8056
|
default=None,
|
7895
|
-
description="""
|
8057
|
+
description="""Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
7896
8058
|
)
|
7897
8059
|
tuned_teacher_model_source: Optional[str] = Field(
|
7898
8060
|
default=None,
|
@@ -7908,19 +8070,19 @@ class DistillationSpecDict(TypedDict, total=False):
|
|
7908
8070
|
"""Tuning Spec for Distillation."""
|
7909
8071
|
|
7910
8072
|
base_teacher_model: Optional[str]
|
7911
|
-
"""The base teacher model that is being distilled
|
8073
|
+
"""The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models)."""
|
7912
8074
|
|
7913
8075
|
hyper_parameters: Optional[DistillationHyperParametersDict]
|
7914
8076
|
"""Optional. Hyperparameters for Distillation."""
|
7915
8077
|
|
7916
8078
|
pipeline_root_directory: Optional[str]
|
7917
|
-
"""
|
8079
|
+
"""Deprecated. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts."""
|
7918
8080
|
|
7919
8081
|
student_model: Optional[str]
|
7920
|
-
"""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it"."""
|
8082
|
+
"""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead."""
|
7921
8083
|
|
7922
8084
|
training_dataset_uri: Optional[str]
|
7923
|
-
"""
|
8085
|
+
"""Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."""
|
7924
8086
|
|
7925
8087
|
tuned_teacher_model_source: Optional[str]
|
7926
8088
|
"""The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`."""
|
@@ -7969,7 +8131,7 @@ class TuningJob(_common.BaseModel):
|
|
7969
8131
|
)
|
7970
8132
|
base_model: Optional[str] = Field(
|
7971
8133
|
default=None,
|
7972
|
-
description="""The base model that is being tuned
|
8134
|
+
description="""The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models).""",
|
7973
8135
|
)
|
7974
8136
|
tuned_model: Optional[TunedModel] = Field(
|
7975
8137
|
default=None,
|
@@ -8005,6 +8167,10 @@ class TuningJob(_common.BaseModel):
|
|
8005
8167
|
default=None,
|
8006
8168
|
description="""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.""",
|
8007
8169
|
)
|
8170
|
+
service_account: Optional[str] = Field(
|
8171
|
+
default=None,
|
8172
|
+
description="""The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account.""",
|
8173
|
+
)
|
8008
8174
|
tuned_model_display_name: Optional[str] = Field(
|
8009
8175
|
default=None,
|
8010
8176
|
description="""Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters.""",
|
@@ -8049,7 +8215,7 @@ class TuningJobDict(TypedDict, total=False):
|
|
8049
8215
|
"""Optional. The description of the TuningJob."""
|
8050
8216
|
|
8051
8217
|
base_model: Optional[str]
|
8052
|
-
"""The base model that is being tuned
|
8218
|
+
"""The base model that is being tuned. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models)."""
|
8053
8219
|
|
8054
8220
|
tuned_model: Optional[TunedModelDict]
|
8055
8221
|
"""Output only. The tuned model resources associated with this TuningJob."""
|
@@ -8078,6 +8244,9 @@ class TuningJobDict(TypedDict, total=False):
|
|
8078
8244
|
pipeline_job: Optional[str]
|
8079
8245
|
"""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`."""
|
8080
8246
|
|
8247
|
+
service_account: Optional[str]
|
8248
|
+
"""The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account."""
|
8249
|
+
|
8081
8250
|
tuned_model_display_name: Optional[str]
|
8082
8251
|
"""Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters."""
|
8083
8252
|
|
@@ -11982,10 +12151,6 @@ class LiveMusicGenerationConfig(_common.BaseModel):
|
|
11982
12151
|
default=None,
|
11983
12152
|
description="""Whether the audio output should contain only bass and drums.""",
|
11984
12153
|
)
|
11985
|
-
music_generation_mode: Optional[MusicGenerationMode] = Field(
|
11986
|
-
default=None,
|
11987
|
-
description="""The mode of music generation. Default mode is QUALITY.""",
|
11988
|
-
)
|
11989
12154
|
|
11990
12155
|
|
11991
12156
|
class LiveMusicGenerationConfigDict(TypedDict, total=False):
|
@@ -12029,9 +12194,6 @@ class LiveMusicGenerationConfigDict(TypedDict, total=False):
|
|
12029
12194
|
only_bass_and_drums: Optional[bool]
|
12030
12195
|
"""Whether the audio output should contain only bass and drums."""
|
12031
12196
|
|
12032
|
-
music_generation_mode: Optional[MusicGenerationMode]
|
12033
|
-
"""The mode of music generation. Default mode is QUALITY."""
|
12034
|
-
|
12035
12197
|
|
12036
12198
|
LiveMusicGenerationConfigOrDict = Union[
|
12037
12199
|
LiveMusicGenerationConfig, LiveMusicGenerationConfigDict
|