Skip to content

Commit 981a551

Browse files
gcf-owl-bot[bot]copybara-github
authored andcommitted
Copybara import of the project:
-- e8b4a67 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: RagMetadata and RagDataSchema concepts and Batch API definitions added for Preview docs: Updated comments for `rag_file_metadata_config` across ImportRagFilesRequest and UploadRagFileRequest PiperOrigin-RevId: 881618214 Source-Link: googleapis/googleapis@1a30906 Source-Link: googleapis/googleapis-gen@7b30aa4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2IzMGFhNDkwYzE4YWUxMmJlNmExODk2ZWU2ZDZhMzA3ZDA1NDU4NCJ9 feat: upgrade protobuf from v25.7 to v31.0 PiperOrigin-RevId: 881595129 Source-Link: googleapis/googleapis@d90d23f Source-Link: googleapis/googleapis-gen@f1a9443 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjFhOTQ0MzM2NjRmODY1MGE0YWNiNzNkNjA5Yjk0M2QyZWNiYjZlMCJ9 feat: Add custom session id field to create session v1 feat: Add raw_event field to event proto v1 PiperOrigin-RevId: 880968942 Source-Link: googleapis/googleapis@39d9d44 Source-Link: googleapis/googleapis-gen@f5a7f05 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjVhN2YwNTdmNjFhZWRkMjVlOWNhYjYyYTgxNmQ3ZWQ3YzEyNjcwNCJ9 feat: Add custom session id field to create session v1beta1 feat: Add custom memory id field to create memory v1beta1 feat: Add raw_event field to event proto v1beta1 PiperOrigin-RevId: 879826477 Source-Link: googleapis/googleapis@052914c Source-Link: googleapis/googleapis-gen@1fb8d69 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWZiOGQ2OTg0ZmY5MjkwOTk4Yzg5NGRmNDE3Y2I4NDlmODg0NTdmNiJ9 -- 1c7ecd8 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- b87fa82 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: update the schema proto for the RagChunk with file_id and chunk_id to align with the vertex_rag_data.proto PiperOrigin-RevId: 885147156 Source-Link: googleapis/googleapis@76b63dd Source-Link: googleapis/googleapis-gen@1dd7bdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWRkN2JkYjEzYWJjMjE4MjkxZWU3MDZiYzQ3ZDc4MDA0MTdkNDg2MSJ9 -- 24f55ce by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- cefe822 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: Add new `embed_content_config` to message `EmbedContentRequest` PiperOrigin-RevId: 885256653 Source-Link: googleapis/googleapis@9d5f10d Source-Link: googleapis/googleapis-gen@c11bedb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzExYmVkYjVkY2QxYzNkMDQxMjA5NjBmYzJlNjY3M2EwNzhlZjdkNyJ9 -- 94d148c by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- c8eca83 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: Add new `embed_content_config` to message `EmbedContentRequest` PiperOrigin-RevId: 885289577 Source-Link: googleapis/googleapis@7feb582 Source-Link: googleapis/googleapis-gen@e6e60da Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTZlNjBkYWNlNTA2ZjEyNTQ0MjYxOGM1YzY1MGZjOWE0ZDc5NTdkNCJ9 -- 53bfff2 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md -- da643df by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add `VALIDATED` Function Calling mode to v1 PiperOrigin-RevId: 885373782 Source-Link: googleapis/googleapis@ebfdba3 Source-Link: googleapis/googleapis-gen@0055864 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA1NTg2NDVjNjQ0ZWNjMWM3YTlhYzMzNzM3NjAxMmZhYmM0MjNjYyJ9 -- 513f200 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md COPYBARA_INTEGRATE_REVIEW=#6396 from googleapis:owl-bot-copy c0f517b PiperOrigin-RevId: 885719789
1 parent 394253a commit 981a551

68 files changed

Lines changed: 35650 additions & 7176 deletions

File tree

Some content is hidden

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

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,40 +293,40 @@ def parse_dataset_path(path: str) -> Dict[str, str]:
293293
@staticmethod
294294
def dataset_path(
295295
project: str,
296+
location: str,
296297
dataset: str,
297298
) -> str:
298299
"""Returns a fully-qualified dataset string."""
299-
return "projects/{project}/datasets/{dataset}".format(
300+
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
300301
project=project,
302+
location=location,
301303
dataset=dataset,
302304
)
303305

304306
@staticmethod
305307
def parse_dataset_path(path: str) -> Dict[str, str]:
306308
"""Parses a dataset path into its component segments."""
307-
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
309+
m = re.match(
310+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
311+
path,
312+
)
308313
return m.groupdict() if m else {}
309314

