From a02759df5b82b956d2bf248e975c25fa63dbaad2 Mon Sep 17 00:00:00 2001 From: Christian Leopoldseder Date: Fri, 13 Mar 2026 07:59:26 -0700 Subject: [PATCH] feat: GenAI SDK client(multimodal) - Accept `gemini_request_read_config` instead of `template_config` in all functions. PiperOrigin-RevId: 883166226 --- .../test_assemble_multimodal_datasets.py | 44 ++-- .../replays/test_assess_multimodal_dataset.py | 208 ++++++++++-------- vertexai/_genai/datasets.py | 166 +++++++------- vertexai/_genai/types/__init__.py | 6 - vertexai/_genai/types/common.py | 47 +--- 5 files changed, 223 insertions(+), 248 deletions(-) diff --git a/tests/unit/vertexai/genai/replays/test_assemble_multimodal_datasets.py b/tests/unit/vertexai/genai/replays/test_assemble_multimodal_datasets.py index ac6499c985..7ac2bb38bd 100644 --- a/tests/unit/vertexai/genai/replays/test_assemble_multimodal_datasets.py +++ b/tests/unit/vertexai/genai/replays/test_assemble_multimodal_datasets.py @@ -41,16 +41,18 @@ def test_assemble_dataset(client): def test_assemble_dataset_public(client): bigquery_destination = client.datasets.assemble( name=DATASET, - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - model="gemini-1.5-flash", - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - } - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + model="gemini-1.5-flash", + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + } + ], + ), + ) ), ) assert bigquery_destination.startswith(f"bq://{BIGQUERY_TABLE_NAME}") @@ -81,16 +83,18 @@ async def test_assemble_dataset_async(client): async def test_assemble_dataset_public_async(client): bigquery_destination = await client.aio.datasets.assemble( name=DATASET, - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - model="gemini-1.5-flash", - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - } - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + model="gemini-1.5-flash", + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + } + ], + ), + ) ), ) assert bigquery_destination.startswith(f"bq://{BIGQUERY_TABLE_NAME}") diff --git a/tests/unit/vertexai/genai/replays/test_assess_multimodal_dataset.py b/tests/unit/vertexai/genai/replays/test_assess_multimodal_dataset.py index dc6167c916..96ea4b58d3 100644 --- a/tests/unit/vertexai/genai/replays/test_assess_multimodal_dataset.py +++ b/tests/unit/vertexai/genai/replays/test_assess_multimodal_dataset.py @@ -52,15 +52,17 @@ def test_assess_tuning_resources(client): response = client.datasets.assess_tuning_resources( dataset_name=DATASET, model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - } - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + } + ], + ), + ) ), ) assert isinstance(response, types.TuningResourceUsageAssessmentResult) @@ -71,19 +73,21 @@ def test_assess_tuning_validity(client): dataset_name=DATASET, dataset_usage="SFT_VALIDATION", model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - }, - { - "role": "model", - "parts": [{"text": "{capital}"}], - }, - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + }, + { + "role": "model", + "parts": [{"text": "{capital}"}], + }, + ], + ), + ) ), ) assert isinstance(response, types.TuningValidationAssessmentResult) @@ -93,19 +97,21 @@ def test_assess_batch_prediction_resources(client): response = client.datasets.assess_batch_prediction_resources( dataset_name=DATASET, model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - }, - { - "role": "model", - "parts": [{"text": "{capital}"}], - }, - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + }, + { + "role": "model", + "parts": [{"text": "{capital}"}], + }, + ], + ), + ) ), ) assert isinstance(response, types.BatchPredictionResourceUsageAssessmentResult) @@ -115,19 +121,21 @@ def test_assess_batch_prediction_validity(client): response = client.datasets.assess_batch_prediction_validity( dataset_name=DATASET, model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - }, - { - "role": "model", - "parts": [{"text": "{capital}"}], - }, - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + }, + { + "role": "model", + "parts": [{"text": "{capital}"}], + }, + ], + ), + ) ), ) assert isinstance(response, types.BatchPredictionValidationAssessmentResult) @@ -169,15 +177,17 @@ async def test_assess_tuning_resources_async(client): response = await client.aio.datasets.assess_tuning_resources( dataset_name=DATASET, model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - } - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + } + ], + ), + ) ), ) assert isinstance(response, types.TuningResourceUsageAssessmentResult) @@ -189,19 +199,21 @@ async def test_assess_tuning_validity_async(client): dataset_name=DATASET, dataset_usage="SFT_VALIDATION", model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - }, - { - "role": "model", - "parts": [{"text": "{capital}"}], - }, - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + }, + { + "role": "model", + "parts": [{"text": "{capital}"}], + }, + ], + ), + ) ), ) assert isinstance(response, types.TuningValidationAssessmentResult) @@ -212,19 +224,21 @@ async def test_assess_batch_prediction_resources_async(client): response = await client.aio.datasets.assess_batch_prediction_resources( dataset_name=DATASET, model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - }, - { - "role": "model", - "parts": [{"text": "{capital}"}], - }, - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + }, + { + "role": "model", + "parts": [{"text": "{capital}"}], + }, + ], + ), + ) ), ) assert isinstance(response, types.BatchPredictionResourceUsageAssessmentResult) @@ -235,19 +249,21 @@ async def test_assess_batch_prediction_validity_async(client): response = await client.aio.datasets.assess_batch_prediction_validity( dataset_name=DATASET, model_name="gemini-2.5-flash-001", - template_config=types.GeminiTemplateConfig( - gemini_example=types.GeminiExample( - contents=[ - { - "role": "user", - "parts": [{"text": "What is the capital of {name}?"}], - }, - { - "role": "model", - "parts": [{"text": "{capital}"}], - }, - ], - ), + gemini_request_read_config=types.GeminiRequestReadConfig( + template_config=types.GeminiTemplateConfig( + gemini_example=types.GeminiExample( + contents=[ + { + "role": "user", + "parts": [{"text": "What is the capital of {name}?"}], + }, + { + "role": "model", + "parts": [{"text": "{capital}"}], + }, + ], + ), + ) ), ) assert isinstance(response, types.BatchPredictionValidationAssessmentResult) diff --git a/vertexai/_genai/datasets.py b/vertexai/_genai/datasets.py index 1e5dee3d76..591a01faba 100644 --- a/vertexai/_genai/datasets.py +++ b/vertexai/_genai/datasets.py @@ -1026,7 +1026,9 @@ def assemble( self, *, name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssembleDatasetConfigOrDict] = None, ) -> str: """Assemble the dataset into a BigQuery table. @@ -1037,9 +1039,9 @@ def assemble( name: Required. The name of the dataset to assemble. The name should be in the format of "projects/{project}/locations/{location}/datasets/{dataset}". - template_config: - Optional. The template config to use to assemble the dataset. If - not provided, the template config attached to the dataset will be + gemini_request_read_config: + Optional. The read config to use to assemble the dataset. If + not provided, the read config attached to the dataset will be used. config: Optional. A configuration for assembling the dataset. If not @@ -1055,9 +1057,7 @@ def assemble( operation = self._assemble_multimodal_dataset( name=name, - gemini_request_read_config={ - "template_config": template_config, - }, + gemini_request_read_config=gemini_request_read_config, config=config, ) response = self._wait_for_operation( @@ -1071,7 +1071,9 @@ def assess_tuning_resources( *, dataset_name: str, model_name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.TuningResourceUsageAssessmentResult: """Assess the tuning resources required for a given model. @@ -1083,11 +1085,11 @@ def assess_tuning_resources( model_name: Required. The name of the model to assess the tuning resources for. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the tuning resources. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the tuning resources. If not provided, the default configuration will be used. @@ -1106,9 +1108,7 @@ def assess_tuning_resources( tuning_resource_usage_assessment_config=types.TuningResourceUsageAssessmentConfig( model_name=model_name ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = self._wait_for_operation( @@ -1126,7 +1126,9 @@ def assess_tuning_validity( dataset_name: str, model_name: str, dataset_usage: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.TuningValidationAssessmentResult: """Assess if the assembled dataset is valid in terms of tuning a given @@ -1142,11 +1144,11 @@ def assess_tuning_validity( dataset_usage: Required. The dataset usage to assess the tuning validity for. Must be one of the following: SFT_TRAINING, SFT_VALIDATION. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the tuning validity. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the tuning validity. If not provided, the default configuration will be used. @@ -1168,9 +1170,7 @@ def assess_tuning_validity( model_name=model_name, dataset_usage=dataset_usage, ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = self._wait_for_operation( @@ -1187,7 +1187,9 @@ def assess_batch_prediction_resources( *, dataset_name: str, model_name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.BatchPredictionResourceUsageAssessmentResult: """Assess the batch prediction resources required for a given model. @@ -1199,16 +1201,11 @@ def assess_batch_prediction_resources( model_name: Required. The name of the model to assess the batch prediction resources. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the batch prediction resources. If not provided, - the template config attached to the dataset will be used. Required - if no template config is attached to the dataset. - template_config: - Optional. The template config used to assemble the dataset - before assessing the batch prediction resources. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + the read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the batch prediction resources. If not provided, the default configuration will be @@ -1232,9 +1229,7 @@ def assess_batch_prediction_resources( batch_prediction_resource_usage_assessment_config=types.BatchPredictionResourceUsageAssessmentConfig( model_name=model_name, ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = self._wait_for_operation( @@ -1251,7 +1246,9 @@ def assess_batch_prediction_validity( *, dataset_name: str, model_name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.BatchPredictionValidationAssessmentResult: """Assess if the assembled dataset is valid in terms of batch prediction @@ -1265,11 +1262,11 @@ def assess_batch_prediction_validity( model_name: Required. The name of the model to assess the batch prediction validity for. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the batch prediction validity. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the batch prediction validity. If not provided, the default configuration will be used. @@ -1291,9 +1288,7 @@ def assess_batch_prediction_validity( batch_prediction_validation_assessment_config=types.BatchPredictionValidationAssessmentConfig( model_name=model_name, ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = self._wait_for_operation( @@ -2100,7 +2095,9 @@ async def assemble( self, *, name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssembleDatasetConfigOrDict] = None, ) -> str: """Assemble the dataset into a BigQuery table. @@ -2111,9 +2108,9 @@ async def assemble( name: Required. The name of the dataset to assemble. The name should be in the format of "projects/{project}/locations/{location}/datasets/{dataset}". - template_config: - Optional. The template config to use to assemble the dataset. If - not provided, the template config attached to the dataset will be + gemini_request_read_config: + Optional. The read config to use to assemble the dataset. If + not provided, the read config attached to the dataset will be used. config: Optional. A configuration for assembling the dataset. If not @@ -2129,9 +2126,7 @@ async def assemble( operation = await self._assemble_multimodal_dataset( name=name, - gemini_request_read_config={ - "template_config": template_config, - }, + gemini_request_read_config=gemini_request_read_config, config=config, ) response = await self._wait_for_operation( @@ -2145,7 +2140,9 @@ async def assess_tuning_resources( *, dataset_name: str, model_name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.TuningResourceUsageAssessmentResult: """Assess the tuning resources required for a given model. @@ -2157,11 +2154,11 @@ async def assess_tuning_resources( model_name: Required. The name of the model to assess the tuning resources for. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the tuning resources. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the tuning resources. If not provided, the default configuration will be used. @@ -2180,9 +2177,7 @@ async def assess_tuning_resources( tuning_resource_usage_assessment_config=types.TuningResourceUsageAssessmentConfig( model_name=model_name ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = await self._wait_for_operation( @@ -2200,7 +2195,9 @@ async def assess_tuning_validity( dataset_name: str, model_name: str, dataset_usage: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.TuningValidationAssessmentResult: """Assess if the assembled dataset is valid in terms of tuning a given @@ -2216,11 +2213,11 @@ async def assess_tuning_validity( dataset_usage: Required. The dataset usage to assess the tuning validity for. Must be one of the following: SFT_TRAINING, SFT_VALIDATION. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the tuning validity. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the tuning validity. If not provided, the default configuration will be used. @@ -2242,9 +2239,7 @@ async def assess_tuning_validity( model_name=model_name, dataset_usage=dataset_usage, ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = await self._wait_for_operation( @@ -2261,7 +2256,9 @@ async def assess_batch_prediction_resources( *, dataset_name: str, model_name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.BatchPredictionResourceUsageAssessmentResult: """Assess the batch prediction resources required for a given model. @@ -2273,16 +2270,11 @@ async def assess_batch_prediction_resources( model_name: Required. The name of the model to assess the batch prediction resources. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the batch prediction resources. If not provided, - the template config attached to the dataset will be used. Required - if no template config is attached to the dataset. - template_config: - Optional. The template config used to assemble the dataset - before assessing the batch prediction resources. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + the read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the batch prediction resources. If not provided, the default configuration will be @@ -2306,9 +2298,7 @@ async def assess_batch_prediction_resources( batch_prediction_resource_usage_assessment_config=types.BatchPredictionResourceUsageAssessmentConfig( model_name=model_name, ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = await self._wait_for_operation( @@ -2325,7 +2315,9 @@ async def assess_batch_prediction_validity( *, dataset_name: str, model_name: str, - template_config: Optional[types.GeminiTemplateConfigOrDict] = None, + gemini_request_read_config: Optional[ + types.GeminiRequestReadConfigOrDict + ] = None, config: Optional[types.AssessDatasetConfigOrDict] = None, ) -> types.BatchPredictionValidationAssessmentResult: """Assess if the assembled dataset is valid in terms of batch prediction @@ -2339,11 +2331,11 @@ async def assess_batch_prediction_validity( model_name: Required. The name of the model to assess the batch prediction validity for. - template_config: - Optional. The template config used to assemble the dataset + gemini_request_read_config: + Optional. The read config used to assemble the dataset before assessing the batch prediction validity. If not provided, the - template config attached to the dataset will be used. Required - if no template config is attached to the dataset. + read config attached to the dataset will be used. Required + if no read config is attached to the dataset. config: Optional. A configuration for assessing the batch prediction validity. If not provided, the default configuration will be used. @@ -2365,9 +2357,7 @@ async def assess_batch_prediction_validity( batch_prediction_validation_assessment_config=types.BatchPredictionValidationAssessmentConfig( model_name=model_name, ), - gemini_request_read_config=types.GeminiRequestReadConfig( - template_config=template_config, - ), + gemini_request_read_config=gemini_request_read_config, config=config, ) response = await self._wait_for_operation( diff --git a/vertexai/_genai/types/__init__.py b/vertexai/_genai/types/__init__.py index f0615c1fd7..1ef035e13d 100644 --- a/vertexai/_genai/types/__init__.py +++ b/vertexai/_genai/types/__init__.py @@ -703,12 +703,9 @@ from .common import ModelArmorConfig from .common import ModelArmorConfigDict from .common import ModelArmorConfigOrDict -from .common import MultimodalDataset -from .common import MultimodalDatasetDict from .common import MultimodalDatasetOperation from .common import MultimodalDatasetOperationDict from .common import MultimodalDatasetOperationOrDict -from .common import MultimodalDatasetOrDict from .common import NfsMount from .common import NfsMountDict from .common import NfsMountOrDict @@ -2021,9 +2018,6 @@ "CreateMultimodalDatasetConfig", "CreateMultimodalDatasetConfigDict", "CreateMultimodalDatasetConfigOrDict", - "MultimodalDataset", - "MultimodalDatasetDict", - "MultimodalDatasetOrDict", "GetMultimodalDatasetOperationConfig", "GetMultimodalDatasetOperationConfigDict", "GetMultimodalDatasetOperationConfigOrDict", diff --git a/vertexai/_genai/types/common.py b/vertexai/_genai/types/common.py index 3aef4b9cba..46bf0f4031 100644 --- a/vertexai/_genai/types/common.py +++ b/vertexai/_genai/types/common.py @@ -12375,7 +12375,7 @@ class GeminiRequestReadConfig(_common.BaseModel): ) assembled_request_column_name: Optional[str] = Field( default=None, - description="""Optional. Column name in the dataset table that contains already fully assembled Gemini requests.""", + description="""Column name in the underlying BigQuery table that contains already fully assembled Gemini requests.""", ) @@ -12386,7 +12386,7 @@ class GeminiRequestReadConfigDict(TypedDict, total=False): """Gemini request template with placeholders.""" assembled_request_column_name: Optional[str] - """Optional. Column name in the dataset table that contains already fully assembled Gemini requests.""" + """Column name in the underlying BigQuery table that contains already fully assembled Gemini requests.""" GeminiRequestReadConfigOrDict = Union[ @@ -12710,6 +12710,10 @@ class SchemaTablesDatasetMetadata(_common.BaseModel): default=None, description="""The input config for multimodal dataset metadata.""", ) + gemini_request_read_config: Optional[GeminiRequestReadConfig] = Field( + default=None, + description="""The Gemini request read config for the multimodal dataset.""", + ) class SchemaTablesDatasetMetadataDict(TypedDict, total=False): @@ -12718,6 +12722,9 @@ class SchemaTablesDatasetMetadataDict(TypedDict, total=False): input_config: Optional[SchemaTablesDatasetMetadataInputConfigDict] """The input config for multimodal dataset metadata.""" + gemini_request_read_config: Optional[GeminiRequestReadConfigDict] + """The Gemini request read config for the multimodal dataset.""" + SchemaTablesDatasetMetadataOrDict = Union[ SchemaTablesDatasetMetadata, SchemaTablesDatasetMetadataDict @@ -12848,42 +12855,6 @@ class _GetMultimodalDatasetParametersDict(TypedDict, total=False): ] -class MultimodalDataset(_common.BaseModel): - """Represents a multimodal dataset.""" - - name: Optional[str] = Field( - default=None, description="""The ID of the multimodal dataset.""" - ) - display_name: Optional[str] = Field( - default=None, description="""The display name of the multimodal dataset.""" - ) - metadata: Optional[SchemaTablesDatasetMetadata] = Field( - default=None, description="""The metadata of the multimodal dataset.""" - ) - description: Optional[str] = Field( - default=None, description="""The description of the multimodal dataset.""" - ) - - -class MultimodalDatasetDict(TypedDict, total=False): - """Represents a multimodal dataset.""" - - name: Optional[str] - """The ID of the multimodal dataset.""" - - display_name: Optional[str] - """The display name of the multimodal dataset.""" - - metadata: Optional[SchemaTablesDatasetMetadataDict] - """The metadata of the multimodal dataset.""" - - description: Optional[str] - """The description of the multimodal dataset.""" - - -MultimodalDatasetOrDict = Union[MultimodalDataset, MultimodalDatasetDict] - - class GetMultimodalDatasetOperationConfig(_common.BaseModel): """Config for getting a multimodal dataset operation."""