google-apis-firebaseml_v2beta 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,8 +22,49 @@ module Google
22
22
  module Apis
23
23
  module FirebasemlV2beta
24
24
 
25
+ # Represents a whole or partial calendar date, such as a birthday. The time of
26
+ # day and time zone are either specified elsewhere or are insignificant. The
27
+ # date is relative to the Gregorian Calendar. This can represent one of the
28
+ # following: * A full date, with non-zero year, month, and day values. * A month
29
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
30
+ # with a zero month and a zero day. * A year and month, with a zero day (for
31
+ # example, a credit card expiration date). Related types: * google.type.
32
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
33
+ class Date
34
+ include Google::Apis::Core::Hashable
35
+
36
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
37
+ # specify a year by itself or a year and month where the day isn't significant.
38
+ # Corresponds to the JSON property `day`
39
+ # @return [Fixnum]
40
+ attr_accessor :day
41
+
42
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
43
+ # and day.
44
+ # Corresponds to the JSON property `month`
45
+ # @return [Fixnum]
46
+ attr_accessor :month
47
+
48
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
49
+ # year.
50
+ # Corresponds to the JSON property `year`
51
+ # @return [Fixnum]
52
+ attr_accessor :year
53
+
54
+ def initialize(**args)
55
+ update!(**args)
56
+ end
57
+
58
+ # Update properties of this object
59
+ def update!(**args)
60
+ @day = args[:day] if args.key?(:day)
61
+ @month = args[:month] if args.key?(:month)
62
+ @year = args[:year] if args.key?(:year)
63
+ end
64
+ end
65
+
25
66
  # Content blob. It's preferred to send as text directly rather than raw bytes.
26
- class Blob
67
+ class GoogleCloudAiplatformV1beta1Blob
27
68
  include Google::Apis::Core::Hashable
28
69
 
29
70
  # Required. Raw bytes.
@@ -49,12 +90,12 @@ module Google
49
90
  end
50
91
 
51
92
  # A response candidate generated from the model.
52
- class Candidate
93
+ class GoogleCloudAiplatformV1beta1Candidate
53
94
  include Google::Apis::Core::Hashable
54
95
 
55
96
  # A collection of source attributions for a piece of content.
56
97
  # Corresponds to the JSON property `citationMetadata`
57
- # @return [Google::Apis::FirebasemlV2beta::CitationMetadata]
98
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1CitationMetadata]
58
99
  attr_accessor :citation_metadata
59
100
 
60
101
  # The base structured datatype containing multi-part content of a message. A `
@@ -62,7 +103,7 @@ module Google
62
103
  # a `parts` field containing multi-part data that contains the content of the
63
104
  # message turn.
64
105
  # Corresponds to the JSON property `content`
65
- # @return [Google::Apis::FirebasemlV2beta::Content]
106
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content]
66
107
  attr_accessor :content
67
108
 
68
109
  # Output only. Describes the reason the mode stopped generating tokens in more
@@ -79,7 +120,7 @@ module Google
79
120
 
80
121
  # Metadata returned to client when grounding is enabled.
81
122
  # Corresponds to the JSON property `groundingMetadata`
82
- # @return [Google::Apis::FirebasemlV2beta::GroundingMetadata]
123
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingMetadata]
83
124
  attr_accessor :grounding_metadata
84
125
 
85
126
  # Output only. Index of the candidate.
@@ -90,7 +131,7 @@ module Google
90
131
  # Output only. List of ratings for the safety of a response candidate. There is
91
132
  # at most one rating per category.
92
133
  # Corresponds to the JSON property `safetyRatings`
93
- # @return [Array<Google::Apis::FirebasemlV2beta::SafetyRating>]
134
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1SafetyRating>]
94
135
  attr_accessor :safety_ratings
95
136
 
96
137
  def initialize(**args)
@@ -110,7 +151,7 @@ module Google
110
151
  end
111
152
 
112
153
  # Source attributions for content.
113
- class Citation
154
+ class GoogleCloudAiplatformV1beta1Citation
114
155
  include Google::Apis::Core::Hashable
115
156
 
116
157
  # Output only. End index into the content.
@@ -166,12 +207,12 @@ module Google
166
207
  end
167
208
 
168
209
  # A collection of source attributions for a piece of content.
169
- class CitationMetadata
210
+ class GoogleCloudAiplatformV1beta1CitationMetadata
170
211
  include Google::Apis::Core::Hashable
171
212
 
172
213
  # Output only. List of citations.
173
214
  # Corresponds to the JSON property `citations`
