Skip to content

Commit 10f49a3

Browse files
1 parent cf09f60 commit 10f49a3

File tree

2,950 files changed

+66
-2716961
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,950 files changed

+66
-2716961
lines changed

google/cloud/aiplatform_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
from .types.content import GroundingChunk
120120
from .types.content import GroundingMetadata
121121
from .types.content import GroundingSupport
122+
from .types.content import ImageConfig
122123
from .types.content import LogprobsResult
123124
from .types.content import ModalityTokenCount
124125
from .types.content import ModelArmorConfig
@@ -1514,6 +1515,7 @@
15141515
"HarmCategory",
15151516
"HyperparameterTuningJob",
15161517
"IdMatcher",
1518+
"ImageConfig",
15171519
"ImportDataConfig",
15181520
"ImportDataOperationMetadata",
15191521
"ImportDataRequest",

google/cloud/aiplatform_v1/services/migration_service/client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,40 +265,40 @@ def parse_dataset_path(path: str) -> Dict[str, str]:
265265
@staticmethod
266266
def dataset_path(
267267
project: str,
268+
location: str,
268269
dataset: str,
269270
) -> str:
270271
"""Returns a fully-qualified dataset string."""
271-
return "projects/{project}/datasets/{dataset}".format(
272+
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
272273
project=project,
274+
location=location,
273275
dataset=dataset,
274276
)
275277

276278
@staticmethod
277279
def parse_dataset_path(path: str) -> Dict[str, str]:
278280
"""Parses a dataset path into its component segments."""
279-
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
281+
m = re.match(
282+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
283+
path,
284+
)
280285
return m.groupdict() if m else {}
281286

282287
@staticmethod
283288
def dataset_path(
284289
project: str,
285-
location: str,
286290
dataset: str,
287291
) -> str:
288292
"""Returns a fully-qualified dataset string."""
289-
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
293+
return "projects/{project}/datasets/{dataset}".format(
290294
project=project,
291-
location=location,
292295
dataset=dataset,
293296
)
294297

295298
@staticmethod
296299
def parse_dataset_path(path: str) -> Dict[str, str]:
297300
"""Parses a dataset path into its component segments."""
298-
m = re.match(
299-
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
300-
path,
301-
)
301+
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
302302
return m.groupdict() if m else {}
303303

304304
@staticmethod

google/cloud/aiplatform_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
GroundingChunk,
4949
GroundingMetadata,
5050
GroundingSupport,
51+
ImageConfig,
5152
LogprobsResult,
5253
ModalityTokenCount,
5354
ModelArmorConfig,
@@ -1221,6 +1222,7 @@
12211222
"GroundingChunk",
12221223
"GroundingMetadata",
12231224
"GroundingSupport",
1225+
"ImageConfig",
12241226
"LogprobsResult",
12251227
"ModalityTokenCount",
12261228
"ModelArmorConfig",

google/cloud/aiplatform_v1/types/content.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"Blob",
3838
"FileData",
3939
"VideoMetadata",
40+
"ImageConfig",
4041
"GenerationConfig",
4142
"SafetySetting",
4243
"SafetyRating",
@@ -340,6 +341,34 @@ class VideoMetadata(proto.Message):
340341
)
341342

342343

344+
class ImageConfig(proto.Message):
345+
r"""Config for image generation features.
346+
347+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
348+
349+
Attributes:
350+
aspect_ratio (str):
351+
Optional. The desired aspect ratio for the
352+
generated images. The following aspect ratios
353+
are supported:
354+
355+
"1:1"
356+
"2:3", "3:2"
357+
"3:4", "4:3"
358+
"4:5", "5:4"
359+
"9:16", "16:9"
360+
"21:9".
361+
362+
This field is a member of `oneof`_ ``_aspect_ratio``.
363+
"""
364+
365+
aspect_ratio: str = proto.Field(
366+
proto.STRING,
367+
number=2,
368+
optional=True,
369+
)
370+
371+
343372
class GenerationConfig(proto.Message):
344373
r"""Generation config.
345374
@@ -464,6 +493,11 @@ class GenerationConfig(proto.Message):
464493
Optional. Config for thinking features.
465494
An error will be returned if this field is set
466495
for models that don't support thinking.
496+
image_config (google.cloud.aiplatform_v1.types.ImageConfig):
497+
Optional. Config for image generation
498+
features.
499+
500+
This field is a member of `oneof`_ ``_image_config``.
467501
"""
468502

469503
class RoutingConfig(proto.Message):
@@ -676,6 +710,12 @@ class ThinkingConfig(proto.Message):
676710
number=25,
677711
message=ThinkingConfig,
678712
)
713+
image_config: "ImageConfig" = proto.Field(
714+
proto.MESSAGE,
715+
number=30,
716+
optional=True,
717+
message="ImageConfig",
718+
)
679719

680720

681721
class SafetySetting(proto.Message):

owl-bot-staging/v1/.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

owl-bot-staging/v1/.flake8

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)