-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
content.pb.go
executable file
·2006 lines (1785 loc) · 79.1 KB
/
content.pb.go
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
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2023 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.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.32.0
// protoc v4.25.2
// source: google/cloud/aiplatform/v1beta1/content.proto
package aiplatformpb
import (
reflect "reflect"
sync "sync"
_ "google.golang.org/genproto/googleapis/api/annotations"
date "google.golang.org/genproto/googleapis/type/date"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Harm categories that will block the content.
type HarmCategory int32
const (
// The harm category is unspecified.
HarmCategory_HARM_CATEGORY_UNSPECIFIED HarmCategory = 0
// The harm category is hate speech.
HarmCategory_HARM_CATEGORY_HATE_SPEECH HarmCategory = 1
// The harm category is dangerous content.
HarmCategory_HARM_CATEGORY_DANGEROUS_CONTENT HarmCategory = 2
// The harm category is harassment.
HarmCategory_HARM_CATEGORY_HARASSMENT HarmCategory = 3
// The harm category is sexually explicit content.
HarmCategory_HARM_CATEGORY_SEXUALLY_EXPLICIT HarmCategory = 4
)
// Enum value maps for HarmCategory.
var (
HarmCategory_name = map[int32]string{
0: "HARM_CATEGORY_UNSPECIFIED",
1: "HARM_CATEGORY_HATE_SPEECH",
2: "HARM_CATEGORY_DANGEROUS_CONTENT",
3: "HARM_CATEGORY_HARASSMENT",
4: "HARM_CATEGORY_SEXUALLY_EXPLICIT",
}
HarmCategory_value = map[string]int32{
"HARM_CATEGORY_UNSPECIFIED": 0,
"HARM_CATEGORY_HATE_SPEECH": 1,
"HARM_CATEGORY_DANGEROUS_CONTENT": 2,
"HARM_CATEGORY_HARASSMENT": 3,
"HARM_CATEGORY_SEXUALLY_EXPLICIT": 4,
}
)
func (x HarmCategory) Enum() *HarmCategory {
p := new(HarmCategory)
*p = x
return p
}
func (x HarmCategory) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (HarmCategory) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[0].Descriptor()
}
func (HarmCategory) Type() protoreflect.EnumType {
return &file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[0]
}
func (x HarmCategory) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use HarmCategory.Descriptor instead.
func (HarmCategory) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{0}
}
// Probability based thresholds levels for blocking.
type SafetySetting_HarmBlockThreshold int32
const (
// Unspecified harm block threshold.
SafetySetting_HARM_BLOCK_THRESHOLD_UNSPECIFIED SafetySetting_HarmBlockThreshold = 0
// Block low threshold and above (i.e. block more).
SafetySetting_BLOCK_LOW_AND_ABOVE SafetySetting_HarmBlockThreshold = 1
// Block medium threshold and above.
SafetySetting_BLOCK_MEDIUM_AND_ABOVE SafetySetting_HarmBlockThreshold = 2
// Block only high threshold (i.e. block less).
SafetySetting_BLOCK_ONLY_HIGH SafetySetting_HarmBlockThreshold = 3
// Block none.
SafetySetting_BLOCK_NONE SafetySetting_HarmBlockThreshold = 4
)
// Enum value maps for SafetySetting_HarmBlockThreshold.
var (
SafetySetting_HarmBlockThreshold_name = map[int32]string{
0: "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
1: "BLOCK_LOW_AND_ABOVE",
2: "BLOCK_MEDIUM_AND_ABOVE",
3: "BLOCK_ONLY_HIGH",
4: "BLOCK_NONE",
}
SafetySetting_HarmBlockThreshold_value = map[string]int32{
"HARM_BLOCK_THRESHOLD_UNSPECIFIED": 0,
"BLOCK_LOW_AND_ABOVE": 1,
"BLOCK_MEDIUM_AND_ABOVE": 2,
"BLOCK_ONLY_HIGH": 3,
"BLOCK_NONE": 4,
}
)
func (x SafetySetting_HarmBlockThreshold) Enum() *SafetySetting_HarmBlockThreshold {
p := new(SafetySetting_HarmBlockThreshold)
*p = x
return p
}
func (x SafetySetting_HarmBlockThreshold) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SafetySetting_HarmBlockThreshold) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[1].Descriptor()
}
func (SafetySetting_HarmBlockThreshold) Type() protoreflect.EnumType {
return &file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[1]
}
func (x SafetySetting_HarmBlockThreshold) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SafetySetting_HarmBlockThreshold.Descriptor instead.
func (SafetySetting_HarmBlockThreshold) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{6, 0}
}
// Harm probability levels in the content.
type SafetyRating_HarmProbability int32
const (
// Harm probability unspecified.
SafetyRating_HARM_PROBABILITY_UNSPECIFIED SafetyRating_HarmProbability = 0
// Negligible level of harm.
SafetyRating_NEGLIGIBLE SafetyRating_HarmProbability = 1
// Low level of harm.
SafetyRating_LOW SafetyRating_HarmProbability = 2
// Medium level of harm.
SafetyRating_MEDIUM SafetyRating_HarmProbability = 3
// High level of harm.
SafetyRating_HIGH SafetyRating_HarmProbability = 4
)
// Enum value maps for SafetyRating_HarmProbability.
var (
SafetyRating_HarmProbability_name = map[int32]string{
0: "HARM_PROBABILITY_UNSPECIFIED",
1: "NEGLIGIBLE",
2: "LOW",
3: "MEDIUM",
4: "HIGH",
}
SafetyRating_HarmProbability_value = map[string]int32{
"HARM_PROBABILITY_UNSPECIFIED": 0,
"NEGLIGIBLE": 1,
"LOW": 2,
"MEDIUM": 3,
"HIGH": 4,
}
)
func (x SafetyRating_HarmProbability) Enum() *SafetyRating_HarmProbability {
p := new(SafetyRating_HarmProbability)
*p = x
return p
}
func (x SafetyRating_HarmProbability) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SafetyRating_HarmProbability) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[2].Descriptor()
}
func (SafetyRating_HarmProbability) Type() protoreflect.EnumType {
return &file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[2]
}
func (x SafetyRating_HarmProbability) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SafetyRating_HarmProbability.Descriptor instead.
func (SafetyRating_HarmProbability) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{7, 0}
}
// The reason why the model stopped generating tokens.
// If empty, the model has not stopped generating the tokens.
type Candidate_FinishReason int32
const (
// The finish reason is unspecified.
Candidate_FINISH_REASON_UNSPECIFIED Candidate_FinishReason = 0
// Natural stop point of the model or provided stop sequence.
Candidate_STOP Candidate_FinishReason = 1
// The maximum number of tokens as specified in the request was reached.
Candidate_MAX_TOKENS Candidate_FinishReason = 2
// The token generation was stopped as the response was flagged for safety
// reasons. NOTE: When streaming the Candidate.content will be empty if
// content filters blocked the output.
Candidate_SAFETY Candidate_FinishReason = 3
// The token generation was stopped as the response was flagged for
// unauthorized citations.
Candidate_RECITATION Candidate_FinishReason = 4
// All other reasons that stopped the token generation
Candidate_OTHER Candidate_FinishReason = 5
)
// Enum value maps for Candidate_FinishReason.
var (
Candidate_FinishReason_name = map[int32]string{
0: "FINISH_REASON_UNSPECIFIED",
1: "STOP",
2: "MAX_TOKENS",
3: "SAFETY",
4: "RECITATION",
5: "OTHER",
}
Candidate_FinishReason_value = map[string]int32{
"FINISH_REASON_UNSPECIFIED": 0,
"STOP": 1,
"MAX_TOKENS": 2,
"SAFETY": 3,
"RECITATION": 4,
"OTHER": 5,
}
)
func (x Candidate_FinishReason) Enum() *Candidate_FinishReason {
p := new(Candidate_FinishReason)
*p = x
return p
}
func (x Candidate_FinishReason) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Candidate_FinishReason) Descriptor() protoreflect.EnumDescriptor {
return file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[3].Descriptor()
}
func (Candidate_FinishReason) Type() protoreflect.EnumType {
return &file_google_cloud_aiplatform_v1beta1_content_proto_enumTypes[3]
}
func (x Candidate_FinishReason) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Candidate_FinishReason.Descriptor instead.
func (Candidate_FinishReason) EnumDescriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{10, 0}
}
// The base structured datatype containing multi-part content of a message.
//
// A `Content` includes a `role` field designating the producer of the `Content`
// and a `parts` field containing multi-part data that contains the content of
// the message turn.
type Content struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. The producer of the content. Must be either 'user' or 'model'.
//
// Useful to set for multi-turn conversations, otherwise can be left blank
// or unset.
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
// Required. Ordered `Parts` that constitute a single message. Parts may have
// different IANA MIME types.
Parts []*Part `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts,omitempty"`
}
func (x *Content) Reset() {
*x = Content{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Content) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Content) ProtoMessage() {}
func (x *Content) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Content.ProtoReflect.Descriptor instead.
func (*Content) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{0}
}
func (x *Content) GetRole() string {
if x != nil {
return x.Role
}
return ""
}
func (x *Content) GetParts() []*Part {
if x != nil {
return x.Parts
}
return nil
}
// A datatype containing media that is part of a multi-part `Content` message.
//
// A `Part` consists of data which has an associated datatype. A `Part` can only
// contain one of the accepted types in `Part.data`.
//
// A `Part` must have a fixed IANA MIME type identifying the type and subtype
// of the media if `inline_data` or `file_data` field is filled with raw bytes.
type Part struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Data:
//
// *Part_Text
// *Part_InlineData
// *Part_FileData
// *Part_FunctionCall
// *Part_FunctionResponse
Data isPart_Data `protobuf_oneof:"data"`
// Types that are assignable to Metadata:
//
// *Part_VideoMetadata
Metadata isPart_Metadata `protobuf_oneof:"metadata"`
}
func (x *Part) Reset() {
*x = Part{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Part) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Part) ProtoMessage() {}
func (x *Part) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Part.ProtoReflect.Descriptor instead.
func (*Part) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{1}
}
func (m *Part) GetData() isPart_Data {
if m != nil {
return m.Data
}
return nil
}
func (x *Part) GetText() string {
if x, ok := x.GetData().(*Part_Text); ok {
return x.Text
}
return ""
}
func (x *Part) GetInlineData() *Blob {
if x, ok := x.GetData().(*Part_InlineData); ok {
return x.InlineData
}
return nil
}
func (x *Part) GetFileData() *FileData {
if x, ok := x.GetData().(*Part_FileData); ok {
return x.FileData
}
return nil
}
func (x *Part) GetFunctionCall() *FunctionCall {
if x, ok := x.GetData().(*Part_FunctionCall); ok {
return x.FunctionCall
}
return nil
}
func (x *Part) GetFunctionResponse() *FunctionResponse {
if x, ok := x.GetData().(*Part_FunctionResponse); ok {
return x.FunctionResponse
}
return nil
}
func (m *Part) GetMetadata() isPart_Metadata {
if m != nil {
return m.Metadata
}
return nil
}
func (x *Part) GetVideoMetadata() *VideoMetadata {
if x, ok := x.GetMetadata().(*Part_VideoMetadata); ok {
return x.VideoMetadata
}
return nil
}
type isPart_Data interface {
isPart_Data()
}
type Part_Text struct {
// Optional. Text part (can be code).
Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}
type Part_InlineData struct {
// Optional. Inlined bytes data.
InlineData *Blob `protobuf:"bytes,2,opt,name=inline_data,json=inlineData,proto3,oneof"`
}
type Part_FileData struct {
// Optional. URI based data.
FileData *FileData `protobuf:"bytes,3,opt,name=file_data,json=fileData,proto3,oneof"`
}
type Part_FunctionCall struct {
// Optional. A predicted [FunctionCall] returned from the model that
// contains a string representing the [FunctionDeclaration.name] with the
// parameters and their values.
FunctionCall *FunctionCall `protobuf:"bytes,5,opt,name=function_call,json=functionCall,proto3,oneof"`
}
type Part_FunctionResponse struct {
// Optional. The result output of a [FunctionCall] that contains a string
// representing the [FunctionDeclaration.name] and a structured JSON object
// containing any output from the function call. It is used as context to
// the model.
FunctionResponse *FunctionResponse `protobuf:"bytes,6,opt,name=function_response,json=functionResponse,proto3,oneof"`
}
func (*Part_Text) isPart_Data() {}
func (*Part_InlineData) isPart_Data() {}
func (*Part_FileData) isPart_Data() {}
func (*Part_FunctionCall) isPart_Data() {}
func (*Part_FunctionResponse) isPart_Data() {}
type isPart_Metadata interface {
isPart_Metadata()
}
type Part_VideoMetadata struct {
// Optional. Video metadata. The metadata should only be specified while the
// video data is presented in inline_data or file_data.
VideoMetadata *VideoMetadata `protobuf:"bytes,4,opt,name=video_metadata,json=videoMetadata,proto3,oneof"`
}
func (*Part_VideoMetadata) isPart_Metadata() {}
// Raw media bytes.
//
// Text should not be sent as raw bytes, use the 'text' field.
type Blob struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The IANA standard MIME type of the source data.
MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// Required. Raw bytes for media formats.
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}
func (x *Blob) Reset() {
*x = Blob{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Blob) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Blob) ProtoMessage() {}
func (x *Blob) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Blob.ProtoReflect.Descriptor instead.
func (*Blob) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{2}
}
func (x *Blob) GetMimeType() string {
if x != nil {
return x.MimeType
}
return ""
}
func (x *Blob) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
// URI based data.
type FileData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. The IANA standard MIME type of the source data.
MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// Required. URI.
FileUri string `protobuf:"bytes,2,opt,name=file_uri,json=fileUri,proto3" json:"file_uri,omitempty"`
}
func (x *FileData) Reset() {
*x = FileData{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FileData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FileData) ProtoMessage() {}
func (x *FileData) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FileData.ProtoReflect.Descriptor instead.
func (*FileData) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{3}
}
func (x *FileData) GetMimeType() string {
if x != nil {
return x.MimeType
}
return ""
}
func (x *FileData) GetFileUri() string {
if x != nil {
return x.FileUri
}
return ""
}
// Metadata describes the input video content.
type VideoMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. The start offset of the video.
StartOffset *durationpb.Duration `protobuf:"bytes,1,opt,name=start_offset,json=startOffset,proto3" json:"start_offset,omitempty"`
// Optional. The end offset of the video.
EndOffset *durationpb.Duration `protobuf:"bytes,2,opt,name=end_offset,json=endOffset,proto3" json:"end_offset,omitempty"`
}
func (x *VideoMetadata) Reset() {
*x = VideoMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *VideoMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*VideoMetadata) ProtoMessage() {}
func (x *VideoMetadata) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use VideoMetadata.ProtoReflect.Descriptor instead.
func (*VideoMetadata) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{4}
}
func (x *VideoMetadata) GetStartOffset() *durationpb.Duration {
if x != nil {
return x.StartOffset
}
return nil
}
func (x *VideoMetadata) GetEndOffset() *durationpb.Duration {
if x != nil {
return x.EndOffset
}
return nil
}
// Generation config.
type GenerationConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. Controls the randomness of predictions.
Temperature *float32 `protobuf:"fixed32,1,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
// Optional. If specified, nucleus sampling will be used.
TopP *float32 `protobuf:"fixed32,2,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"`
// Optional. If specified, top-k sampling will be used.
TopK *float32 `protobuf:"fixed32,3,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"`
// Optional. Number of candidates to generate.
CandidateCount *int32 `protobuf:"varint,4,opt,name=candidate_count,json=candidateCount,proto3,oneof" json:"candidate_count,omitempty"`
// Optional. The maximum number of output tokens to generate per message.
MaxOutputTokens *int32 `protobuf:"varint,5,opt,name=max_output_tokens,json=maxOutputTokens,proto3,oneof" json:"max_output_tokens,omitempty"`
// Optional. Stop sequences.
StopSequences []string `protobuf:"bytes,6,rep,name=stop_sequences,json=stopSequences,proto3" json:"stop_sequences,omitempty"`
}
func (x *GenerationConfig) Reset() {
*x = GenerationConfig{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GenerationConfig) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GenerationConfig) ProtoMessage() {}
func (x *GenerationConfig) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GenerationConfig.ProtoReflect.Descriptor instead.
func (*GenerationConfig) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{5}
}
func (x *GenerationConfig) GetTemperature() float32 {
if x != nil && x.Temperature != nil {
return *x.Temperature
}
return 0
}
func (x *GenerationConfig) GetTopP() float32 {
if x != nil && x.TopP != nil {
return *x.TopP
}
return 0
}
func (x *GenerationConfig) GetTopK() float32 {
if x != nil && x.TopK != nil {
return *x.TopK
}
return 0
}
func (x *GenerationConfig) GetCandidateCount() int32 {
if x != nil && x.CandidateCount != nil {
return *x.CandidateCount
}
return 0
}
func (x *GenerationConfig) GetMaxOutputTokens() int32 {
if x != nil && x.MaxOutputTokens != nil {
return *x.MaxOutputTokens
}
return 0
}
func (x *GenerationConfig) GetStopSequences() []string {
if x != nil {
return x.StopSequences
}
return nil
}
// Safety settings.
type SafetySetting struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Required. Harm category.
Category HarmCategory `protobuf:"varint,1,opt,name=category,proto3,enum=google.cloud.aiplatform.v1beta1.HarmCategory" json:"category,omitempty"`
// Required. The harm block threshold.
Threshold SafetySetting_HarmBlockThreshold `protobuf:"varint,2,opt,name=threshold,proto3,enum=google.cloud.aiplatform.v1beta1.SafetySetting_HarmBlockThreshold" json:"threshold,omitempty"`
}
func (x *SafetySetting) Reset() {
*x = SafetySetting{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SafetySetting) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SafetySetting) ProtoMessage() {}
func (x *SafetySetting) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SafetySetting.ProtoReflect.Descriptor instead.
func (*SafetySetting) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{6}
}
func (x *SafetySetting) GetCategory() HarmCategory {
if x != nil {
return x.Category
}
return HarmCategory_HARM_CATEGORY_UNSPECIFIED
}
func (x *SafetySetting) GetThreshold() SafetySetting_HarmBlockThreshold {
if x != nil {
return x.Threshold
}
return SafetySetting_HARM_BLOCK_THRESHOLD_UNSPECIFIED
}
// Safety rating corresponding to the generated content.
type SafetyRating struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. Harm category.
Category HarmCategory `protobuf:"varint,1,opt,name=category,proto3,enum=google.cloud.aiplatform.v1beta1.HarmCategory" json:"category,omitempty"`
// Output only. Harm probability levels in the content.
Probability SafetyRating_HarmProbability `protobuf:"varint,2,opt,name=probability,proto3,enum=google.cloud.aiplatform.v1beta1.SafetyRating_HarmProbability" json:"probability,omitempty"`
// Output only. Indicates whether the content was filtered out because of this
// rating.
Blocked bool `protobuf:"varint,3,opt,name=blocked,proto3" json:"blocked,omitempty"`
}
func (x *SafetyRating) Reset() {
*x = SafetyRating{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SafetyRating) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SafetyRating) ProtoMessage() {}
func (x *SafetyRating) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SafetyRating.ProtoReflect.Descriptor instead.
func (*SafetyRating) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{7}
}
func (x *SafetyRating) GetCategory() HarmCategory {
if x != nil {
return x.Category
}
return HarmCategory_HARM_CATEGORY_UNSPECIFIED
}
func (x *SafetyRating) GetProbability() SafetyRating_HarmProbability {
if x != nil {
return x.Probability
}
return SafetyRating_HARM_PROBABILITY_UNSPECIFIED
}
func (x *SafetyRating) GetBlocked() bool {
if x != nil {
return x.Blocked
}
return false
}
// A collection of source attributions for a piece of content.
type CitationMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. List of citations.
Citations []*Citation `protobuf:"bytes,1,rep,name=citations,proto3" json:"citations,omitempty"`
}
func (x *CitationMetadata) Reset() {
*x = CitationMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CitationMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CitationMetadata) ProtoMessage() {}
func (x *CitationMetadata) ProtoReflect() protoreflect.Message {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CitationMetadata.ProtoReflect.Descriptor instead.
func (*CitationMetadata) Descriptor() ([]byte, []int) {
return file_google_cloud_aiplatform_v1beta1_content_proto_rawDescGZIP(), []int{8}
}
func (x *CitationMetadata) GetCitations() []*Citation {
if x != nil {
return x.Citations
}
return nil
}
// Source attributions for content.
type Citation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Output only. Start index into the content.
StartIndex int32 `protobuf:"varint,1,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"`
// Output only. End index into the content.
EndIndex int32 `protobuf:"varint,2,opt,name=end_index,json=endIndex,proto3" json:"end_index,omitempty"`
// Output only. Url reference of the attribution.
Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"`
// Output only. Title of the attribution.
Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`
// Output only. License of the attribution.
License string `protobuf:"bytes,5,opt,name=license,proto3" json:"license,omitempty"`
// Output only. Publication date of the attribution.
PublicationDate *date.Date `protobuf:"bytes,6,opt,name=publication_date,json=publicationDate,proto3" json:"publication_date,omitempty"`
}
func (x *Citation) Reset() {
*x = Citation{}
if protoimpl.UnsafeEnabled {
mi := &file_google_cloud_aiplatform_v1beta1_content_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}