174
- # @return [Array<Google::Apis::FirebasemlV2beta::Citation>]
215
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Citation>]
175
216
  attr_accessor :citations
176
217
 
177
218
  def initialize(**args)
@@ -188,13 +229,13 @@ module Google
188
229
  # Content` includes a `role` field designating the producer of the `Content` and
189
230
  # a `parts` field containing multi-part data that contains the content of the
190
231
  # message turn.
191
- class Content
232
+ class GoogleCloudAiplatformV1beta1Content
192
233
  include Google::Apis::Core::Hashable
193
234
 
194
235
  # Required. Ordered `Parts` that constitute a single message. Parts may have
195
236
  # different IANA MIME types.
196
237
  # Corresponds to the JSON property `parts`
197
- # @return [Array<Google::Apis::FirebasemlV2beta::Part>]
238
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Part>]
198
239
  attr_accessor :parts
199
240
 
200
241
  # Optional. The producer of the content. Must be either 'user' or 'model'.
@@ -216,12 +257,12 @@ module Google
216
257
  end
217
258
 
218
259
  # Request message for PredictionService.CountTokens.
219
- class CountTokensRequest
260
+ class GoogleCloudAiplatformV1beta1CountTokensRequest
220
261
  include Google::Apis::Core::Hashable
221
262
 
222
263
  # Required. Input content.
223
264
  # Corresponds to the JSON property `contents`
224
- # @return [Array<Google::Apis::FirebasemlV2beta::Content>]
265
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content>]
225
266
  attr_accessor :contents
226
267
 
227
268
  # Required. The instances that are the input to token counting call. Schema is
@@ -249,7 +290,7 @@ module Google
249
290
  end
250
291
 
251
292
  # Response message for PredictionService.CountTokens.
252
- class CountTokensResponse
293
+ class GoogleCloudAiplatformV1beta1CountTokensResponse
253
294
  include Google::Apis::Core::Hashable
254
295
 
255
296
  # The total number of billable characters counted across all instances from the
@@ -274,49 +315,8 @@ module Google
274
315
  end
275
316
  end
276
317
 
277
- # Represents a whole or partial calendar date, such as a birthday. The time of
278
- # day and time zone are either specified elsewhere or are insignificant. The
279
- # date is relative to the Gregorian Calendar. This can represent one of the
280
- # following: * A full date, with non-zero year, month, and day values. * A month
281
- # and day, with a zero year (for example, an anniversary). * A year on its own,
282
- # with a zero month and a zero day. * A year and month, with a zero day (for
283
- # example, a credit card expiration date). Related types: * google.type.
284
- # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
285
- class Date
286
- include Google::Apis::Core::Hashable
287
-
288
- # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
289
- # specify a year by itself or a year and month where the day isn't significant.
290
- # Corresponds to the JSON property `day`
291
- # @return [Fixnum]
292
- attr_accessor :day
293
-
294
- # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
295
- # and day.
296
- # Corresponds to the JSON property `month`
297
- # @return [Fixnum]
298
- attr_accessor :month
299
-
300
- # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
301
- # year.
302
- # Corresponds to the JSON property `year`
303
- # @return [Fixnum]
304
- attr_accessor :year
305
-
306
- def initialize(**args)
307
- update!(**args)
308
- end
309
-
310
- # Update properties of this object
311
- def update!(**args)
312
- @day = args[:day] if args.key?(:day)
313
- @month = args[:month] if args.key?(:month)
314
- @year = args[:year] if args.key?(:year)
315
- end
316
- end
317
-
318
318
  # URI based data.
319
- class FileData
319
+ class GoogleCloudAiplatformV1beta1FileData
320
320
  include Google::Apis::Core::Hashable
321
321
 
322
322
  # Required. URI.
@@ -343,7 +343,7 @@ module Google
343
343
  # A predicted [FunctionCall] returned from the model that contains a string
344
344
  # representing the [FunctionDeclaration.name] and a structured JSON object
345
345
  # containing the parameters and their values.
346
- class FunctionCall
346
+ class GoogleCloudAiplatformV1beta1FunctionCall
347
347
  include Google::Apis::Core::Hashable
348
348
 
349
349
  # Optional. Required. The function parameters and values in JSON object format.
@@ -369,7 +369,7 @@ module Google
369
369
  end
370
370
 
371
371
  # Function calling config.
372
- class FunctionCallingConfig
372
+ class GoogleCloudAiplatformV1beta1FunctionCallingConfig
373
373
  include Google::Apis::Core::Hashable