310315
@staticmethod
311316
def dataset_path(
312317
project: str,
313-
location: str,
314318
dataset: str,
315319
) -> str:
316320
"""Returns a fully-qualified dataset string."""
317-
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
321+
return "projects/{project}/datasets/{dataset}".format(
318322
project=project,
319-
location=location,
320323
dataset=dataset,
321324
)
322325

323326
@staticmethod
324327
def parse_dataset_path(path: str) -> Dict[str, str]:
325328
"""Parses a dataset path into its component segments."""
326-
m = re.match(
327-
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
328-
path,
329-
)
329+
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
330330
return m.groupdict() if m else {}
331331

332332
@staticmethod

google/cloud/aiplatform_v1/services/prediction_service/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ async def sample_embed_content():
19901990
should not be set.
19911991
content (:class:`google.cloud.aiplatform_v1.types.Content`):
19921992
Required. Input content to be
1993-
embedded. Required.
1993+
embedded.
19941994
19951995
This corresponds to the ``content`` field
19961996
on the ``request`` instance; if ``request`` is provided, this

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2513,7 +2513,7 @@ def sample_embed_content():
25132513
should not be set.
25142514
content (google.cloud.aiplatform_v1.types.Content):
25152515
Required. Input content to be
2516-
embedded. Required.
2516+
embedded.
25172517
25182518
This corresponds to the ``content`` field
25192519
on the ``request`` instance; if ``request`` is provided, this

