30
30
"RagEmbeddingModelConfig" ,
31
31
"RagVectorDbConfig" ,
32
32
"FileStatus" ,
33
+ "VertexAiSearchConfig" ,
33
34
"CorpusStatus" ,
34
35
"RagCorpus" ,
35
36
"RagFile" ,
37
+ "RagChunk" ,
36
38
"RagFileChunkingConfig" ,
37
39
"RagFileTransformationConfig" ,
38
40
"RagFileParsingConfig" ,
@@ -238,6 +240,24 @@ class State(proto.Enum):
238
240
)
239
241
240
242
243
+ class VertexAiSearchConfig (proto .Message ):
244
+ r"""Config for the Vertex AI Search.
245
+
246
+ Attributes:
247
+ serving_config (str):
248
+ Vertex AI Search Serving Config resource full name. For
249
+ example,
250
+ ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}``
251
+ or
252
+ ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}``.
253
+ """
254
+
255
+ serving_config : str = proto .Field (
256
+ proto .STRING ,
257
+ number = 1 ,
258
+ )
259
+
260
+
241
261
class CorpusStatus (proto .Message ):
242
262
r"""RagCorpus status.
243
263
@@ -284,10 +304,24 @@ class RagCorpus(proto.Message):
284
304
r"""A RagCorpus is a RagFile container and a project can have
285
305
multiple RagCorpora.
286
306
307
+ This message has `oneof`_ fields (mutually exclusive fields).
308
+ For each oneof, at most one member field can be set at the same time.
309
+ Setting any member of the oneof automatically clears all other
310
+ members.
287
311
288
312
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
289
313
290
314
Attributes:
315
+ vector_db_config (google.cloud.aiplatform_v1.types.RagVectorDbConfig):
316
+ Optional. Immutable. The config for the
317
+ Vector DBs.
318
+
319
+ This field is a member of `oneof`_ ``backend_config``.
320
+ vertex_ai_search_config (google.cloud.aiplatform_v1.types.VertexAiSearchConfig):
321
+ Optional. Immutable. The config for the
322
+ Vertex AI Search.
323
+
324
+ This field is a member of `oneof`_ ``backend_config``.
291
325
name (str):
292
326
Output only. The resource name of the
293
327
RagCorpus.
@@ -305,13 +339,20 @@ class RagCorpus(proto.Message):
305
339
was last updated.
306
340
corpus_status (google.cloud.aiplatform_v1.types.CorpusStatus):
307
341
Output only. RagCorpus state.
308
- vector_db_config (google.cloud.aiplatform_v1.types.RagVectorDbConfig):
309
- Optional. Immutable. The config for the
310
- Vector DBs.
311
-
312
- This field is a member of `oneof`_ ``backend_config``.
313
342
"""
314
343
344
+ vector_db_config : "RagVectorDbConfig" = proto .Field (
345
+ proto .MESSAGE ,
346
+ number = 9 ,
347
+ oneof = "backend_config" ,
348
+ message = "RagVectorDbConfig" ,
349
+ )
350
+ vertex_ai_search_config : "VertexAiSearchConfig" = proto .Field (
351
+ proto .MESSAGE ,
352
+ number = 10 ,
353
+ oneof = "backend_config" ,
354
+ message = "VertexAiSearchConfig" ,
355
+ )
315
356
name : str = proto .Field (
316
357
proto .STRING ,
317
358
number = 1 ,
@@ -339,12 +380,6 @@ class RagCorpus(proto.Message):
339
380
number = 8 ,
340
381
message = "CorpusStatus" ,
341
382
)
342
- vector_db_config : "RagVectorDbConfig" = proto .Field (
343
- proto .MESSAGE ,
344
- number = 9 ,
345
- oneof = "backend_config" ,
346
- message = "RagVectorDbConfig" ,
347
- )
348
383
349
384
350
385
class RagFile (proto .Message ):
@@ -473,6 +508,56 @@ class RagFile(proto.Message):
473
508
)
474
509
475
510
511
+ class RagChunk (proto .Message ):
512
+ r"""A RagChunk includes the content of a chunk of a RagFile, and
513
+ associated metadata.
514
+
515
+
516
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
517
+
518
+ Attributes:
519
+ text (str):
520
+ The content of the chunk.
521
+ page_span (google.cloud.aiplatform_v1.types.RagChunk.PageSpan):
522
+ If populated, represents where the chunk
523
+ starts and ends in the document.
524
+
525
+ This field is a member of `oneof`_ ``_page_span``.
526
+ """
527
+
528
+ class PageSpan (proto .Message ):
529
+ r"""Represents where the chunk starts and ends in the document.
530
+
531
+ Attributes:
532
+ first_page (int):
533
+ Page where chunk starts in the document.
534
+ Inclusive. 1-indexed.
535
+ last_page (int):
536
+ Page where chunk ends in the document.
537
+ Inclusive. 1-indexed.
538
+ """
539
+
540
+ first_page : int = proto .Field (
541
+ proto .INT32 ,
542
+ number = 1 ,
543
+ )
544
+ last_page : int = proto .Field (
545
+ proto .INT32 ,
546
+ number = 2 ,
547
+ )
548
+
549
+ text : str = proto .Field (
550
+ proto .STRING ,
551
+ number = 1 ,
552
+ )
553
+ page_span : PageSpan = proto .Field (
554
+ proto .MESSAGE ,
555
+ number = 2 ,
556
+ optional = True ,
557
+ message = PageSpan ,
558
+ )
559
+
560
+
476
561
class RagFileChunkingConfig (proto .Message ):
477
562
r"""Specifies the size and overlap of chunks for RagFiles.
478
563
0 commit comments