374
374
 
375
375
  # Optional. Function names to call. Only set when the Mode is ANY. Function
@@ -400,7 +400,7 @@ module Google
400
400
  # declaration are the function name and parameters. This FunctionDeclaration is
401
401
  # a representation of a block of code that can be used as a `Tool` by the model
402
402
  # and executed by the client.
403
- class FunctionDeclaration
403
+ class GoogleCloudAiplatformV1beta1FunctionDeclaration
404
404
  include Google::Apis::Core::Hashable
405
405
 
406
406
  # Optional. Description and purpose of the function. Model uses it to decide how
@@ -420,14 +420,14 @@ module Google
420
420
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
421
421
  # schema). More fields may be added in the future as needed.
422
422
  # Corresponds to the JSON property `parameters`
423
- # @return [Google::Apis::FirebasemlV2beta::Schema]
423
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
424
424
  attr_accessor :parameters
425
425
 
426
426
  # Schema is used to define the format of input/output data. Represents a select
427
427
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
428
428
  # schema). More fields may be added in the future as needed.
429
429
  # Corresponds to the JSON property `response`
430
- # @return [Google::Apis::FirebasemlV2beta::Schema]
430
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
431
431
  attr_accessor :response
432
432
 
433
433
  def initialize(**args)
@@ -447,7 +447,7 @@ module Google
447
447
  # the [FunctionDeclaration.name] and a structured JSON object containing any
448
448
  # output from the function is used as context to the model. This should contain
449
449
  # the result of a [FunctionCall] made based on model prediction.
450
- class FunctionResponse
450
+ class GoogleCloudAiplatformV1beta1FunctionResponse
451
451
  include Google::Apis::Core::Hashable
452
452
 
453
453
  # Required. The name of the function to call. Matches [FunctionDeclaration.name]
@@ -473,25 +473,34 @@ module Google
473
473
  end
474
474
 
475
475
  # Request message for [PredictionService.GenerateContent].
476
- class GenerateContentRequest
476
+ class GoogleCloudAiplatformV1beta1GenerateContentRequest
477
477
  include Google::Apis::Core::Hashable
478
478
 
479
+ # Optional. The name of the cached content used as context to serve the
480
+ # prediction. Note: only used in explicit caching, where users can have control
481
+ # over caching (e.g. what content to cache) and enjoy guaranteed cost savings.
482
+ # Format: `projects/`project`/locations/`location`/cachedContents/`cachedContent`
483
+ # `
484
+ # Corresponds to the JSON property `cachedContent`
485
+ # @return [String]
486
+ attr_accessor :cached_content
487
+
479
488
  # Required. The content of the current conversation with the model. For single-
480
489
  # turn queries, this is a single instance. For multi-turn queries, this is a
481
490
  # repeated field that contains conversation history + latest request.
482
491
  # Corresponds to the JSON property `contents`
483
- # @return [Array<Google::Apis::FirebasemlV2beta::Content>]
492
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content>]
484
493
  attr_accessor :contents
485
494
 
486
495
  # Generation config.
487
496
  # Corresponds to the JSON property `generationConfig`
488
- # @return [Google::Apis::FirebasemlV2beta::GenerationConfig]
497
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfig]
489
498
  attr_accessor :generation_config
490
499
 
491
500
  # Optional. Per request settings for blocking unsafe content. Enforced on
492
501
  # GenerateContentResponse.candidates.
493
502
  # Corresponds to the JSON property `safetySettings`
494
- # @return [Array<Google::Apis::FirebasemlV2beta::SafetySetting>]
503
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1SafetySetting>]
495
504
  attr_accessor :safety_settings
496
505
 
497
506
  # The base structured datatype containing multi-part content of a message. A `
@@ -499,12 +508,12 @@ module Google
499
508
  # a `parts` field containing multi-part data that contains the content of the
500
509
  # message turn.
501
510
  # Corresponds to the JSON property `systemInstruction`
502
- # @return [Google::Apis::FirebasemlV2beta::Content]
511
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content]
503
512
  attr_accessor :system_instruction
504
513
 
505
514
  # Tool config. This config is shared for all tools provided in the request.
506
515
  # Corresponds to the JSON property `toolConfig`
507
- # @return [Google::Apis::FirebasemlV2beta::ToolConfig]
516
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ToolConfig]
508
517
  attr_accessor :tool_config
509
518
 
510
519
  # Optional. A list of `Tools` the model may use to generate the next response. A
@@ -512,7 +521,7 @@ module Google
512
521
  # systems to perform an action, or set of actions, outside of knowledge and
