-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
firebaseml.v2beta.json
1201 lines (1201 loc) 路 35.4 KB
/
firebaseml.v2beta.json
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
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/cloud-platform": {
"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account."
}
}
}
},
"basePath": "",
"baseUrl": "https://firebaseml.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Firebase ML",
"description": "Access custom machine learning models hosted via Firebase ML.",
"discoveryVersion": "v1",
"documentationLink": "https://firebase.google.com",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "firebaseml:v2beta",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://firebaseml.mtls.googleapis.com/",
"name": "firebaseml",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"projects": {
"resources": {
"locations": {
"resources": {
"publishers": {
"resources": {
"models": {
"methods": {
"countTokens": {
"description": "Perform a token counting.",
"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:countTokens",
"httpMethod": "POST",
"id": "firebaseml.projects.locations.publishers.models.countTokens",
"parameterOrder": [
"endpoint"
],
"parameters": {
"endpoint": {
"description": "Required. The name of the Endpoint requested to perform token counting. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v2beta/{+endpoint}:countTokens",
"request": {
"$ref": "CountTokensRequest"
},
"response": {
"$ref": "CountTokensResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"generateContent": {
"description": "Generate content with multimodal inputs.",
"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:generateContent",
"httpMethod": "POST",
"id": "firebaseml.projects.locations.publishers.models.generateContent",
"parameterOrder": [
"model"
],
"parameters": {
"model": {
"description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v2beta/{+model}:generateContent",
"request": {
"$ref": "GenerateContentRequest"
},
"response": {
"$ref": "GenerateContentResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"streamGenerateContent": {
"description": "Generate content with multimodal inputs with streaming support.",
"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/publishers/{publishersId}/models/{modelsId}:streamGenerateContent",
"httpMethod": "POST",
"id": "firebaseml.projects.locations.publishers.models.streamGenerateContent",
"parameterOrder": [
"model"
],
"parameters": {
"model": {
"description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/publishers/[^/]+/models/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v2beta/{+model}:streamGenerateContent",
"request": {
"$ref": "GenerateContentRequest"
},
"response": {
"$ref": "GenerateContentResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
}
}
}
}
}
}
}
},
"revision": "20240426",
"rootUrl": "https://firebaseml.googleapis.com/",
"schemas": {
"Blob": {
"description": "Content blob. It's preferred to send as text directly rather than raw bytes.",
"id": "Blob",
"properties": {
"data": {
"description": "Required. Raw bytes.",
"format": "byte",
"type": "string"
},
"mimeType": {
"description": "Required. The IANA standard MIME type of the source data.",
"type": "string"
}
},
"type": "object"
},
"Candidate": {
"description": "A response candidate generated from the model.",
"id": "Candidate",
"properties": {
"citationMetadata": {
"$ref": "CitationMetadata",
"description": "Output only. Source attribution of the generated content.",
"readOnly": true
},
"content": {
"$ref": "Content",
"description": "Output only. Content parts of the candidate.",
"readOnly": true
},
"finishMessage": {
"description": "Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.",
"readOnly": true,
"type": "string"
},
"finishReason": {
"description": "Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.",
"enum": [
"FINISH_REASON_UNSPECIFIED",
"STOP",
"MAX_TOKENS",
"SAFETY",
"RECITATION",
"OTHER",
"BLOCKLIST",
"PROHIBITED_CONTENT",
"SPII"
],
"enumDescriptions": [
"The finish reason is unspecified.",
"Natural stop point of the model or provided stop sequence.",
"The maximum number of tokens as specified in the request was reached.",
"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.",
"The token generation was stopped as the response was flagged for unauthorized citations.",
"All other reasons that stopped the token generation",
"The token generation was stopped as the response was flagged for the terms which are included from the terminology blocklist.",
"The token generation was stopped as the response was flagged for the prohibited contents.",
"The token generation was stopped as the response was flagged for Sensitive Personally Identifiable Information (SPII) contents."
],
"readOnly": true,
"type": "string"
},
"groundingMetadata": {
"$ref": "GroundingMetadata",
"description": "Output only. Metadata specifies sources used to ground generated content.",
"readOnly": true
},
"index": {
"description": "Output only. Index of the candidate.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"safetyRatings": {
"description": "Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.",
"items": {
"$ref": "SafetyRating"
},
"readOnly": true,
"type": "array"
}
},
"type": "object"
},
"Citation": {
"description": "Source attributions for content.",
"id": "Citation",
"properties": {
"endIndex": {
"description": "Output only. End index into the content.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"license": {
"description": "Output only. License of the attribution.",
"readOnly": true,
"type": "string"
},
"publicationDate": {
"$ref": "Date",
"description": "Output only. Publication date of the attribution.",
"readOnly": true
},
"startIndex": {
"description": "Output only. Start index into the content.",
"format": "int32",
"readOnly": true,
"type": "integer"
},
"title": {
"description": "Output only. Title of the attribution.",
"readOnly": true,
"type": "string"
},
"uri": {
"description": "Output only. Url reference of the attribution.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"CitationMetadata": {
"description": "A collection of source attributions for a piece of content.",
"id": "CitationMetadata",
"properties": {
"citations": {
"description": "Output only. List of citations.",
"items": {
"$ref": "Citation"
},
"readOnly": true,
"type": "array"
}
},
"type": "object"
},
"Content": {
"description": "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.",
"id": "Content",
"properties": {
"parts": {
"description": "Required. Ordered `Parts` that constitute a single message. Parts may have different IANA MIME types.",
"items": {
"$ref": "Part"
},
"type": "array"
},
"role": {
"description": "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.",
"type": "string"
}
},
"type": "object"
},
"CountTokensRequest": {
"description": "Request message for PredictionService.CountTokens.",
"id": "CountTokensRequest",
"properties": {
"contents": {
"description": "Required. Input content.",
"items": {
"$ref": "Content"
},
"type": "array"
},
"instances": {
"description": "Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.",
"items": {
"type": "any"
},
"type": "array"
},
"model": {
"description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`",
"type": "string"
}
},
"type": "object"
},
"CountTokensResponse": {
"description": "Response message for PredictionService.CountTokens.",
"id": "CountTokensResponse",
"properties": {
"totalBillableCharacters": {
"description": "The total number of billable characters counted across all instances from the request.",
"format": "int32",
"type": "integer"
},
"totalTokens": {
"description": "The total number of tokens counted across all instances from the request.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"Date": {
"description": "Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp",
"id": "Date",
"properties": {
"day": {
"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.",
"format": "int32",
"type": "integer"
},
"month": {
"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.",
"format": "int32",
"type": "integer"
},
"year": {
"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"FileData": {
"description": "URI based data.",
"id": "FileData",
"properties": {
"fileUri": {
"description": "Required. URI.",
"type": "string"
},
"mimeType": {
"description": "Required. The IANA standard MIME type of the source data.",
"type": "string"
}
},
"type": "object"
},
"FunctionCall": {
"description": "A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.",
"id": "FunctionCall",
"properties": {
"args": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details.",
"type": "object"
},
"name": {
"description": "Required. The name of the function to call. Matches [FunctionDeclaration.name].",
"type": "string"
}
},
"type": "object"
},
"FunctionCallingConfig": {
"description": "Function calling config.",
"id": "FunctionCallingConfig",
"properties": {
"allowedFunctionNames": {
"description": "Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided.",
"items": {
"type": "string"
},
"type": "array"
},
"mode": {
"description": "Optional. Function calling mode.",
"enum": [
"MODE_UNSPECIFIED",
"AUTO",
"ANY",
"NONE"
],
"enumDescriptions": [
"Unspecified function calling mode. This value should not be used.",
"Default model behavior, model decides to predict either a function call or a natural language repspose.",
"Model is constrained to always predicting a function call only. If \"allowed_function_names\" are set, the predicted function call will be limited to any one of \"allowed_function_names\", else the predicted function call will be any one of the provided \"function_declarations\".",
"Model will not predict any function call. Model behavior is same as when not passing any function declarations."
],
"type": "string"
}
},
"type": "object"
},
"FunctionDeclaration": {
"description": "Structured representation of a function declaration as defined by the [OpenAPI 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client.",
"id": "FunctionDeclaration",
"properties": {
"description": {
"description": "Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function.",
"type": "string"
},
"name": {
"description": "Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64.",
"type": "string"
},
"parameters": {
"$ref": "Schema",
"description": "Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1"
},
"response": {
"$ref": "Schema",
"description": "Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function."
}
},
"type": "object"
},
"FunctionResponse": {
"description": "The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a [FunctionCall] made based on model prediction.",
"id": "FunctionResponse",
"properties": {
"name": {
"description": "Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].",
"type": "string"
},
"response": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Required. The function response in JSON object format.",
"type": "object"
}
},
"type": "object"
},
"GenerateContentRequest": {
"description": "Request message for [PredictionService.GenerateContent].",
"id": "GenerateContentRequest",
"properties": {
"contents": {
"description": "Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.",
"items": {
"$ref": "Content"
},
"type": "array"
},
"generationConfig": {
"$ref": "GenerationConfig",
"description": "Optional. Generation config."
},
"safetySettings": {
"description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.",
"items": {
"$ref": "SafetySetting"
},
"type": "array"
},
"systemInstruction": {
"$ref": "Content",
"description": "Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph."
},
"toolConfig": {
"$ref": "ToolConfig",
"description": "Optional. Tool config. This config is shared for all tools provided in the request."
},
"tools": {
"description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.",
"items": {
"$ref": "Tool"
},
"type": "array"
}
},
"type": "object"
},
"GenerateContentResponse": {
"description": "Response message for [PredictionService.GenerateContent].",
"id": "GenerateContentResponse",
"properties": {
"candidates": {
"description": "Output only. Generated candidates.",
"items": {
"$ref": "Candidate"
},
"readOnly": true,
"type": "array"
},
"promptFeedback": {
"$ref": "PromptFeedback",
"description": "Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.",
"readOnly": true
},
"usageMetadata": {
"$ref": "UsageMetadata",
"description": "Usage metadata about the response(s)."
}
},
"type": "object"
},
"GenerationConfig": {
"description": "Generation config.",
"id": "GenerationConfig",
"properties": {
"candidateCount": {
"description": "Optional. Number of candidates to generate.",
"format": "int32",
"type": "integer"
},
"frequencyPenalty": {
"description": "Optional. Frequency penalties.",
"format": "float",
"type": "number"
},
"maxOutputTokens": {
"description": "Optional. The maximum number of output tokens to generate per message.",
"format": "int32",
"type": "integer"
},
"presencePenalty": {
"description": "Optional. Positive penalties.",
"format": "float",
"type": "number"
},
"responseMimeType": {
"description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.",
"type": "string"
},
"stopSequences": {
"description": "Optional. Stop sequences.",
"items": {
"type": "string"
},
"type": "array"
},
"temperature": {
"description": "Optional. Controls the randomness of predictions.",
"format": "float",
"type": "number"
},
"topK": {
"description": "Optional. If specified, top-k sampling will be used.",
"format": "float",
"type": "number"
},
"topP": {
"description": "Optional. If specified, nucleus sampling will be used.",
"format": "float",
"type": "number"
}
},
"type": "object"
},
"GroundingMetadata": {
"description": "Metadata returned to client when grounding is enabled.",
"id": "GroundingMetadata",
"properties": {
"retrievalQueries": {
"description": "Optional. Queries executed by the retrieval tools.",
"items": {
"type": "string"
},
"type": "array"
},
"searchEntryPoint": {
"$ref": "SearchEntryPoint",
"description": "Optional. Google search entry for the following-up web searches."
},
"webSearchQueries": {
"description": "Optional. Web search queries for the following-up web search.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"ModelOperationMetadata": {
"description": "This is returned in the longrunning operations for create/update.",
"id": "ModelOperationMetadata",
"properties": {
"basicOperationStatus": {
"enum": [
"BASIC_OPERATION_STATUS_UNSPECIFIED",
"BASIC_OPERATION_STATUS_UPLOADING",
"BASIC_OPERATION_STATUS_VERIFYING"
],
"enumDescriptions": [
"The status is unspecified",
"The model file is being uploaded",
"The model file is being verified"
],
"type": "string"
},
"name": {
"description": "The name of the model we are creating/updating The name must have the form `projects/{project_id}/models/{model_id}`",
"type": "string"
}
},
"type": "object"
},
"Part": {
"description": "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.",
"id": "Part",
"properties": {
"fileData": {
"$ref": "FileData",
"description": "Optional. URI based data."
},
"functionCall": {
"$ref": "FunctionCall",
"description": "Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values."
},
"functionResponse": {
"$ref": "FunctionResponse",
"description": "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."
},
"inlineData": {
"$ref": "Blob",
"description": "Optional. Inlined bytes data."
},
"text": {
"description": "Optional. Text part (can be code).",
"type": "string"
},
"videoMetadata": {
"$ref": "VideoMetadata",
"description": "Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data."
}
},
"type": "object"
},
"PromptFeedback": {
"description": "Content filter results for a prompt sent in the request.",
"id": "PromptFeedback",
"properties": {
"blockReason": {
"description": "Output only. Blocked reason.",
"enum": [
"BLOCKED_REASON_UNSPECIFIED",
"SAFETY",
"OTHER",
"BLOCKLIST",
"PROHIBITED_CONTENT"
],
"enumDescriptions": [
"Unspecified blocked reason.",
"Candidates blocked due to safety.",
"Candidates blocked due to other reason.",
"Candidates blocked due to the terms which are included from the terminology blocklist.",
"Candidates blocked due to prohibited content."
],
"readOnly": true,
"type": "string"
},
"blockReasonMessage": {
"description": "Output only. A readable block reason message.",
"readOnly": true,
"type": "string"
},
"safetyRatings": {
"description": "Output only. Safety ratings.",
"items": {
"$ref": "SafetyRating"
},
"readOnly": true,
"type": "array"
}
},
"type": "object"
},
"RagResource": {
"description": "The definition of the Rag resource.",
"id": "RagResource",
"properties": {
"ragCorpus": {
"description": "Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`",
"type": "string"
},
"ragFileIds": {
"description": "Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"Retrieval": {
"description": "Defines a retrieval tool that model can call to access external knowledge.",
"id": "Retrieval",
"properties": {
"disableAttribution": {
"description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.",
"type": "boolean"
},
"vertexAiSearch": {
"$ref": "VertexAISearch",
"description": "Set to use data source powered by Vertex AI Search."
},
"vertexRagStore": {
"$ref": "VertexRagStore",
"description": "Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService."
}
},
"type": "object"
},
"SafetyRating": {
"description": "Safety rating corresponding to the generated content.",
"id": "SafetyRating",
"properties": {
"blocked": {
"description": "Output only. Indicates whether the content was filtered out because of this rating.",
"readOnly": true,
"type": "boolean"
},
"category": {
"description": "Output only. Harm category.",
"enum": [
"HARM_CATEGORY_UNSPECIFIED",
"HARM_CATEGORY_HATE_SPEECH",
"HARM_CATEGORY_DANGEROUS_CONTENT",
"HARM_CATEGORY_HARASSMENT",
"HARM_CATEGORY_SEXUALLY_EXPLICIT"
],
"enumDescriptions": [
"The harm category is unspecified.",
"The harm category is hate speech.",
"The harm category is dangerous content.",
"The harm category is harassment.",
"The harm category is sexually explicit content."
],
"readOnly": true,
"type": "string"
},
"probability": {
"description": "Output only. Harm probability levels in the content.",
"enum": [
"HARM_PROBABILITY_UNSPECIFIED",
"NEGLIGIBLE",
"LOW",
"MEDIUM",
"HIGH"
],
"enumDescriptions": [
"Harm probability unspecified.",
"Negligible level of harm.",
"Low level of harm.",
"Medium level of harm.",
"High level of harm."
],
"readOnly": true,
"type": "string"
},
"probabilityScore": {
"description": "Output only. Harm probability score.",
"format": "float",
"readOnly": true,
"type": "number"
},
"severity": {
"description": "Output only. Harm severity levels in the content.",
"enum": [
"HARM_SEVERITY_UNSPECIFIED",
"HARM_SEVERITY_NEGLIGIBLE",
"HARM_SEVERITY_LOW",
"HARM_SEVERITY_MEDIUM",
"HARM_SEVERITY_HIGH"
],
"enumDescriptions": [
"Harm severity unspecified.",
"Negligible level of harm severity.",
"Low level of harm severity.",
"Medium level of harm severity.",
"High level of harm severity."
],
"readOnly": true,
"type": "string"
},
"severityScore": {
"description": "Output only. Harm severity score.",
"format": "float",
"readOnly": true,
"type": "number"
}
},
"type": "object"
},
"SafetySetting": {
"description": "Safety settings.",
"id": "SafetySetting",
"properties": {
"category": {
"description": "Required. Harm category.",
"enum": [
"HARM_CATEGORY_UNSPECIFIED",
"HARM_CATEGORY_HATE_SPEECH",
"HARM_CATEGORY_DANGEROUS_CONTENT",
"HARM_CATEGORY_HARASSMENT",
"HARM_CATEGORY_SEXUALLY_EXPLICIT"
],
"enumDescriptions": [
"The harm category is unspecified.",
"The harm category is hate speech.",
"The harm category is dangerous content.",
"The harm category is harassment.",
"The harm category is sexually explicit content."
],
"type": "string"
},
"method": {
"description": "Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score.",
"enum": [
"HARM_BLOCK_METHOD_UNSPECIFIED",
"SEVERITY",
"PROBABILITY"
],
"enumDescriptions": [
"The harm block method is unspecified.",
"The harm block method uses both probability and severity scores.",
"The harm block method uses the probability score."
],
"type": "string"
},
"threshold": {
"description": "Required. The harm block threshold.",
"enum": [
"HARM_BLOCK_THRESHOLD_UNSPECIFIED",
"BLOCK_LOW_AND_ABOVE",
"BLOCK_MEDIUM_AND_ABOVE",
"BLOCK_ONLY_HIGH",
"BLOCK_NONE"
],
"enumDescriptions": [
"Unspecified harm block threshold.",
"Block low threshold and above (i.e. block more).",
"Block medium threshold and above.",
"Block only high threshold (i.e. block less).",
"Block none."
],
"type": "string"
}
},
"type": "object"
},
"Schema": {
"description": "Schema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.",
"id": "Schema",
"properties": {
"default": {
"description": "Optional. Default value of the data.",
"type": "any"
},
"description": {
"description": "Optional. The description of the data.",
"type": "string"
},
"enum": {
"description": "Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]}",
"items": {
"type": "string"
},
"type": "array"
},
"example": {
"description": "Optional. Example of the object. Will only populated when the object is the root.",
"type": "any"
},
"format": {
"description": "Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc",
"type": "string"
},
"items": {
"$ref": "Schema",
"description": "Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY."
},
"maxItems": {
"description": "Optional. Maximum number of the elements for Type.ARRAY.",
"format": "int64",
"type": "string"
},
"maxLength": {
"description": "Optional. Maximum length of the Type.STRING",
"format": "int64",
"type": "string"
},
"maxProperties": {
"description": "Optional. Maximum number of the properties for Type.OBJECT.",
"format": "int64",
"type": "string"
},
"maximum": {
"description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER",
"format": "double",
"type": "number"
},
"minItems": {