google-genai 1.16.1__py3-none-any.whl → 1.18.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/__init__.py +1 -2
- google/genai/_api_client.py +10 -0
- google/genai/_automatic_function_calling_util.py +1 -0
- google/genai/_common.py +36 -1
- google/genai/_live_converters.py +134 -31
- google/genai/_mcp_utils.py +3 -6
- google/genai/_replay_api_client.py +51 -1
- google/genai/_tokens_converters.py +75 -13
- google/genai/_transformers.py +22 -3
- google/genai/caches.py +74 -6
- google/genai/chats.py +6 -3
- google/genai/live.py +39 -101
- google/genai/models.py +349 -17
- google/genai/tunings.py +6 -0
- google/genai/types.py +333 -162
- google/genai/version.py +1 -1
- {google_genai-1.16.1.dist-info → google_genai-1.18.0.dist-info}/METADATA +2 -2
- google_genai-1.18.0.dist-info/RECORD +35 -0
- {google_genai-1.16.1.dist-info → google_genai-1.18.0.dist-info}/WHEEL +1 -1
- google_genai-1.16.1.dist-info/RECORD +0 -35
- {google_genai-1.16.1.dist-info → google_genai-1.18.0.dist-info}/licenses/LICENSE +0 -0
- {google_genai-1.16.1.dist-info → google_genai-1.18.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
|
|
@@ -223,6 +225,8 @@ class FinishReason(_common.CaseInSensitiveEnum):
|
|
223
225
|
"""The function call generated by the model is invalid."""
|
224
226
|
IMAGE_SAFETY = 'IMAGE_SAFETY'
|
225
227
|
"""Token generation stopped because generated images have safety violations."""
|
228
|
+
UNEXPECTED_TOOL_CALL = 'UNEXPECTED_TOOL_CALL'
|
229
|
+
"""The tool call generated by the model is invalid."""
|
226
230
|
|
227
231
|
|
228
232
|
class HarmProbability(_common.CaseInSensitiveEnum):
|
@@ -295,7 +299,7 @@ class Modality(_common.CaseInSensitiveEnum):
|
|
295
299
|
IMAGE = 'IMAGE'
|
296
300
|
"""Indicates the model should return images."""
|
297
301
|
AUDIO = 'AUDIO'
|
298
|
-
"""Indicates the model should return
|
302
|
+
"""Indicates the model should return audio."""
|
299
303
|
|
300
304
|
|
301
305
|
class MediaResolution(_common.CaseInSensitiveEnum):
|
@@ -604,19 +608,6 @@ class Scale(_common.CaseInSensitiveEnum):
|
|
604
608
|
"""B major or Ab minor."""
|
605
609
|
|
606
610
|
|
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
611
|
class LiveMusicPlaybackControl(_common.CaseInSensitiveEnum):
|
621
612
|
"""The playback control signal to apply to the music generation."""
|
622
613
|
|
@@ -699,6 +690,38 @@ class BlobDict(TypedDict, total=False):
|
|
699
690
|
BlobOrDict = Union[Blob, BlobDict]
|
700
691
|
|
701
692
|
|
693
|
+
class FileData(_common.BaseModel):
|
694
|
+
"""URI based data."""
|
695
|
+
|
696
|
+
display_name: Optional[str] = Field(
|
697
|
+
default=None,
|
698
|
+
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.""",
|
699
|
+
)
|
700
|
+
file_uri: Optional[str] = Field(
|
701
|
+
default=None, description="""Required. URI."""
|
702
|
+
)
|
703
|
+
mime_type: Optional[str] = Field(
|
704
|
+
default=None,
|
705
|
+
description="""Required. The IANA standard MIME type of the source data.""",
|
706
|
+
)
|
707
|
+
|
708
|
+
|
709
|
+
class FileDataDict(TypedDict, total=False):
|
710
|
+
"""URI based data."""
|
711
|
+
|
712
|
+
display_name: Optional[str]
|
713
|
+
"""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."""
|
714
|
+
|
715
|
+
file_uri: Optional[str]
|
716
|
+
"""Required. URI."""
|
717
|
+
|
718
|
+
mime_type: Optional[str]
|
719
|
+
"""Required. The IANA standard MIME type of the source data."""
|
720
|
+
|
721
|
+
|
722
|
+
FileDataOrDict = Union[FileData, FileDataDict]
|
723
|
+
|
724
|
+
|
702
725
|
class CodeExecutionResult(_common.BaseModel):
|
703
726
|
"""Result of executing the [ExecutableCode].
|
704
727
|
|
@@ -763,31 +786,6 @@ class ExecutableCodeDict(TypedDict, total=False):
|
|
763
786
|
ExecutableCodeOrDict = Union[ExecutableCode, ExecutableCodeDict]
|
764
787
|
|
765
788
|
|
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
789
|
class FunctionCall(_common.BaseModel):
|
792
790
|
"""A function call."""
|
793
791
|
|
@@ -798,7 +796,7 @@ class FunctionCall(_common.BaseModel):
|
|
798
796
|
)
|
799
797
|
args: Optional[dict[str, Any]] = Field(
|
800
798
|
default=None,
|
801
|
-
description="""Optional.
|
799
|
+
description="""Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.""",
|
802
800
|
)
|
803
801
|
name: Optional[str] = Field(
|
804
802
|
default=None,
|
@@ -814,7 +812,7 @@ class FunctionCallDict(TypedDict, total=False):
|
|
814
812
|
`function_call` and return the response with the matching `id`."""
|
815
813
|
|
816
814
|
args: Optional[dict[str, Any]]
|
817
|
-
"""Optional.
|
815
|
+
"""Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details."""
|
818
816
|
|
819
817
|
name: Optional[str]
|
820
818
|
"""Required. The name of the function to call. Matches [FunctionDeclaration.name]."""
|
@@ -888,6 +886,13 @@ class Part(_common.BaseModel):
|
|
888
886
|
inline_data: Optional[Blob] = Field(
|
889
887
|
default=None, description="""Optional. Inlined bytes data."""
|
890
888
|
)
|
889
|
+
file_data: Optional[FileData] = Field(
|
890
|
+
default=None, description="""Optional. URI based data."""
|
891
|
+
)
|
892
|
+
thought_signature: Optional[bytes] = Field(
|
893
|
+
default=None,
|
894
|
+
description="""An opaque signature for the thought so it can be reused in subsequent requests.""",
|
895
|
+
)
|
891
896
|
code_execution_result: Optional[CodeExecutionResult] = Field(
|
892
897
|
default=None,
|
893
898
|
description="""Optional. Result of executing the [ExecutableCode].""",
|
@@ -896,9 +901,6 @@ class Part(_common.BaseModel):
|
|
896
901
|
default=None,
|
897
902
|
description="""Optional. Code generated by the model that is meant to be executed.""",
|
898
903
|
)
|
899
|
-
file_data: Optional[FileData] = Field(
|
900
|
-
default=None, description="""Optional. URI based data."""
|
901
|
-
)
|
902
904
|
function_call: Optional[FunctionCall] = Field(
|
903
905
|
default=None,
|
904
906
|
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 +987,18 @@ class PartDict(TypedDict, total=False):
|
|
985
987
|
inline_data: Optional[BlobDict]
|
986
988
|
"""Optional. Inlined bytes data."""
|
987
989
|
|
990
|
+
file_data: Optional[FileDataDict]
|
991
|
+
"""Optional. URI based data."""
|
992
|
+
|
993
|
+
thought_signature: Optional[bytes]
|
994
|
+
"""An opaque signature for the thought so it can be reused in subsequent requests."""
|
995
|
+
|
988
996
|
code_execution_result: Optional[CodeExecutionResultDict]
|
989
997
|
"""Optional. Result of executing the [ExecutableCode]."""
|
990
998
|
|
991
999
|
executable_code: Optional[ExecutableCodeDict]
|
992
1000
|
"""Optional. Code generated by the model that is meant to be executed."""
|
993
1001
|
|
994
|
-
file_data: Optional[FileDataDict]
|
995
|
-
"""Optional. URI based data."""
|
996
|
-
|
997
1002
|
function_call: Optional[FunctionCallDict]
|
998
1003
|
"""Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values."""
|
999
1004
|
|
@@ -1150,59 +1155,6 @@ class HttpOptionsDict(TypedDict, total=False):
|
|
1150
1155
|
HttpOptionsOrDict = Union[HttpOptions, HttpOptionsDict]
|
1151
1156
|
|
1152
1157
|
|
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
1158
|
class JSONSchemaType(Enum):
|
1207
1159
|
"""The type of the data supported by JSON Schema.
|
1208
1160
|
|
@@ -1368,6 +1320,18 @@ class Schema(_common.BaseModel):
|
|
1368
1320
|
be added in the future as needed.
|
1369
1321
|
"""
|
1370
1322
|
|
1323
|
+
additional_properties: Optional[Any] = Field(
|
1324
|
+
default=None,
|
1325
|
+
description="""Optional. Can either be a boolean or an object; controls the presence of additional properties.""",
|
1326
|
+
)
|
1327
|
+
defs: Optional[dict[str, 'Schema']] = Field(
|
1328
|
+
default=None,
|
1329
|
+
description="""Optional. A map of definitions for use by `ref` Only allowed at the root of the schema.""",
|
1330
|
+
)
|
1331
|
+
ref: Optional[str] = Field(
|
1332
|
+
default=None,
|
1333
|
+
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""",
|
1334
|
+
)
|
1371
1335
|
any_of: Optional[list['Schema']] = Field(
|
1372
1336
|
default=None,
|
1373
1337
|
description="""Optional. The value should be validated against any (one or more) of the subschemas in the list.""",
|
@@ -1779,6 +1743,15 @@ class SchemaDict(TypedDict, total=False):
|
|
1779
1743
|
be added in the future as needed.
|
1780
1744
|
"""
|
1781
1745
|
|
1746
|
+
additional_properties: Optional[Any]
|
1747
|
+
"""Optional. Can either be a boolean or an object; controls the presence of additional properties."""
|
1748
|
+
|
1749
|
+
defs: Optional[dict[str, 'SchemaDict']]
|
1750
|
+
"""Optional. A map of definitions for use by `ref` Only allowed at the root of the schema."""
|
1751
|
+
|
1752
|
+
ref: Optional[str]
|
1753
|
+
"""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"""
|
1754
|
+
|
1782
1755
|
any_of: Optional[list['SchemaDict']]
|
1783
1756
|
"""Optional. The value should be validated against any (one or more) of the subschemas in the list."""
|
1784
1757
|
|
@@ -1849,6 +1822,59 @@ class SchemaDict(TypedDict, total=False):
|
|
1849
1822
|
SchemaOrDict = Union[Schema, SchemaDict]
|
1850
1823
|
|
1851
1824
|
|
1825
|
+
class ModelSelectionConfig(_common.BaseModel):
|
1826
|
+
"""Config for model selection."""
|
1827
|
+
|
1828
|
+
feature_selection_preference: Optional[FeatureSelectionPreference] = Field(
|
1829
|
+
default=None, description="""Options for feature selection preference."""
|
1830
|
+
)
|
1831
|
+
|
1832
|
+
|
1833
|
+
class ModelSelectionConfigDict(TypedDict, total=False):
|
1834
|
+
"""Config for model selection."""
|
1835
|
+
|
1836
|
+
feature_selection_preference: Optional[FeatureSelectionPreference]
|
1837
|
+
"""Options for feature selection preference."""
|
1838
|
+
|
1839
|
+
|
1840
|
+
ModelSelectionConfigOrDict = Union[
|
1841
|
+
ModelSelectionConfig, ModelSelectionConfigDict
|
1842
|
+
]
|
1843
|
+
|
1844
|
+
|
1845
|
+
class SafetySetting(_common.BaseModel):
|
1846
|
+
"""Safety settings."""
|
1847
|
+
|
1848
|
+
method: Optional[HarmBlockMethod] = Field(
|
1849
|
+
default=None,
|
1850
|
+
description="""Determines if the harm block method uses probability or probability
|
1851
|
+
and severity scores.""",
|
1852
|
+
)
|
1853
|
+
category: Optional[HarmCategory] = Field(
|
1854
|
+
default=None, description="""Required. Harm category."""
|
1855
|
+
)
|
1856
|
+
threshold: Optional[HarmBlockThreshold] = Field(
|
1857
|
+
default=None, description="""Required. The harm block threshold."""
|
1858
|
+
)
|
1859
|
+
|
1860
|
+
|
1861
|
+
class SafetySettingDict(TypedDict, total=False):
|
1862
|
+
"""Safety settings."""
|
1863
|
+
|
1864
|
+
method: Optional[HarmBlockMethod]
|
1865
|
+
"""Determines if the harm block method uses probability or probability
|
1866
|
+
and severity scores."""
|
1867
|
+
|
1868
|
+
category: Optional[HarmCategory]
|
1869
|
+
"""Required. Harm category."""
|
1870
|
+
|
1871
|
+
threshold: Optional[HarmBlockThreshold]
|
1872
|
+
"""Required. The harm block threshold."""
|
1873
|
+
|
1874
|
+
|
1875
|
+
SafetySettingOrDict = Union[SafetySetting, SafetySettingDict]
|
1876
|
+
|
1877
|
+
|
1852
1878
|
class FunctionDeclaration(_common.BaseModel):
|
1853
1879
|
"""Defines a function that the model can generate JSON inputs for.
|
1854
1880
|
|
@@ -2333,6 +2359,14 @@ class VertexAISearch(_common.BaseModel):
|
|
2333
2359
|
default=None,
|
2334
2360
|
description="""Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`""",
|
2335
2361
|
)
|
2362
|
+
filter: Optional[str] = Field(
|
2363
|
+
default=None,
|
2364
|
+
description="""Optional. Filter strings to be passed to the search API.""",
|
2365
|
+
)
|
2366
|
+
max_results: Optional[int] = Field(
|
2367
|
+
default=None,
|
2368
|
+
description="""Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10.""",
|
2369
|
+
)
|
2336
2370
|
|
2337
2371
|
|
2338
2372
|
class VertexAISearchDict(TypedDict, total=False):
|
@@ -2348,6 +2382,12 @@ class VertexAISearchDict(TypedDict, total=False):
|
|
2348
2382
|
engine: Optional[str]
|
2349
2383
|
"""Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`"""
|
2350
2384
|
|
2385
|
+
filter: Optional[str]
|
2386
|
+
"""Optional. Filter strings to be passed to the search API."""
|
2387
|
+
|
2388
|
+
max_results: Optional[int]
|
2389
|
+
"""Optional. Number of search results to return per query. The default value is 10. The maximumm allowed value is 10."""
|
2390
|
+
|
2351
2391
|
|
2352
2392
|
VertexAISearchOrDict = Union[VertexAISearch, VertexAISearchDict]
|
2353
2393
|
|
@@ -2440,7 +2480,7 @@ class RagRetrievalConfigRankingLlmRanker(_common.BaseModel):
|
|
2440
2480
|
|
2441
2481
|
model_name: Optional[str] = Field(
|
2442
2482
|
default=None,
|
2443
|
-
description="""Optional. The model name used for ranking.
|
2483
|
+
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
2484
|
)
|
2445
2485
|
|
2446
2486
|
|
@@ -2448,7 +2488,7 @@ class RagRetrievalConfigRankingLlmRankerDict(TypedDict, total=False):
|
|
2448
2488
|
"""Config for LlmRanker."""
|
2449
2489
|
|
2450
2490
|
model_name: Optional[str]
|
2451
|
-
"""Optional. The model name used for ranking.
|
2491
|
+
"""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
2492
|
|
2453
2493
|
|
2454
2494
|
RagRetrievalConfigRankingLlmRankerOrDict = Union[
|
@@ -2681,7 +2721,7 @@ class Tool(_common.BaseModel):
|
|
2681
2721
|
)
|
2682
2722
|
code_execution: Optional[ToolCodeExecution] = Field(
|
2683
2723
|
default=None,
|
2684
|
-
description="""Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
|
2724
|
+
description="""Optional. CodeExecution tool type. Enables the model to execute code as part of generation.""",
|
2685
2725
|
)
|
2686
2726
|
|
2687
2727
|
|
@@ -2713,7 +2753,7 @@ class ToolDict(TypedDict, total=False):
|
|
2713
2753
|
"""Optional. Tool to support URL context retrieval."""
|
2714
2754
|
|
2715
2755
|
code_execution: Optional[ToolCodeExecutionDict]
|
2716
|
-
"""Optional. CodeExecution tool type. Enables the model to execute code as part of generation.
|
2756
|
+
"""Optional. CodeExecution tool type. Enables the model to execute code as part of generation."""
|
2717
2757
|
|
2718
2758
|
|
2719
2759
|
ToolOrDict = Union[Tool, ToolDict]
|
@@ -2806,6 +2846,9 @@ class RetrievalConfig(_common.BaseModel):
|
|
2806
2846
|
lat_lng: Optional[LatLng] = Field(
|
2807
2847
|
default=None, description="""Optional. The location of the user."""
|
2808
2848
|
)
|
2849
|
+
language_code: Optional[str] = Field(
|
2850
|
+
default=None, description="""The language code of the user."""
|
2851
|
+
)
|
2809
2852
|
|
2810
2853
|
|
2811
2854
|
class RetrievalConfigDict(TypedDict, total=False):
|
@@ -2814,6 +2857,9 @@ class RetrievalConfigDict(TypedDict, total=False):
|
|
2814
2857
|
lat_lng: Optional[LatLngDict]
|
2815
2858
|
"""Optional. The location of the user."""
|
2816
2859
|
|
2860
|
+
language_code: Optional[str]
|
2861
|
+
"""The language code of the user."""
|
2862
|
+
|
2817
2863
|
|
2818
2864
|
RetrievalConfigOrDict = Union[RetrievalConfig, RetrievalConfigDict]
|
2819
2865
|
|
@@ -3244,7 +3290,7 @@ class GenerationConfigRoutingConfigManualRoutingMode(_common.BaseModel):
|
|
3244
3290
|
|
3245
3291
|
model_name: Optional[str] = Field(
|
3246
3292
|
default=None,
|
3247
|
-
description="""The model name to use. Only the public LLM models are accepted.
|
3293
|
+
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
3294
|
)
|
3249
3295
|
|
3250
3296
|
|
@@ -3254,7 +3300,7 @@ class GenerationConfigRoutingConfigManualRoutingModeDict(
|
|
3254
3300
|
"""When manual routing is set, the specified model will be used directly."""
|
3255
3301
|
|
3256
3302
|
model_name: Optional[str]
|
3257
|
-
"""The model name to use. Only the public LLM models are accepted.
|
3303
|
+
"""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
3304
|
|
3259
3305
|
|
3260
3306
|
GenerationConfigRoutingConfigManualRoutingModeOrDict = Union[
|
@@ -3865,9 +3911,64 @@ class UrlContextMetadataDict(TypedDict, total=False):
|
|
3865
3911
|
UrlContextMetadataOrDict = Union[UrlContextMetadata, UrlContextMetadataDict]
|
3866
3912
|
|
3867
3913
|
|
3914
|
+
class RagChunkPageSpan(_common.BaseModel):
|
3915
|
+
"""Represents where the chunk starts and ends in the document."""
|
3916
|
+
|
3917
|
+
first_page: Optional[int] = Field(
|
3918
|
+
default=None,
|
3919
|
+
description="""Page where chunk starts in the document. Inclusive. 1-indexed.""",
|
3920
|
+
)
|
3921
|
+
last_page: Optional[int] = Field(
|
3922
|
+
default=None,
|
3923
|
+
description="""Page where chunk ends in the document. Inclusive. 1-indexed.""",
|
3924
|
+
)
|
3925
|
+
|
3926
|
+
|
3927
|
+
class RagChunkPageSpanDict(TypedDict, total=False):
|
3928
|
+
"""Represents where the chunk starts and ends in the document."""
|
3929
|
+
|
3930
|
+
first_page: Optional[int]
|
3931
|
+
"""Page where chunk starts in the document. Inclusive. 1-indexed."""
|
3932
|
+
|
3933
|
+
last_page: Optional[int]
|
3934
|
+
"""Page where chunk ends in the document. Inclusive. 1-indexed."""
|
3935
|
+
|
3936
|
+
|
3937
|
+
RagChunkPageSpanOrDict = Union[RagChunkPageSpan, RagChunkPageSpanDict]
|
3938
|
+
|
3939
|
+
|
3940
|
+
class RagChunk(_common.BaseModel):
|
3941
|
+
"""A RagChunk includes the content of a chunk of a RagFile, and associated metadata."""
|
3942
|
+
|
3943
|
+
page_span: Optional[RagChunkPageSpan] = Field(
|
3944
|
+
default=None,
|
3945
|
+
description="""If populated, represents where the chunk starts and ends in the document.""",
|
3946
|
+
)
|
3947
|
+
text: Optional[str] = Field(
|
3948
|
+
default=None, description="""The content of the chunk."""
|
3949
|
+
)
|
3950
|
+
|
3951
|
+
|
3952
|
+
class RagChunkDict(TypedDict, total=False):
|
3953
|
+
"""A RagChunk includes the content of a chunk of a RagFile, and associated metadata."""
|
3954
|
+
|
3955
|
+
page_span: Optional[RagChunkPageSpanDict]
|
3956
|
+
"""If populated, represents where the chunk starts and ends in the document."""
|
3957
|
+
|
3958
|
+
text: Optional[str]
|
3959
|
+
"""The content of the chunk."""
|
3960
|
+
|
3961
|
+
|
3962
|
+
RagChunkOrDict = Union[RagChunk, RagChunkDict]
|
3963
|
+
|
3964
|
+
|
3868
3965
|
class GroundingChunkRetrievedContext(_common.BaseModel):
|
3869
3966
|
"""Chunk from context retrieved by the retrieval tools."""
|
3870
3967
|
|
3968
|
+
rag_chunk: Optional[RagChunk] = Field(
|
3969
|
+
default=None,
|
3970
|
+
description="""Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool.""",
|
3971
|
+
)
|
3871
3972
|
text: Optional[str] = Field(
|
3872
3973
|
default=None, description="""Text of the attribution."""
|
3873
3974
|
)
|
@@ -3882,6 +3983,9 @@ class GroundingChunkRetrievedContext(_common.BaseModel):
|
|
3882
3983
|
class GroundingChunkRetrievedContextDict(TypedDict, total=False):
|
3883
3984
|
"""Chunk from context retrieved by the retrieval tools."""
|
3884
3985
|
|
3986
|
+
rag_chunk: Optional[RagChunkDict]
|
3987
|
+
"""Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool."""
|
3988
|
+
|
3885
3989
|
text: Optional[str]
|
3886
3990
|
"""Text of the attribution."""
|
3887
3991
|
|
@@ -6446,9 +6550,40 @@ class DeleteModelResponseDict(TypedDict, total=False):
|
|
6446
6550
|
DeleteModelResponseOrDict = Union[DeleteModelResponse, DeleteModelResponseDict]
|
6447
6551
|
|
6448
6552
|
|
6553
|
+
class GenerationConfigThinkingConfig(_common.BaseModel):
|
6554
|
+
"""Config for thinking features."""
|
6555
|
+
|
6556
|
+
include_thoughts: Optional[bool] = Field(
|
6557
|
+
default=None,
|
6558
|
+
description="""Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available.""",
|
6559
|
+
)
|
6560
|
+
thinking_budget: Optional[int] = Field(
|
6561
|
+
default=None,
|
6562
|
+
description="""Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true.""",
|
6563
|
+
)
|
6564
|
+
|
6565
|
+
|
6566
|
+
class GenerationConfigThinkingConfigDict(TypedDict, total=False):
|
6567
|
+
"""Config for thinking features."""
|
6568
|
+
|
6569
|
+
include_thoughts: Optional[bool]
|
6570
|
+
"""Optional. Indicates whether to include thoughts in the response. If true, thoughts are returned only when available."""
|
6571
|
+
|
6572
|
+
thinking_budget: Optional[int]
|
6573
|
+
"""Optional. Indicates the thinking budget in tokens. This is only applied when enable_thinking is true."""
|
6574
|
+
|
6575
|
+
|
6576
|
+
GenerationConfigThinkingConfigOrDict = Union[
|
6577
|
+
GenerationConfigThinkingConfig, GenerationConfigThinkingConfigDict
|
6578
|
+
]
|
6579
|
+
|
6580
|
+
|
6449
6581
|
class GenerationConfig(_common.BaseModel):
|
6450
6582
|
"""Generation config."""
|
6451
6583
|
|
6584
|
+
model_selection_config: Optional[ModelSelectionConfig] = Field(
|
6585
|
+
default=None, description="""Optional. Config for model selection."""
|
6586
|
+
)
|
6452
6587
|
audio_timestamp: Optional[bool] = Field(
|
6453
6588
|
default=None,
|
6454
6589
|
description="""Optional. If enabled, audio timestamp will be included in the request to the model.""",
|
@@ -6482,6 +6617,9 @@ class GenerationConfig(_common.BaseModel):
|
|
6482
6617
|
default=None,
|
6483
6618
|
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
6619
|
)
|
6620
|
+
response_modalities: Optional[list[Modality]] = Field(
|
6621
|
+
default=None, description="""Optional. The modalities of the response."""
|
6622
|
+
)
|
6485
6623
|
response_schema: Optional[Schema] = Field(
|
6486
6624
|
default=None,
|
6487
6625
|
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 +6628,9 @@ class GenerationConfig(_common.BaseModel):
|
|
6490
6628
|
default=None, description="""Optional. Routing configuration."""
|
6491
6629
|
)
|
6492
6630
|
seed: Optional[int] = Field(default=None, description="""Optional. Seed.""")
|
6631
|
+
speech_config: Optional[SpeechConfig] = Field(
|
6632
|
+
default=None, description="""Optional. The speech generation config."""
|
6633
|
+
)
|
6493
6634
|
stop_sequences: Optional[list[str]] = Field(
|
6494
6635
|
default=None, description="""Optional. Stop sequences."""
|
6495
6636
|
)
|
@@ -6497,6 +6638,10 @@ class GenerationConfig(_common.BaseModel):
|
|
6497
6638
|
default=None,
|
6498
6639
|
description="""Optional. Controls the randomness of predictions.""",
|
6499
6640
|
)
|
6641
|
+
thinking_config: Optional[GenerationConfigThinkingConfig] = Field(
|
6642
|
+
default=None,
|
6643
|
+
description="""Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.""",
|
6644
|
+
)
|
6500
6645
|
top_k: Optional[float] = Field(
|
6501
6646
|
default=None,
|
6502
6647
|
description="""Optional. If specified, top-k sampling will be used.""",
|
@@ -6510,6 +6655,9 @@ class GenerationConfig(_common.BaseModel):
|
|
6510
6655
|
class GenerationConfigDict(TypedDict, total=False):
|
6511
6656
|
"""Generation config."""
|
6512
6657
|
|
6658
|
+
model_selection_config: Optional[ModelSelectionConfigDict]
|
6659
|
+
"""Optional. Config for model selection."""
|
6660
|
+
|
6513
6661
|
audio_timestamp: Optional[bool]
|
6514
6662
|
"""Optional. If enabled, audio timestamp will be included in the request to the model."""
|
6515
6663
|
|
@@ -6537,6 +6685,9 @@ class GenerationConfigDict(TypedDict, total=False):
|
|
6537
6685
|
response_mime_type: Optional[str]
|
6538
6686
|
"""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
6687
|
|
6688
|
+
response_modalities: Optional[list[Modality]]
|
6689
|
+
"""Optional. The modalities of the response."""
|
6690
|
+
|
6540
6691
|
response_schema: Optional[SchemaDict]
|
6541
6692
|
"""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
6693
|
|
@@ -6546,12 +6697,18 @@ class GenerationConfigDict(TypedDict, total=False):
|
|
6546
6697
|
seed: Optional[int]
|
6547
6698
|
"""Optional. Seed."""
|
6548
6699
|
|
6700
|
+
speech_config: Optional[SpeechConfigDict]
|
6701
|
+
"""Optional. The speech generation config."""
|
6702
|
+
|
6549
6703
|
stop_sequences: Optional[list[str]]
|
6550
6704
|
"""Optional. Stop sequences."""
|
6551
6705
|
|
6552
6706
|
temperature: Optional[float]
|
6553
6707
|
"""Optional. Controls the randomness of predictions."""
|
6554
6708
|
|
6709
|
+
thinking_config: Optional[GenerationConfigThinkingConfigDict]
|
6710
|
+
"""Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking."""
|
6711
|
+
|
6555
6712
|
top_k: Optional[float]
|
6556
6713
|
"""Optional. If specified, top-k sampling will be used."""
|
6557
6714
|
|
@@ -6826,6 +6983,10 @@ class GenerateVideosConfig(_common.BaseModel):
|
|
6826
6983
|
enhance_prompt: Optional[bool] = Field(
|
6827
6984
|
default=None, description="""Whether to use the prompt rewriting logic."""
|
6828
6985
|
)
|
6986
|
+
generate_audio: Optional[bool] = Field(
|
6987
|
+
default=None,
|
6988
|
+
description="""Whether to generate audio along with the video.""",
|
6989
|
+
)
|
6829
6990
|
|
6830
6991
|
|
6831
6992
|
class GenerateVideosConfigDict(TypedDict, total=False):
|
@@ -6867,6 +7028,9 @@ class GenerateVideosConfigDict(TypedDict, total=False):
|
|
6867
7028
|
enhance_prompt: Optional[bool]
|
6868
7029
|
"""Whether to use the prompt rewriting logic."""
|
6869
7030
|
|
7031
|
+
generate_audio: Optional[bool]
|
7032
|
+
"""Whether to generate audio along with the video."""
|
7033
|
+
|
6870
7034
|
|
6871
7035
|
GenerateVideosConfigOrDict = Union[
|
6872
7036
|
GenerateVideosConfig, GenerateVideosConfigDict
|
@@ -7313,6 +7477,10 @@ SupervisedHyperParametersOrDict = Union[
|
|
7313
7477
|
class SupervisedTuningSpec(_common.BaseModel):
|
7314
7478
|
"""Tuning Spec for Supervised Tuning for first party models."""
|
7315
7479
|
|
7480
|
+
export_last_checkpoint_only: Optional[bool] = Field(
|
7481
|
+
default=None,
|
7482
|
+
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.""",
|
7483
|
+
)
|
7316
7484
|
hyper_parameters: Optional[SupervisedHyperParameters] = Field(
|
7317
7485
|
default=None, description="""Optional. Hyperparameters for SFT."""
|
7318
7486
|
)
|
@@ -7324,15 +7492,14 @@ class SupervisedTuningSpec(_common.BaseModel):
|
|
7324
7492
|
default=None,
|
7325
7493
|
description="""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
7326
7494
|
)
|
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
7495
|
|
7332
7496
|
|
7333
7497
|
class SupervisedTuningSpecDict(TypedDict, total=False):
|
7334
7498
|
"""Tuning Spec for Supervised Tuning for first party models."""
|
7335
7499
|
|
7500
|
+
export_last_checkpoint_only: Optional[bool]
|
7501
|
+
"""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."""
|
7502
|
+
|
7336
7503
|
hyper_parameters: Optional[SupervisedHyperParametersDict]
|
7337
7504
|
"""Optional. Hyperparameters for SFT."""
|
7338
7505
|
|
@@ -7342,9 +7509,6 @@ class SupervisedTuningSpecDict(TypedDict, total=False):
|
|
7342
7509
|
validation_dataset_uri: Optional[str]
|
7343
7510
|
"""Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file."""
|
7344
7511
|
|
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
7512
|
|
7349
7513
|
SupervisedTuningSpecOrDict = Union[
|
7350
7514
|
SupervisedTuningSpec, SupervisedTuningSpecDict
|
@@ -7659,6 +7823,10 @@ SupervisedTuningDatasetDistributionOrDict = Union[
|
|
7659
7823
|
class SupervisedTuningDataStats(_common.BaseModel):
|
7660
7824
|
"""Tuning data statistics for Supervised Tuning."""
|
7661
7825
|
|
7826
|
+
dropped_example_reasons: Optional[list[str]] = Field(
|
7827
|
+
default=None,
|
7828
|
+
description="""Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped.""",
|
7829
|
+
)
|
7662
7830
|
total_billable_character_count: Optional[int] = Field(
|
7663
7831
|
default=None,
|
7664
7832
|
description="""Output only. Number of billable characters in the tuning dataset.""",
|
@@ -7669,7 +7837,7 @@ class SupervisedTuningDataStats(_common.BaseModel):
|
|
7669
7837
|
)
|
7670
7838
|
total_truncated_example_count: Optional[int] = Field(
|
7671
7839
|
default=None,
|
7672
|
-
description="""The number of examples in the dataset that have been
|
7840
|
+
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
7841
|
)
|
7674
7842
|
total_tuning_character_count: Optional[int] = Field(
|
7675
7843
|
default=None,
|
@@ -7677,7 +7845,7 @@ class SupervisedTuningDataStats(_common.BaseModel):
|
|
7677
7845
|
)
|
7678
7846
|
truncated_example_indices: Optional[list[int]] = Field(
|
7679
7847
|
default=None,
|
7680
|
-
description="""A partial sample of the indices (starting from 1) of the
|
7848
|
+
description="""Output only. A partial sample of the indices (starting from 1) of the dropped examples.""",
|
7681
7849
|
)
|
7682
7850
|
tuning_dataset_example_count: Optional[int] = Field(
|
7683
7851
|
default=None,
|
@@ -7714,6 +7882,9 @@ class SupervisedTuningDataStats(_common.BaseModel):
|
|
7714
7882
|
class SupervisedTuningDataStatsDict(TypedDict, total=False):
|
7715
7883
|
"""Tuning data statistics for Supervised Tuning."""
|
7716
7884
|
|
7885
|
+
dropped_example_reasons: Optional[list[str]]
|
7886
|
+
"""Output only. For each index in `truncated_example_indices`, the user-facing reason why the example was dropped."""
|
7887
|
+
|
7717
7888
|
total_billable_character_count: Optional[int]
|
7718
7889
|
"""Output only. Number of billable characters in the tuning dataset."""
|
7719
7890
|
|
@@ -7721,13 +7892,13 @@ class SupervisedTuningDataStatsDict(TypedDict, total=False):
|
|
7721
7892
|
"""Output only. Number of billable tokens in the tuning dataset."""
|
7722
7893
|
|
7723
7894
|
total_truncated_example_count: Optional[int]
|
7724
|
-
"""The number of examples in the dataset that have been
|
7895
|
+
"""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
7896
|
|
7726
7897
|
total_tuning_character_count: Optional[int]
|
7727
7898
|
"""Output only. Number of tuning characters in the tuning dataset."""
|
7728
7899
|
|
7729
7900
|
truncated_example_indices: Optional[list[int]]
|
7730
|
-
"""A partial sample of the indices (starting from 1) of the
|
7901
|
+
"""Output only. A partial sample of the indices (starting from 1) of the dropped examples."""
|
7731
7902
|
|
7732
7903
|
tuning_dataset_example_count: Optional[int]
|
7733
7904
|
"""Output only. Number of examples in the tuning dataset."""
|
@@ -7876,7 +8047,7 @@ class DistillationSpec(_common.BaseModel):
|
|
7876
8047
|
|
7877
8048
|
base_teacher_model: Optional[str] = Field(
|
7878
8049
|
default=None,
|
7879
|
-
description="""The base teacher model that is being distilled
|
8050
|
+
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
8051
|
)
|
7881
8052
|
hyper_parameters: Optional[DistillationHyperParameters] = Field(
|
7882
8053
|
default=None,
|
@@ -7884,15 +8055,15 @@ class DistillationSpec(_common.BaseModel):
|
|
7884
8055
|
)
|
7885
8056
|
pipeline_root_directory: Optional[str] = Field(
|
7886
8057
|
default=None,
|
7887
|
-
description="""
|
8058
|
+
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
8059
|
)
|
7889
8060
|
student_model: Optional[str] = Field(
|
7890
8061
|
default=None,
|
7891
|
-
description="""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it".""",
|
8062
|
+
description="""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead.""",
|
7892
8063
|
)
|
7893
8064
|
training_dataset_uri: Optional[str] = Field(
|
7894
8065
|
default=None,
|
7895
|
-
description="""
|
8066
|
+
description="""Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.""",
|
7896
8067
|
)
|
7897
8068
|
tuned_teacher_model_source: Optional[str] = Field(
|
7898
8069
|
default=None,
|
@@ -7908,19 +8079,19 @@ class DistillationSpecDict(TypedDict, total=False):
|
|
7908
8079
|
"""Tuning Spec for Distillation."""
|
7909
8080
|
|
7910
8081
|
base_teacher_model: Optional[str]
|
7911
|
-
"""The base teacher model that is being distilled
|
8082
|
+
"""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
8083
|
|
7913
8084
|
hyper_parameters: Optional[DistillationHyperParametersDict]
|
7914
8085
|
"""Optional. Hyperparameters for Distillation."""
|
7915
8086
|
|
7916
8087
|
pipeline_root_directory: Optional[str]
|
7917
|
-
"""
|
8088
|
+
"""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
8089
|
|
7919
8090
|
student_model: Optional[str]
|
7920
|
-
"""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it"."""
|
8091
|
+
"""The student model that is being tuned, e.g., "google/gemma-2b-1.1-it". Deprecated. Use base_model instead."""
|
7921
8092
|
|
7922
8093
|
training_dataset_uri: Optional[str]
|
7923
|
-
"""
|
8094
|
+
"""Deprecated. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file."""
|
7924
8095
|
|
7925
8096
|
tuned_teacher_model_source: Optional[str]
|
7926
8097
|
"""The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`."""
|
@@ -7969,7 +8140,7 @@ class TuningJob(_common.BaseModel):
|
|
7969
8140
|
)
|
7970
8141
|
base_model: Optional[str] = Field(
|
7971
8142
|
default=None,
|
7972
|
-
description="""The base model that is being tuned
|
8143
|
+
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
8144
|
)
|
7974
8145
|
tuned_model: Optional[TunedModel] = Field(
|
7975
8146
|
default=None,
|
@@ -8005,6 +8176,10 @@ class TuningJob(_common.BaseModel):
|
|
8005
8176
|
default=None,
|
8006
8177
|
description="""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.""",
|
8007
8178
|
)
|
8179
|
+
service_account: Optional[str] = Field(
|
8180
|
+
default=None,
|
8181
|
+
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.""",
|
8182
|
+
)
|
8008
8183
|
tuned_model_display_name: Optional[str] = Field(
|
8009
8184
|
default=None,
|
8010
8185
|
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 +8224,7 @@ class TuningJobDict(TypedDict, total=False):
|
|
8049
8224
|
"""Optional. The description of the TuningJob."""
|
8050
8225
|
|
8051
8226
|
base_model: Optional[str]
|
8052
|
-
"""The base model that is being tuned
|
8227
|
+
"""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
8228
|
|
8054
8229
|
tuned_model: Optional[TunedModelDict]
|
8055
8230
|
"""Output only. The tuned model resources associated with this TuningJob."""
|
@@ -8078,6 +8253,9 @@ class TuningJobDict(TypedDict, total=False):
|
|
8078
8253
|
pipeline_job: Optional[str]
|
8079
8254
|
"""Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`."""
|
8080
8255
|
|
8256
|
+
service_account: Optional[str]
|
8257
|
+
"""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."""
|
8258
|
+
|
8081
8259
|
tuned_model_display_name: Optional[str]
|
8082
8260
|
"""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
8261
|
|
@@ -11982,10 +12160,6 @@ class LiveMusicGenerationConfig(_common.BaseModel):
|
|
11982
12160
|
default=None,
|
11983
12161
|
description="""Whether the audio output should contain only bass and drums.""",
|
11984
12162
|
)
|
11985
|
-
music_generation_mode: Optional[MusicGenerationMode] = Field(
|
11986
|
-
default=None,
|
11987
|
-
description="""The mode of music generation. Default mode is QUALITY.""",
|
11988
|
-
)
|
11989
12163
|
|
11990
12164
|
|
11991
12165
|
class LiveMusicGenerationConfigDict(TypedDict, total=False):
|
@@ -12029,9 +12203,6 @@ class LiveMusicGenerationConfigDict(TypedDict, total=False):
|
|
12029
12203
|
only_bass_and_drums: Optional[bool]
|
12030
12204
|
"""Whether the audio output should contain only bass and drums."""
|
12031
12205
|
|
12032
|
-
music_generation_mode: Optional[MusicGenerationMode]
|
12033
|
-
"""The mode of music generation. Default mode is QUALITY."""
|
12034
|
-
|
12035
12206
|
|
12036
12207
|
LiveMusicGenerationConfigOrDict = Union[
|
12037
12208
|
LiveMusicGenerationConfig, LiveMusicGenerationConfigDict
|
@@ -12330,8 +12501,8 @@ class AuthTokenDict(TypedDict, total=False):
|
|
12330
12501
|
AuthTokenOrDict = Union[AuthToken, AuthTokenDict]
|
12331
12502
|
|
12332
12503
|
|
12333
|
-
class
|
12334
|
-
"""Config for
|
12504
|
+
class LiveConnectConstraints(_common.BaseModel):
|
12505
|
+
"""Config for LiveConnectConstraints for Auth Token creation."""
|
12335
12506
|
|
12336
12507
|
model: Optional[str] = Field(
|
12337
12508
|
default=None,
|
@@ -12345,8 +12516,8 @@ class LiveEphemeralParameters(_common.BaseModel):
|
|
12345
12516
|
)
|
12346
12517
|
|
12347
12518
|
|
12348
|
-
class
|
12349
|
-
"""Config for
|
12519
|
+
class LiveConnectConstraintsDict(TypedDict, total=False):
|
12520
|
+
"""Config for LiveConnectConstraints for Auth Token creation."""
|
12350
12521
|
|
12351
12522
|
model: Optional[str]
|
12352
12523
|
"""ID of the model to configure in the ephemeral token for Live API.
|
@@ -12357,8 +12528,8 @@ class LiveEphemeralParametersDict(TypedDict, total=False):
|
|
12357
12528
|
"""Configuration specific to Live API connections created using this token."""
|
12358
12529
|
|
12359
12530
|
|
12360
|
-
|
12361
|
-
|
12531
|
+
LiveConnectConstraintsOrDict = Union[
|
12532
|
+
LiveConnectConstraints, LiveConnectConstraintsDict
|
12362
12533
|
]
|
12363
12534
|
|
12364
12535
|
|
@@ -12391,7 +12562,7 @@ class CreateAuthTokenConfig(_common.BaseModel):
|
|
12391
12562
|
then no limit is applied. Default is 1. Resuming a Live API session does
|
12392
12563
|
not count as a use.""",
|
12393
12564
|
)
|
12394
|
-
|
12565
|
+
live_connect_constraints: Optional[LiveConnectConstraints] = Field(
|
12395
12566
|
default=None,
|
12396
12567
|
description="""Configuration specific to Live API connections created using this token.""",
|
12397
12568
|
)
|
@@ -12427,7 +12598,7 @@ class CreateAuthTokenConfigDict(TypedDict, total=False):
|
|
12427
12598
|
then no limit is applied. Default is 1. Resuming a Live API session does
|
12428
12599
|
not count as a use."""
|
12429
12600
|
|
12430
|
-
|
12601
|
+
live_connect_constraints: Optional[LiveConnectConstraintsDict]
|
12431
12602
|
"""Configuration specific to Live API connections created using this token."""
|
12432
12603
|
|
12433
12604
|
lock_additional_fields: Optional[list[str]]
|