513
522
  # scope of the model.
514
523
  # Corresponds to the JSON property `tools`
515
- # @return [Array<Google::Apis::FirebasemlV2beta::Tool>]
524
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Tool>]
516
525
  attr_accessor :tools
517
526
 
518
527
  def initialize(**args)
@@ -521,6 +530,7 @@ module Google
521
530
 
522
531
  # Update properties of this object
523
532
  def update!(**args)
533
+ @cached_content = args[:cached_content] if args.key?(:cached_content)
524
534
  @contents = args[:contents] if args.key?(:contents)
525
535
  @generation_config = args[:generation_config] if args.key?(:generation_config)
526
536
  @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
@@ -531,22 +541,22 @@ module Google
531
541
  end
532
542
 
533
543
  # Response message for [PredictionService.GenerateContent].
534
- class GenerateContentResponse
544
+ class GoogleCloudAiplatformV1beta1GenerateContentResponse
535
545
  include Google::Apis::Core::Hashable
536
546
 
537
547
  # Output only. Generated candidates.
538
548
  # Corresponds to the JSON property `candidates`
539
- # @return [Array<Google::Apis::FirebasemlV2beta::Candidate>]
549
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Candidate>]
540
550
  attr_accessor :candidates
541
551
 
542
552
  # Content filter results for a prompt sent in the request.
543
553
  # Corresponds to the JSON property `promptFeedback`
544
- # @return [Google::Apis::FirebasemlV2beta::PromptFeedback]
554
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback]
545
555
  attr_accessor :prompt_feedback
546
556
 
547
557
  # Usage metadata about response(s).
548
558
  # Corresponds to the JSON property `usageMetadata`
549
- # @return [Google::Apis::FirebasemlV2beta::UsageMetadata]
559
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata]
550
560
  attr_accessor :usage_metadata
551
561
 
552
562
  def initialize(**args)
@@ -561,8 +571,70 @@ module Google
561
571
  end
562
572
  end
563
573
 
574
+ # Content filter results for a prompt sent in the request.
575
+ class GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback
576
+ include Google::Apis::Core::Hashable
577
+
578
+ # Output only. Blocked reason.
579
+ # Corresponds to the JSON property `blockReason`
580
+ # @return [String]
581
+ attr_accessor :block_reason
582
+
583
+ # Output only. A readable block reason message.
584
+ # Corresponds to the JSON property `blockReasonMessage`
585
+ # @return [String]
586
+ attr_accessor :block_reason_message
587
+
588
+ # Output only. Safety ratings.
589
+ # Corresponds to the JSON property `safetyRatings`
590
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1SafetyRating>]
591
+ attr_accessor :safety_ratings
592
+
593
+ def initialize(**args)
594
+ update!(**args)
595
+ end
596
+
597
+ # Update properties of this object
598
+ def update!(**args)
599
+ @block_reason = args[:block_reason] if args.key?(:block_reason)
600
+ @block_reason_message = args[:block_reason_message] if args.key?(:block_reason_message)
601
+ @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
602
+ end
603
+ end
604
+
605
+ # Usage metadata about response(s).
606
+ class GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
607
+ include Google::Apis::Core::Hashable
608
+
609
+ # Number of tokens in the response(s).
610
+ # Corresponds to the JSON property `candidatesTokenCount`
611
+ # @return [Fixnum]
612
+ attr_accessor :candidates_token_count
613
+
614
+ # Number of tokens in the request.
615
+ # Corresponds to the JSON property `promptTokenCount`
616
+ # @return [Fixnum]
617
+ attr_accessor :prompt_token_count
618
+
619
+ #
620
+ # Corresponds to the JSON property `totalTokenCount`
621
+ # @return [Fixnum]
622
+ attr_accessor :total_token_count
623
+
624
+ def initialize(**args)
625
+ update!(**args)
626
+ end
627
+
628
+ # Update properties of this object
629
+ def update!(**args)
630
+ @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
631
+ @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
632
+ @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
633
+ end
634
+ end
635
+
564
636
  # Generation config.
565
- class GenerationConfig
637
+ class GoogleCloudAiplatformV1beta1GenerationConfig
566
638
  include Google::Apis::Core::Hashable
567
639
 
568
640
  # Optional. Number of candidates to generate.
@@ -598,7 +670,7 @@ module Google
598
670
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
599
671
  # schema). More fields may be added in the future as needed.
600
672
  # Corresponds to the JSON property `responseSchema`
