-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
retriever_service.py
793 lines (648 loc) · 23.9 KB
/
retriever_service.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# -*- coding: utf-8 -*-
# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations
from typing import MutableMapping, MutableSequence
from google.protobuf import field_mask_pb2 # type: ignore
import proto # type: ignore
from google.ai.generativelanguage_v1beta.types import retriever
__protobuf__ = proto.module(
package="google.ai.generativelanguage.v1beta",
manifest={
"CreateCorpusRequest",
"GetCorpusRequest",
"UpdateCorpusRequest",
"DeleteCorpusRequest",
"ListCorporaRequest",
"ListCorporaResponse",
"QueryCorpusRequest",
"QueryCorpusResponse",
"RelevantChunk",
"CreateDocumentRequest",
"GetDocumentRequest",
"UpdateDocumentRequest",
"DeleteDocumentRequest",
"ListDocumentsRequest",
"ListDocumentsResponse",
"QueryDocumentRequest",
"QueryDocumentResponse",
"CreateChunkRequest",
"BatchCreateChunksRequest",
"BatchCreateChunksResponse",
"GetChunkRequest",
"UpdateChunkRequest",
"BatchUpdateChunksRequest",
"BatchUpdateChunksResponse",
"DeleteChunkRequest",
"BatchDeleteChunksRequest",
"ListChunksRequest",
"ListChunksResponse",
},
)
class CreateCorpusRequest(proto.Message):
r"""Request to create a ``Corpus``.
Attributes:
corpus (google.ai.generativelanguage_v1beta.types.Corpus):
Required. The ``Corpus`` to create.
"""
corpus: retriever.Corpus = proto.Field(
proto.MESSAGE,
number=1,
message=retriever.Corpus,
)
class GetCorpusRequest(proto.Message):
r"""Request for getting information about a specific ``Corpus``.
Attributes:
name (str):
Required. The name of the ``Corpus``. Example:
``corpora/my-corpus-123``
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
class UpdateCorpusRequest(proto.Message):
r"""Request to update a ``Corpus``.
Attributes:
corpus (google.ai.generativelanguage_v1beta.types.Corpus):
Required. The ``Corpus`` to update.
update_mask (google.protobuf.field_mask_pb2.FieldMask):
Required. The list of fields to update. Currently, this only
supports updating ``display_name``.
"""
corpus: retriever.Corpus = proto.Field(
proto.MESSAGE,
number=1,
message=retriever.Corpus,
)
update_mask: field_mask_pb2.FieldMask = proto.Field(
proto.MESSAGE,
number=2,
message=field_mask_pb2.FieldMask,
)
class DeleteCorpusRequest(proto.Message):
r"""Request to delete a ``Corpus``.
Attributes:
name (str):
Required. The resource name of the ``Corpus``. Example:
``corpora/my-corpus-123``
force (bool):
Optional. If set to true, any ``Document``\ s and objects
related to this ``Corpus`` will also be deleted.
If false (the default), a ``FAILED_PRECONDITION`` error will
be returned if ``Corpus`` contains any ``Document``\ s.
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
force: bool = proto.Field(
proto.BOOL,
number=2,
)
class ListCorporaRequest(proto.Message):
r"""Request for listing ``Corpora``.
Attributes:
page_size (int):
Optional. The maximum number of ``Corpora`` to return (per
page). The service may return fewer ``Corpora``.
If unspecified, at most 10 ``Corpora`` will be returned. The
maximum size limit is 20 ``Corpora`` per page.
page_token (str):
Optional. A page token, received from a previous
``ListCorpora`` call.
Provide the ``next_page_token`` returned in the response as
an argument to the next request to retrieve the next page.
When paginating, all other parameters provided to
``ListCorpora`` must match the call that provided the page
token.
"""
page_size: int = proto.Field(
proto.INT32,
number=1,
)
page_token: str = proto.Field(
proto.STRING,
number=2,
)
class ListCorporaResponse(proto.Message):
r"""Response from ``ListCorpora`` containing a paginated list of
``Corpora``. The results are sorted by ascending
``corpus.create_time``.
Attributes:
corpora (MutableSequence[google.ai.generativelanguage_v1beta.types.Corpus]):
The returned corpora.
next_page_token (str):
A token, which can be sent as ``page_token`` to retrieve the
next page. If this field is omitted, there are no more
pages.
"""
@property
def raw_page(self):
return self
corpora: MutableSequence[retriever.Corpus] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=retriever.Corpus,
)
next_page_token: str = proto.Field(
proto.STRING,
number=2,
)
class QueryCorpusRequest(proto.Message):
r"""Request for querying a ``Corpus``.
Attributes:
name (str):
Required. The name of the ``Corpus`` to query. Example:
``corpora/my-corpus-123``
query (str):
Required. Query string to perform semantic
search.
metadata_filters (MutableSequence[google.ai.generativelanguage_v1beta.types.MetadataFilter]):
Optional. Filter for ``Chunk`` and ``Document`` metadata.
Each ``MetadataFilter`` object should correspond to a unique
key. Multiple ``MetadataFilter`` objects are joined by
logical "AND"s.
Example query at document level: (year >= 2020 OR year <
2010) AND (genre = drama OR genre = action)
``MetadataFilter`` object list: metadata_filters = [ {key =
"document.custom_metadata.year" conditions = [{int_value =
2020, operation = GREATER_EQUAL}, {int_value = 2010,
operation = LESS}]}, {key = "document.custom_metadata.year"
conditions = [{int_value = 2020, operation = GREATER_EQUAL},
{int_value = 2010, operation = LESS}]}, {key =
"document.custom_metadata.genre" conditions = [{string_value
= "drama", operation = EQUAL}, {string_value = "action",
operation = EQUAL}]}]
Example query at chunk level for a numeric range of values:
(year > 2015 AND year <= 2020)
``MetadataFilter`` object list: metadata_filters = [ {key =
"chunk.custom_metadata.year" conditions = [{int_value =
2015, operation = GREATER}]}, {key =
"chunk.custom_metadata.year" conditions = [{int_value =
2020, operation = LESS_EQUAL}]}]
Note: "AND"s for the same key are only supported for numeric
values. String values only support "OR"s for the same key.
results_count (int):
Optional. The maximum number of ``Chunk``\ s to return. The
service may return fewer ``Chunk``\ s.
If unspecified, at most 10 ``Chunk``\ s will be returned.
The maximum specified result count is 100.
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
query: str = proto.Field(
proto.STRING,
number=2,
)
metadata_filters: MutableSequence[retriever.MetadataFilter] = proto.RepeatedField(
proto.MESSAGE,
number=3,
message=retriever.MetadataFilter,
)
results_count: int = proto.Field(
proto.INT32,
number=4,
)
class QueryCorpusResponse(proto.Message):
r"""Response from ``QueryCorpus`` containing a list of relevant chunks.
Attributes:
relevant_chunks (MutableSequence[google.ai.generativelanguage_v1beta.types.RelevantChunk]):
The relevant chunks.
"""
relevant_chunks: MutableSequence["RelevantChunk"] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message="RelevantChunk",
)
class RelevantChunk(proto.Message):
r"""The information for a chunk relevant to a query.
Attributes:
chunk_relevance_score (float):
``Chunk`` relevance to the query.
chunk (google.ai.generativelanguage_v1beta.types.Chunk):
``Chunk`` associated with the query.
"""
chunk_relevance_score: float = proto.Field(
proto.FLOAT,
number=1,
)
chunk: retriever.Chunk = proto.Field(
proto.MESSAGE,
number=2,
message=retriever.Chunk,
)
class CreateDocumentRequest(proto.Message):
r"""Request to create a ``Document``.
Attributes:
parent (str):
Required. The name of the ``Corpus`` where this ``Document``
will be created. Example: ``corpora/my-corpus-123``
document (google.ai.generativelanguage_v1beta.types.Document):
Required. The ``Document`` to create.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
document: retriever.Document = proto.Field(
proto.MESSAGE,
number=2,
message=retriever.Document,
)
class GetDocumentRequest(proto.Message):
r"""Request for getting information about a specific ``Document``.
Attributes:
name (str):
Required. The name of the ``Document`` to retrieve. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
class UpdateDocumentRequest(proto.Message):
r"""Request to update a ``Document``.
Attributes:
document (google.ai.generativelanguage_v1beta.types.Document):
Required. The ``Document`` to update.
update_mask (google.protobuf.field_mask_pb2.FieldMask):
Required. The list of fields to update. Currently, this only
supports updating ``display_name`` and ``custom_metadata``.
"""
document: retriever.Document = proto.Field(
proto.MESSAGE,
number=1,
message=retriever.Document,
)
update_mask: field_mask_pb2.FieldMask = proto.Field(
proto.MESSAGE,
number=2,
message=field_mask_pb2.FieldMask,
)
class DeleteDocumentRequest(proto.Message):
r"""Request to delete a ``Document``.
Attributes:
name (str):
Required. The resource name of the ``Document`` to delete.
Example: ``corpora/my-corpus-123/documents/the-doc-abc``
force (bool):
Optional. If set to true, any ``Chunk``\ s and objects
related to this ``Document`` will also be deleted.
If false (the default), a ``FAILED_PRECONDITION`` error will
be returned if ``Document`` contains any ``Chunk``\ s.
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
force: bool = proto.Field(
proto.BOOL,
number=2,
)
class ListDocumentsRequest(proto.Message):
r"""Request for listing ``Document``\ s.
Attributes:
parent (str):
Required. The name of the ``Corpus`` containing
``Document``\ s. Example: ``corpora/my-corpus-123``
page_size (int):
Optional. The maximum number of ``Document``\ s to return
(per page). The service may return fewer ``Document``\ s.
If unspecified, at most 10 ``Document``\ s will be returned.
The maximum size limit is 20 ``Document``\ s per page.
page_token (str):
Optional. A page token, received from a previous
``ListDocuments`` call.
Provide the ``next_page_token`` returned in the response as
an argument to the next request to retrieve the next page.
When paginating, all other parameters provided to
``ListDocuments`` must match the call that provided the page
token.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
page_size: int = proto.Field(
proto.INT32,
number=2,
)
page_token: str = proto.Field(
proto.STRING,
number=3,
)
class ListDocumentsResponse(proto.Message):
r"""Response from ``ListDocuments`` containing a paginated list of
``Document``\ s. The ``Document``\ s are sorted by ascending
``document.create_time``.
Attributes:
documents (MutableSequence[google.ai.generativelanguage_v1beta.types.Document]):
The returned ``Document``\ s.
next_page_token (str):
A token, which can be sent as ``page_token`` to retrieve the
next page. If this field is omitted, there are no more
pages.
"""
@property
def raw_page(self):
return self
documents: MutableSequence[retriever.Document] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=retriever.Document,
)
next_page_token: str = proto.Field(
proto.STRING,
number=2,
)
class QueryDocumentRequest(proto.Message):
r"""Request for querying a ``Document``.
Attributes:
name (str):
Required. The name of the ``Document`` to query. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
query (str):
Required. Query string to perform semantic
search.
results_count (int):
Optional. The maximum number of ``Chunk``\ s to return. The
service may return fewer ``Chunk``\ s.
If unspecified, at most 10 ``Chunk``\ s will be returned.
The maximum specified result count is 100.
metadata_filters (MutableSequence[google.ai.generativelanguage_v1beta.types.MetadataFilter]):
Optional. Filter for ``Chunk`` metadata. Each
``MetadataFilter`` object should correspond to a unique key.
Multiple ``MetadataFilter`` objects are joined by logical
"AND"s.
Note: ``Document``-level filtering is not supported for this
request because a ``Document`` name is already specified.
Example query: (year >= 2020 OR year < 2010) AND (genre =
drama OR genre = action)
``MetadataFilter`` object list: metadata_filters = [ {key =
"chunk.custom_metadata.year" conditions = [{int_value =
2020, operation = GREATER_EQUAL}, {int_value = 2010,
operation = LESS}}, {key = "chunk.custom_metadata.genre"
conditions = [{string_value = "drama", operation = EQUAL},
{string_value = "action", operation = EQUAL}}]
Example query for a numeric range of values: (year > 2015
AND year <= 2020)
``MetadataFilter`` object list: metadata_filters = [ {key =
"chunk.custom_metadata.year" conditions = [{int_value =
2015, operation = GREATER}]}, {key =
"chunk.custom_metadata.year" conditions = [{int_value =
2020, operation = LESS_EQUAL}]}]
Note: "AND"s for the same key are only supported for numeric
values. String values only support "OR"s for the same key.
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
query: str = proto.Field(
proto.STRING,
number=2,
)
results_count: int = proto.Field(
proto.INT32,
number=3,
)
metadata_filters: MutableSequence[retriever.MetadataFilter] = proto.RepeatedField(
proto.MESSAGE,
number=4,
message=retriever.MetadataFilter,
)
class QueryDocumentResponse(proto.Message):
r"""Response from ``QueryDocument`` containing a list of relevant
chunks.
Attributes:
relevant_chunks (MutableSequence[google.ai.generativelanguage_v1beta.types.RelevantChunk]):
The returned relevant chunks.
"""
relevant_chunks: MutableSequence["RelevantChunk"] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message="RelevantChunk",
)
class CreateChunkRequest(proto.Message):
r"""Request to create a ``Chunk``.
Attributes:
parent (str):
Required. The name of the ``Document`` where this ``Chunk``
will be created. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
chunk (google.ai.generativelanguage_v1beta.types.Chunk):
Required. The ``Chunk`` to create.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
chunk: retriever.Chunk = proto.Field(
proto.MESSAGE,
number=2,
message=retriever.Chunk,
)
class BatchCreateChunksRequest(proto.Message):
r"""Request to batch create ``Chunk``\ s.
Attributes:
parent (str):
Optional. The name of the ``Document`` where this batch of
``Chunk``\ s will be created. The parent field in every
``CreateChunkRequest`` must match this value. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
requests (MutableSequence[google.ai.generativelanguage_v1beta.types.CreateChunkRequest]):
Required. The request messages specifying the ``Chunk``\ s
to create. A maximum of 100 ``Chunk``\ s can be created in a
batch.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
requests: MutableSequence["CreateChunkRequest"] = proto.RepeatedField(
proto.MESSAGE,
number=2,
message="CreateChunkRequest",
)
class BatchCreateChunksResponse(proto.Message):
r"""Response from ``BatchCreateChunks`` containing a list of created
``Chunk``\ s.
Attributes:
chunks (MutableSequence[google.ai.generativelanguage_v1beta.types.Chunk]):
``Chunk``\ s created.
"""
chunks: MutableSequence[retriever.Chunk] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=retriever.Chunk,
)
class GetChunkRequest(proto.Message):
r"""Request for getting information about a specific ``Chunk``.
Attributes:
name (str):
Required. The name of the ``Chunk`` to retrieve. Example:
``corpora/my-corpus-123/documents/the-doc-abc/chunks/some-chunk``
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
class UpdateChunkRequest(proto.Message):
r"""Request to update a ``Chunk``.
Attributes:
chunk (google.ai.generativelanguage_v1beta.types.Chunk):
Required. The ``Chunk`` to update.
update_mask (google.protobuf.field_mask_pb2.FieldMask):
Required. The list of fields to update. Currently, this only
supports updating ``custom_metadata`` and ``data``.
"""
chunk: retriever.Chunk = proto.Field(
proto.MESSAGE,
number=1,
message=retriever.Chunk,
)
update_mask: field_mask_pb2.FieldMask = proto.Field(
proto.MESSAGE,
number=2,
message=field_mask_pb2.FieldMask,
)
class BatchUpdateChunksRequest(proto.Message):
r"""Request to batch update ``Chunk``\ s.
Attributes:
parent (str):
Optional. The name of the ``Document`` containing the
``Chunk``\ s to update. The parent field in every
``UpdateChunkRequest`` must match this value. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
requests (MutableSequence[google.ai.generativelanguage_v1beta.types.UpdateChunkRequest]):
Required. The request messages specifying the ``Chunk``\ s
to update. A maximum of 100 ``Chunk``\ s can be updated in a
batch.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
requests: MutableSequence["UpdateChunkRequest"] = proto.RepeatedField(
proto.MESSAGE,
number=2,
message="UpdateChunkRequest",
)
class BatchUpdateChunksResponse(proto.Message):
r"""Response from ``BatchUpdateChunks`` containing a list of updated
``Chunk``\ s.
Attributes:
chunks (MutableSequence[google.ai.generativelanguage_v1beta.types.Chunk]):
``Chunk``\ s updated.
"""
chunks: MutableSequence[retriever.Chunk] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=retriever.Chunk,
)
class DeleteChunkRequest(proto.Message):
r"""Request to delete a ``Chunk``.
Attributes:
name (str):
Required. The resource name of the ``Chunk`` to delete.
Example:
``corpora/my-corpus-123/documents/the-doc-abc/chunks/some-chunk``
"""
name: str = proto.Field(
proto.STRING,
number=1,
)
class BatchDeleteChunksRequest(proto.Message):
r"""Request to batch delete ``Chunk``\ s.
Attributes:
parent (str):
Optional. The name of the ``Document`` containing the
``Chunk``\ s to delete. The parent field in every
``DeleteChunkRequest`` must match this value. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
requests (MutableSequence[google.ai.generativelanguage_v1beta.types.DeleteChunkRequest]):
Required. The request messages specifying the ``Chunk``\ s
to delete.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
requests: MutableSequence["DeleteChunkRequest"] = proto.RepeatedField(
proto.MESSAGE,
number=2,
message="DeleteChunkRequest",
)
class ListChunksRequest(proto.Message):
r"""Request for listing ``Chunk``\ s.
Attributes:
parent (str):
Required. The name of the ``Document`` containing
``Chunk``\ s. Example:
``corpora/my-corpus-123/documents/the-doc-abc``
page_size (int):
Optional. The maximum number of ``Chunk``\ s to return (per
page). The service may return fewer ``Chunk``\ s.
If unspecified, at most 10 ``Chunk``\ s will be returned.
The maximum size limit is 100 ``Chunk``\ s per page.
page_token (str):
Optional. A page token, received from a previous
``ListChunks`` call.
Provide the ``next_page_token`` returned in the response as
an argument to the next request to retrieve the next page.
When paginating, all other parameters provided to
``ListChunks`` must match the call that provided the page
token.
"""
parent: str = proto.Field(
proto.STRING,
number=1,
)
page_size: int = proto.Field(
proto.INT32,
number=2,
)
page_token: str = proto.Field(
proto.STRING,
number=3,
)
class ListChunksResponse(proto.Message):
r"""Response from ``ListChunks`` containing a paginated list of
``Chunk``\ s. The ``Chunk``\ s are sorted by ascending
``chunk.create_time``.
Attributes:
chunks (MutableSequence[google.ai.generativelanguage_v1beta.types.Chunk]):
The returned ``Chunk``\ s.
next_page_token (str):
A token, which can be sent as ``page_token`` to retrieve the
next page. If this field is omitted, there are no more
pages.
"""
@property
def raw_page(self):
return self
chunks: MutableSequence[retriever.Chunk] = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=retriever.Chunk,
)
next_page_token: str = proto.Field(
proto.STRING,
number=2,
)
__all__ = tuple(sorted(__protobuf__.manifest))