google/cloud/aiplatform_v1/services/session_service/async_client.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ async def create_session(
323323
*,
324324
parent: Optional[str] = None,
325325
session: Optional[gca_session.Session] = None,
326+
session_id: Optional[str] = None,
326327
retry: OptionalRetry = gapic_v1.method.DEFAULT,
327328
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
328329
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
@@ -380,6 +381,20 @@ async def sample_create_session():
380381
This corresponds to the ``session`` field
381382
on the ``request`` instance; if ``request`` is provided, this
382383
should not be set.
384+
session_id (:class:`str`):
385+
Optional. The user defined ID to use for session, which
386+
will become the final component of the session resource
387+
name. If not provided, Vertex AI will generate a value
388+
for this ID.
389+
390+
This value may be up to 63 characters, and valid
391+
characters are ``[a-z0-9-]``. The first character must
392+
be a letter, and the last character must be a letter or
393+
number.
394+
395+
This corresponds to the ``session_id`` field
396+
on the ``request`` instance; if ``request`` is provided, this
397+
should not be set.
383398
retry (google.api_core.retry_async.AsyncRetry): Designation of what errors, if any,
384399
should be retried.
385400
timeout (float): The timeout for this request.
@@ -401,7 +416,7 @@ async def sample_create_session():
401416
# Create or coerce a protobuf request object.
402417
# - Quick check: If we got a request object, we should *not* have
403418
# gotten any keyword arguments that map to the request.
404-
flattened_params = [parent, session]
419+
flattened_params = [parent, session, session_id]
405420
has_flattened_params = (
406421
len([param for param in flattened_params if param is not None]) > 0
407422
)
@@ -422,6 +437,8 @@ async def sample_create_session():
422437
request.parent = parent
423438
if session is not None:
424439
request.session = session
440+
if session_id is not None:
441+
request.session_id = session_id
425442

426443
# Wrap the RPC method; this adds retry and timeout information,
427444
# and friendly error handling.

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ def create_session(
838838
*,
839839
parent: Optional[str] = None,
840840
session: Optional[gca_session.Session] = None,
841+
session_id: Optional[str] = None,
841842
retry: OptionalRetry = gapic_v1.method.DEFAULT,
842843
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
843844
metadata: Sequence[Tuple[str, Union[str, bytes]]] = (),
@@ -895,6 +896,20 @@ def sample_create_session():
895896
This corresponds to the ``session`` field
896897
on the ``request`` instance; if ``request`` is provided, this
897898
should not be set.
899+
session_id (str):
900+
Optional. The user defined ID to use for session, which
901+
will become the final component of the session resource
902+
name. If not provided, Vertex AI will generate a value
903+
for this ID.
904+
905+
This value may be up to 63 characters, and valid
906+
characters are ``[a-z0-9-]``. The first character must
907+
be a letter, and the last character must be a letter or
908+
number.
909+
910+
This corresponds to the ``session_id`` field
911+
on the ``request`` instance; if ``request`` is provided, this
912+
should not be set.
898913
retry (google.api_core.retry.Retry): Designation of what errors, if any,
899914
should be retried.
900915
timeout (float): The timeout for this request.
@@ -916,7 +931,7 @@ def sample_create_session():
916931
# Create or coerce a protobuf request object.
917932
# - Quick check: If we got a request object, we should *not* have
918933
# gotten any keyword arguments that map to the request.
919-
flattened_params = [parent, session]
934+
flattened_params = [parent, session, session_id]
920935
has_flattened_params = (
921936
len([param for param in flattened_params if param is not None]) > 0
922937
)
@@ -936,6 +951,8 @@ def sample_create_session():
936951
request.parent = parent
937952
if session is not None:
938953
request.session = session
954+
if session_id is not None:
955+
request.session_id = session_id
939956

940957
# Wrap the RPC method; this adds retry and timeout information,
941958
# and friendly error handling.

google/cloud/aiplatform_v1/types/prediction_service.py

Lines changed: 102 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,29 +1162,39 @@ class EmbedContentRequest(proto.Message):
11621162
This field is a member of `oneof`_ ``_model``.
11631163
content (google.cloud.aiplatform_v1.types.Content):
11641164
Required. Input content to be embedded.
1165-
Required.
11661165
11671166
This field is a member of `oneof`_ ``_content``.
11681167
title (str):
1169-
Optional. An optional title for the text.
1168+
Optional. Deprecated: Please use
1169+
EmbedContentConfig.title instead. The title for
1170+
the text.
11701171
11711172
This field is a member of `oneof`_ ``_title``.
11721173
task_type (google.cloud.aiplatform_v1.types.EmbedContentRequest.EmbeddingTaskType):
1173-
Optional. The task type of the embedding.
1174+
Optional. Deprecated: Please use
1175+
EmbedContentConfig.task_type instead. The task type of the
1176+
embedding.
11741177
11751178
This field is a member of `oneof`_ ``_task_type``.
11761179
output_dimensionality (int):
1177-
Optional. Optional reduced dimension for the
1178-
output embedding. If set, excessive values in
1179-
the output embedding are truncated from the end.
1180+
Optional. Deprecated: Please use
1181+
EmbedContentConfig.output_dimensionality instead. Reduced
1182+
dimension for the output embedding. If set, excessive values
1183+
in the output embedding are truncated from the end.
11801184
11811185
This field is a member of `oneof`_ ``_output_dimensionality``.
11821186
auto_truncate (bool):
1183-
Optional. Whether to silently truncate the
1184-
input content if it's longer than the maximum
1185-
sequence length.
1187+
Optional. Deprecated: Please use
1188+
EmbedContentConfig.auto_truncate instead. Whether to
1189+
silently truncate the input content if it's longer than the
1190+
maximum sequence length.
11861191
11871192
This field is a member of `oneof`_ ``_auto_truncate``.
1193+
embed_content_config (google.cloud.aiplatform_v1.types.EmbedContentRequest.EmbedContentConfig):
1194+
Optional. Configuration for the EmbedContent
1195+
request.
1196+
1197+
This field is a member of `oneof`_ ``_embed_content_config``.
11881198
"""
11891199

11901200
class EmbeddingTaskType(proto.Enum):
@@ -1230,6 +1240,82 @@ class EmbeddingTaskType(proto.Enum):
12301240
FACT_VERIFICATION = 8
12311241
CODE_RETRIEVAL_QUERY = 9
12321242

1243+
class EmbedContentConfig(proto.Message):
1244+
r"""Configurations for the EmbedContent API.
1245+
1246+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1247+
1248+
Attributes:
1249+
title (str):
1250+
Optional. The title for the text.
1251+
1252+
Only applicable to text-only embedding models.
1253+
1254+
This field is a member of `oneof`_ ``_title``.
1255+
task_type (google.cloud.aiplatform_v1.types.EmbedContentRequest.EmbeddingTaskType):
1256+
Optional. The task type of the embedding.
1257+
1258+
Only applicable to text-only embedding models.
1259+
1260+
This field is a member of `oneof`_ ``_task_type``.
1261+
auto_truncate (bool):
1262+
Optional. Whether to silently truncate the
1263+
input content if it's longer than the maximum
1264+
sequence length.
1265+
1266+
Only applicable to text-only embedding models.
1267+
1268+
This field is a member of `oneof`_ ``_auto_truncate``.
1269+
output_dimensionality (int):
1270+
Optional. Reduced dimension for the output
1271+
embedding. If set, excessive values in the
1272+
output embedding are truncated from the end.
1273+
1274+
This field is a member of `oneof`_ ``_output_dimensionality``.
1275+
document_ocr (bool):
1276+
Optional. Whether to enable OCR for document
1277+
content.
1278+
1279+
This field is a member of `oneof`_ ``_document_ocr``.
1280+
audio_track_extraction (bool):
1281+
Optional. Whether to extract audio from video
1282+
content.
1283+
1284+
This field is a member of `oneof`_ ``_audio_track_extraction``.
1285+
"""
1286+
1287+
title: str = proto.Field(
1288+
proto.STRING,
1289+
number=1,
1290+
optional=True,
1291+
)
1292+
task_type: "EmbedContentRequest.EmbeddingTaskType" = proto.Field(
1293+
proto.ENUM,
1294+
number=2,
1295+
optional=True,
1296+
enum="EmbedContentRequest.EmbeddingTaskType",
1297+
)
1298+
auto_truncate: bool = proto.Field(
1299+
proto.BOOL,
1300+
number=3,
1301+
optional=True,
1302+
)
1303+
output_dimensionality: int = proto.Field(
1304+
proto.INT32,
1305+
number=4,
1306+
optional=True,
1307+
)
1308+
document_ocr: bool = proto.Field(
1309+
proto.BOOL,
1310+
number=5,
1311+
optional=True,
1312+
)
1313+
audio_track_extraction: bool = proto.Field(
1314+
proto.BOOL,
1315+
number=6,
1316+
optional=True,
1317+
)
1318+
12331319
model: str = proto.Field(
12341320
proto.STRING,
12351321
number=1,
@@ -1262,6 +1348,12 @@ class EmbeddingTaskType(proto.Enum):
12621348
number=7,
12631349
optional=True,
12641350
)
1351+
embed_content_config: EmbedContentConfig = proto.Field(
1352+
proto.MESSAGE,
1353+
number=8,
1354+
optional=True,
1355+
message=EmbedContentConfig,
1356+
)
12651357

12661358

12671359
class EmbedContentResponse(proto.Message):
@@ -1273,7 +1365,7 @@ class EmbedContentResponse(proto.Message):
12731365
The embedding generated from the input
12741366
content.
12751367
usage_metadata (google.cloud.aiplatform_v1.types.UsageMetadata):
1276-
Metadata about the response(s).
1368+
Usage metadata about the response(s).
12771369
truncated (bool):
12781370
Whether the input content was truncated
12791371
before generating the embedding.

google/cloud/aiplatform_v1/types/session.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ class SessionEvent(proto.Message):
166166
error.
167167
event_metadata (google.cloud.aiplatform_v1.types.EventMetadata):
168168
Optional. Metadata relating to this event.
169+
raw_event (google.protobuf.struct_pb2.Struct):
170+
Optional. Weakly typed raw event data in
171+
proto struct format.
169172
"""
170173

171174
name: str = proto.Field(
@@ -208,6 +211,11 @@ class SessionEvent(proto.Message):
208211
number=11,
209212
message="EventMetadata",
210213
)
214+
raw_event: struct_pb2.Struct = proto.Field(
215+
proto.MESSAGE,
216+
number=12,
217+
message=struct_pb2.Struct,
218+
)
211219

212220

213221
class EventMetadata(proto.Message):

google/cloud/aiplatform_v1/types/session_service.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ class CreateSessionRequest(proto.Message):
5353
``projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}``
5454
session (google.cloud.aiplatform_v1.types.Session):
5555
Required. The session to create.
56+
session_id (str):
57+
Optional. The user defined ID to use for session, which will
58+
become the final component of the session resource name. If
59+
not provided, Vertex AI will generate a value for this ID.
60+
61+
This value may be up to 63 characters, and valid characters
62+
are ``[a-z0-9-]``. The first character must be a letter, and
63+
the last character must be a letter or number.
5664
"""
5765

5866
parent: str = proto.Field(
@@ -64,6 +72,10 @@ class CreateSessionRequest(proto.Message):
6472
number=2,
6573
message=gca_session.Session,
6674
)
75+
session_id: str = proto.Field(
76+
proto.STRING,
77+
number=3,
78+
)
6779

6880

6981
class CreateSessionOperationMetadata(proto.Message):

google/cloud/aiplatform_v1/types/tool.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,12 +1107,21 @@ class Mode(proto.Enum):
11071107
Model will not predict any function calls.
11081108
Model behavior is same as when not passing any
11091109
function declarations.
1110+
VALIDATED (5):
1111+
Model is constrained to predict either function calls or
1112+
natural language response. If
1113+
[allowed_function_names][FunctionCallingConfig.allowed_function_names]
1114+
are set, the predicted function calls will be limited to any
1115+
one of ``allowed_function_names``, else the predicted
1116+
function calls will be any one of the provided
1117+
[FunctionDeclaration].
11101118
"""
11111119

11121120
MODE_UNSPECIFIED = 0
11131121
AUTO = 1
11141122
ANY = 2
11151123
NONE = 3
1124+
VALIDATED = 5
11161125

11171126
mode: Mode = proto.Field(
11181127
proto.ENUM,

0 commit comments

Comments
 (0)