601
- # @return [Google::Apis::FirebasemlV2beta::Schema]
673
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
602
674
  attr_accessor :response_schema
603
675
 
604
676
  # Optional. Stop sequences.
@@ -641,7 +713,7 @@ module Google
641
713
  end
642
714
 
643
715
  # Tool to retrieve public web data for grounding, powered by Google.
644
- class GoogleSearchRetrieval
716
+ class GoogleCloudAiplatformV1beta1GoogleSearchRetrieval
645
717
  include Google::Apis::Core::Hashable
646
718
 
647
719
  def initialize(**args)
@@ -654,7 +726,7 @@ module Google
654
726
  end
655
727
 
656
728
  # Metadata returned to client when grounding is enabled.
657
- class GroundingMetadata
729
+ class GoogleCloudAiplatformV1beta1GroundingMetadata
658
730
  include Google::Apis::Core::Hashable
659
731
 
660
732
  # Optional. Queries executed by the retrieval tools.
@@ -664,7 +736,7 @@ module Google
664
736
 
665
737
  # Google search entry point.
666
738
  # Corresponds to the JSON property `searchEntryPoint`
667
- # @return [Google::Apis::FirebasemlV2beta::SearchEntryPoint]
739
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1SearchEntryPoint]
668
740
  attr_accessor :search_entry_point
669
741
 
670
742
  # Optional. Web search queries for the following-up web search.
@@ -684,50 +756,24 @@ module Google
684
756
  end
685
757
  end
686
758
 
687
- # This is returned in the longrunning operations for create/update.
688
- class ModelOperationMetadata
689
- include Google::Apis::Core::Hashable
690
-
691
- #
692
- # Corresponds to the JSON property `basicOperationStatus`
693
- # @return [String]
694
- attr_accessor :basic_operation_status
695
-
696
- # The name of the model we are creating/updating The name must have the form `
697
- # projects/`project_id`/models/`model_id``
698
- # Corresponds to the JSON property `name`
699
- # @return [String]
700
- attr_accessor :name
701
-
702
- def initialize(**args)
703
- update!(**args)
704
- end
705
-
706
- # Update properties of this object
707
- def update!(**args)
708
- @basic_operation_status = args[:basic_operation_status] if args.key?(:basic_operation_status)
709
- @name = args[:name] if args.key?(:name)
710
- end
711
- end
712
-
713
759
  # A datatype containing media that is part of a multi-part `Content` message. A `
714
760
  # Part` consists of data which has an associated datatype. A `Part` can only
715
761
  # contain one of the accepted types in `Part.data`. A `Part` must have a fixed
716
762
  # IANA MIME type identifying the type and subtype of the media if `inline_data`
717
763
  # or `file_data` field is filled with raw bytes.
718
- class Part
764
+ class GoogleCloudAiplatformV1beta1Part
719
765
  include Google::Apis::Core::Hashable
720
766
 
721
767
  # URI based data.
722
768
  # Corresponds to the JSON property `fileData`
723
- # @return [Google::Apis::FirebasemlV2beta::FileData]
769
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FileData]
724
770
  attr_accessor :file_data
725
771
 
726
772
  # A predicted [FunctionCall] returned from the model that contains a string
727
773
  # representing the [FunctionDeclaration.name] and a structured JSON object
728
774
  # containing the parameters and their values.
729
775
  # Corresponds to the JSON property `functionCall`
730
- # @return [Google::Apis::FirebasemlV2beta::FunctionCall]
776
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionCall]
731
777
  attr_accessor :function_call
732
778
 
733
779
  # The result output from a [FunctionCall] that contains a string representing
@@ -735,12 +781,12 @@ module Google
735
781
  # output from the function is used as context to the model. This should contain
736
782
  # the result of a [FunctionCall] made based on model prediction.
737
783
  # Corresponds to the JSON property `functionResponse`
738
- # @return [Google::Apis::FirebasemlV2beta::FunctionResponse]
784
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionResponse]
739
785
  attr_accessor :function_response
740
786
 
741
787
  # Content blob. It's preferred to send as text directly rather than raw bytes.
742
788
  # Corresponds to the JSON property `inlineData`
743
- # @return [Google::Apis::FirebasemlV2beta::Blob]
789
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Blob]
744
790
  attr_accessor :inline_data
745
791
 
746
792
  # Optional. Text part (can be code).
@@ -750,7 +796,7 @@ module Google
750
796
 
751
797
  # Metadata describes the input video content.
752
798
  # Corresponds to the JSON property `videoMetadata`
753
- # @return [Google::Apis::FirebasemlV2beta::VideoMetadata]
799
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VideoMetadata]
754
800
  attr_accessor :video_metadata
755
801
 
756
802
  def initialize(**args)
@@ -768,66 +814,8 @@ module Google
768
814
  end
769
815
  end
770
816
 
771
- # Content filter results for a prompt sent in the request.
772
- class PromptFeedback
773
- include Google::Apis::Core::Hashable
774
-
775
- # Output only. Blocked reason.
776
- # Corresponds to the JSON property `blockReason`
777
- # @return [String]
778
- attr_accessor :block_reason
779
-
780
- # Output only. A readable block reason message.
781
- # Corresponds to the JSON property `blockReasonMessage`
782
- # @return [String]
783
- attr_accessor :block_reason_message
784
-
785
- # Output only. Safety ratings.
786
- # Corresponds to the JSON property `safetyRatings`
787
- # @return [Array<Google::Apis::FirebasemlV2beta::SafetyRating>]
788
- attr_accessor :safety_ratings
789
-
790
- def initialize(**args)
791
- update!(**args)
792
- end
793
-
794
- # Update properties of this object
795
- def update!(**args)
796
- @block_reason = args[:block_reason] if args.key?(:block_reason)
797
- @block_reason_message = args[:block_reason_message] if args.key?(:block_reason_message)
798
- @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
799
- end
800
- end
801
-
802
- # The definition of the Rag resource.
803
- class RagResource
804
- include Google::Apis::Core::Hashable
805
-
806
- # Optional. RagCorpora resource name. Format: `projects/`project`/locations/`
807
- # location`/ragCorpora/`rag_corpus``
808
- # Corresponds to the JSON property `ragCorpus`
809
- # @return [String]
810
- attr_accessor :rag_corpus
811
-
812
- # Optional. rag_file_id. The files should be in the same rag_corpus set in
813
- # rag_corpus field.
814
- # Corresponds to the JSON property `ragFileIds`
815
- # @return [Array<String>]
816
- attr_accessor :rag_file_ids
817
-
818
- def initialize(**args)
819
- update!(**args)
820
- end
821
-
822
- # Update properties of this object
823
- def update!(**args)
824
- @rag_corpus = args[:rag_corpus] if args.key?(:rag_corpus)
825
- @rag_file_ids = args[:rag_file_ids] if args.key?(:rag_file_ids)
826
- end
827
- end
828
-
829
817
  # Defines a retrieval tool that model can call to access external knowledge.
830
- class Retrieval
818
+ class GoogleCloudAiplatformV1beta1Retrieval
831
819
  include Google::Apis::Core::Hashable
832
820
 
833
821
  # Optional. Disable using the result from this tool in detecting grounding
@@ -841,12 +829,12 @@ module Google
841
829
  # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.
842
830
  # google.com/vertex-ai-search-and-conversation
843
831
  # Corresponds to the JSON property `vertexAiSearch`
844
- # @return [Google::Apis::FirebasemlV2beta::VertexAiSearch]
832
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexAiSearch]
845
833
  attr_accessor :vertex_ai_search
846
834
 
847
835
  # Retrieve from Vertex RAG Store for grounding.
848
836
  # Corresponds to the JSON property `vertexRagStore`
849
- # @return [Google::Apis::FirebasemlV2beta::VertexRagStore]
837
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexRagStore]
850
838
  attr_accessor :vertex_rag_store
851
839
 
852
840
  def initialize(**args)
@@ -862,7 +850,7 @@ module Google
862
850
  end
863
851
 
864
852
  # Safety rating corresponding to the generated content.
865
- class SafetyRating
853
+ class GoogleCloudAiplatformV1beta1SafetyRating
866
854
  include Google::Apis::Core::Hashable
867
855
 
868
856
  # Output only. Indicates whether the content was filtered out because of this
@@ -913,7 +901,7 @@ module Google
913
901
  end
914
902
 
915
903
  # Safety settings.
916
- class SafetySetting
904
+ class GoogleCloudAiplatformV1beta1SafetySetting
917
905
  include Google::Apis::Core::Hashable
918
906
 
919
907
  # Required. Harm category.
@@ -947,7 +935,7 @@ module Google
947
935
  # Schema is used to define the format of input/output data. Represents a select
948
936
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
949
937
  # schema). More fields may be added in the future as needed.
950
- class Schema
938
+ class GoogleCloudAiplatformV1beta1Schema
951
939
  include Google::Apis::Core::Hashable
952
940
 
953
941
  # Optional. Default value of the data.
@@ -984,7 +972,7 @@ module Google
984
972
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
985
973
  # schema). More fields may be added in the future as needed.
986
974
  # Corresponds to the JSON property `items`
987
- # @return [Google::Apis::FirebasemlV2beta::Schema]
975
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
988
976
  attr_accessor :items
989
977
 
990
978
  # Optional. Maximum number of the elements for Type.ARRAY.
@@ -1042,7 +1030,7 @@ module Google
1042
1030
 
1043
1031
  # Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.
1044
1032
  # Corresponds to the JSON property `properties`
1045
- # @return [Hash<String,Google::Apis::FirebasemlV2beta::Schema>]
1033
+ # @return [Hash<String,Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema>]
1046
1034
  attr_accessor :properties
1047
1035
 
1048
1036
  # Optional. Required properties of Type.OBJECT.
@@ -1090,7 +1078,7 @@ module Google
1090
1078
  end
1091
1079
 
1092
1080
  # Google search entry point.
1093
- class SearchEntryPoint
1081
+ class GoogleCloudAiplatformV1beta1SearchEntryPoint
1094
1082
  include Google::Apis::Core::Hashable
1095
1083
 
1096
1084
  # Optional. Web content snippet that can be embedded in a web page or an app
@@ -1121,7 +1109,7 @@ module Google
1121
1109
  # an action, or set of actions, outside of knowledge and scope of the model. A
1122
1110
  # Tool object should contain exactly one type of Tool (e.g FunctionDeclaration,
1123
1111
  # Retrieval or GoogleSearchRetrieval).
1124
- class Tool
1112
+ class GoogleCloudAiplatformV1beta1Tool
1125
1113
  include Google::Apis::Core::Hashable
1126
1114
 
1127
1115
  # Optional. Function tool type. One or more function declarations to be passed
@@ -1131,17 +1119,17 @@ module Google
1131
1119
  # Based on the function responses, Model will generate the final response back
1132
1120
  # to the user. Maximum 64 function declarations can be provided.
1133
1121
  # Corresponds to the JSON property `functionDeclarations`
1134
- # @return [Array<Google::Apis::FirebasemlV2beta::FunctionDeclaration>]
1122
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionDeclaration>]
1135
1123
  attr_accessor :function_declarations
1136
1124
 
1137
1125
  # Tool to retrieve public web data for grounding, powered by Google.
1138
1126
  # Corresponds to the JSON property `googleSearchRetrieval`
1139
- # @return [Google::Apis::FirebasemlV2beta::GoogleSearchRetrieval]
1127
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GoogleSearchRetrieval]
1140
1128
  attr_accessor :google_search_retrieval
1141
1129
 
1142
1130
  # Defines a retrieval tool that model can call to access external knowledge.
1143
1131
  # Corresponds to the JSON property `retrieval`
1144
- # @return [Google::Apis::FirebasemlV2beta::Retrieval]
1132
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Retrieval]
1145
1133
  attr_accessor :retrieval
1146
1134
 
1147
1135
  def initialize(**args)
@@ -1157,12 +1145,12 @@ module Google
1157
1145
  end
1158
1146
 
1159
1147
  # Tool config. This config is shared for all tools provided in the request.
1160
- class ToolConfig
1148
+ class GoogleCloudAiplatformV1beta1ToolConfig
1161
1149
  include Google::Apis::Core::Hashable
1162
1150
 
1163
1151
  # Function calling config.
1164
1152
  # Corresponds to the JSON property `functionCallingConfig`
1165
- # @return [Google::Apis::FirebasemlV2beta::FunctionCallingConfig]
1153
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionCallingConfig]
1166
1154
  attr_accessor :function_calling_config
1167
1155
 
1168
1156
  def initialize(**args)
@@ -1175,40 +1163,9 @@ module Google
1175
1163
  end
1176
1164
  end
1177
1165
 
1178
- # Usage metadata about response(s).
1179
- class UsageMetadata
1180
- include Google::Apis::Core::Hashable
1181
-
1182
- # Number of tokens in the response(s).
1183
- # Corresponds to the JSON property `candidatesTokenCount`
1184
- # @return [Fixnum]
1185
- attr_accessor :candidates_token_count
1186
-
1187
- # Number of tokens in the request.
1188
- # Corresponds to the JSON property `promptTokenCount`
1189
- # @return [Fixnum]
1190
- attr_accessor :prompt_token_count
1191
-
1192
- #
1193
- # Corresponds to the JSON property `totalTokenCount`
1194
- # @return [Fixnum]
1195
- attr_accessor :total_token_count
1196
-
1197
- def initialize(**args)
1198
- update!(**args)
1199
- end
1200
-
1201
- # Update properties of this object
1202
- def update!(**args)
1203
- @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
1204
- @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
1205
- @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
1206
- end
1207
- end
1208
-
1209
1166
  # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.
1210
1167
  # google.com/vertex-ai-search-and-conversation
1211
- class VertexAiSearch
1168
+ class GoogleCloudAiplatformV1beta1VertexAiSearch
1212
1169
  include Google::Apis::Core::Hashable
1213
1170
 
1214
1171
  # Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `
@@ -1229,7 +1186,7 @@ module Google
1229
1186
  end
1230
1187
 
1231
1188
  # Retrieve from Vertex RAG Store for grounding.
1232
- class VertexRagStore
1189
+ class GoogleCloudAiplatformV1beta1VertexRagStore
1233
1190
  include Google::Apis::Core::Hashable
1234
1191
 
1235
1192
  # Optional. Deprecated. Please use rag_resources instead.
@@ -1241,7 +1198,7 @@ module Google
1241
1198
  # corpus only or ragfiles. Currently only support one corpus or multiple files
1242
1199
  # from one corpus. In the future we may open up multiple corpora support.
1243
1200
  # Corresponds to the JSON property `ragResources`
1244
- # @return [Array<Google::Apis::FirebasemlV2beta::RagResource>]
1201
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexRagStoreRagResource>]
1245
1202
  attr_accessor :rag_resources
1246
1203
 
1247
1204
  # Optional. Number of top k results to return from the selected corpora.
@@ -1267,8 +1224,35 @@ module Google
1267
1224
  end
1268
1225
  end
1269
1226
 
1227
+ # The definition of the Rag resource.
1228
+ class GoogleCloudAiplatformV1beta1VertexRagStoreRagResource
1229
+ include Google::Apis::Core::Hashable
1230
+
1231
+ # Optional. RagCorpora resource name. Format: `projects/`project`/locations/`
1232
+ # location`/ragCorpora/`rag_corpus``
1233
+ # Corresponds to the JSON property `ragCorpus`
1234
+ # @return [String]
1235
+ attr_accessor :rag_corpus
1236
+
1237
+ # Optional. rag_file_id. The files should be in the same rag_corpus set in
1238
+ # rag_corpus field.
1239
+ # Corresponds to the JSON property `ragFileIds`
1240
+ # @return [Array<String>]
1241
+ attr_accessor :rag_file_ids
1242
+
1243
+ def initialize(**args)
1244
+ update!(**args)
1245
+ end
1246
+
1247
+ # Update properties of this object
1248
+ def update!(**args)
1249
+ @rag_corpus = args[:rag_corpus] if args.key?(:rag_corpus)
1250
+ @rag_file_ids = args[:rag_file_ids] if args.key?(:rag_file_ids)
1251
+ end
1252
+ end
1253
+
1270
1254
  # Metadata describes the input video content.
1271
- class VideoMetadata
1255
+ class GoogleCloudAiplatformV1beta1VideoMetadata
1272
1256
  include Google::Apis::Core::Hashable
1273
1257
 
1274
1258
  # Optional. The end offset of the video.
@@ -1291,6 +1275,32 @@ module Google
1291
1275
  @start_offset = args[:start_offset] if args.key?(:start_offset)
1292
1276
  end
1293
1277
  end
1278
+
1279
+ # This is returned in the longrunning operations for create/update.
1280
+ class ModelOperationMetadata
1281
+ include Google::Apis::Core::Hashable
1282
+
1283
+ #
1284
+ # Corresponds to the JSON property `basicOperationStatus`
1285
+ # @return [String]
1286
+ attr_accessor :basic_operation_status
1287
+
1288
+ # The name of the model we are creating/updating The name must have the form `
1289
+ # projects/`project_id`/models/`model_id``
1290
+ # Corresponds to the JSON property `name`
1291
+ # @return [String]
1292
+ attr_accessor :name
1293
+
1294
+ def initialize(**args)
1295
+ update!(**args)
1296
+ end
1297
+
1298
+ # Update properties of this object
1299
+ def update!(**args)
1300
+ @basic_operation_status = args[:basic_operation_status] if args.key?(:basic_operation_status)
1301
+ @name = args[:name] if args.key?(:name)
1302
+ end
1303
+ end
1294
1304
  end
1295
1305
  end
1296
1306
  end