google-apis-firebaseml_v2beta 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,6 +93,11 @@ module Google
93
93
  class GoogleCloudAiplatformV1beta1Candidate
94
94
  include Google::Apis::Core::Hashable
95
95
 
96
+ # Output only. Average log probability score of the candidate.
97
+ # Corresponds to the JSON property `avgLogprobs`
98
+ # @return [Float]
99
+ attr_accessor :avg_logprobs
100
+
96
101
  # A collection of source attributions for a piece of content.
97
102
  # Corresponds to the JSON property `citationMetadata`
98
103
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1CitationMetadata]
@@ -128,6 +133,11 @@ module Google
128
133
  # @return [Fixnum]
129
134
  attr_accessor :index
130
135
 
136
+ # Logprobs Result
137
+ # Corresponds to the JSON property `logprobsResult`
138
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1LogprobsResult]
139
+ attr_accessor :logprobs_result
140
+
131
141
  # Output only. List of ratings for the safety of a response candidate. There is
132
142
  # at most one rating per category.
133
143
  # Corresponds to the JSON property `safetyRatings`
@@ -140,12 +150,14 @@ module Google
140
150
 
141
151
  # Update properties of this object
142
152
  def update!(**args)
153
+ @avg_logprobs = args[:avg_logprobs] if args.key?(:avg_logprobs)
143
154
  @citation_metadata = args[:citation_metadata] if args.key?(:citation_metadata)
144
155
  @content = args[:content] if args.key?(:content)
145
156
  @finish_message = args[:finish_message] if args.key?(:finish_message)
146
157
  @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
147
158
  @grounding_metadata = args[:grounding_metadata] if args.key?(:grounding_metadata)
148
159
  @index = args[:index] if args.key?(:index)
160
+ @logprobs_result = args[:logprobs_result] if args.key?(:logprobs_result)
149
161
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
150
162
  end
151
163
  end
@@ -225,6 +237,33 @@ module Google
225
237
  end
226
238
  end
227
239
 
240
+ # Result of executing the [ExecutableCode]. Always follows a `part` containing
241
+ # the [ExecutableCode].
242
+ class GoogleCloudAiplatformV1beta1CodeExecutionResult
243
+ include Google::Apis::Core::Hashable
244
+
245
+ # Required. Outcome of the code execution.
246
+ # Corresponds to the JSON property `outcome`
247
+ # @return [String]
248
+ attr_accessor :outcome
249
+
250
+ # Optional. Contains stdout when code execution is successful, stderr or other
251
+ # description otherwise.
252
+ # Corresponds to the JSON property `output`
253
+ # @return [String]
254
+ attr_accessor :output
255
+
256
+ def initialize(**args)
257
+ update!(**args)
258
+ end
259
+
260
+ # Update properties of this object
261
+ def update!(**args)
262
+ @outcome = args[:outcome] if args.key?(:outcome)
263
+ @output = args[:output] if args.key?(:output)
264
+ end
265
+ end
266
+
228
267
  # The base structured datatype containing multi-part content of a message. A `
229
268
  # Content` includes a `role` field designating the producer of the `Content` and
230
269
  # a `parts` field containing multi-part data that contains the content of the
@@ -260,23 +299,44 @@ module Google
260
299
  class GoogleCloudAiplatformV1beta1CountTokensRequest
261
300
  include Google::Apis::Core::Hashable
262
301
 
263
- # Required. Input content.
302
+ # Optional. Input content.
264
303
  # Corresponds to the JSON property `contents`
265
304
  # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content>]
266
305
  attr_accessor :contents
267
306
 
268
- # Required. The instances that are the input to token counting call. Schema is
307
+ # Generation config.
308
+ # Corresponds to the JSON property `generationConfig`
309
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfig]
310
+ attr_accessor :generation_config
311
+
312
+ # Optional. The instances that are the input to token counting call. Schema is
269
313
  # identical to the prediction schema of the underlying model.
270
314
  # Corresponds to the JSON property `instances`
271
315
  # @return [Array<Object>]
272
316
  attr_accessor :instances
273
317
 
274
- # Required. The name of the publisher model requested to serve the prediction.
318
+ # Optional. The name of the publisher model requested to serve the prediction.
275
319
  # Format: `projects/`project`/locations/`location`/publishers/*/models/*`
276
320
  # Corresponds to the JSON property `model`
277
321
  # @return [String]
278
322
  attr_accessor :model
279
323
 
324
+ # The base structured datatype containing multi-part content of a message. A `
325
+ # Content` includes a `role` field designating the producer of the `Content` and
326
+ # a `parts` field containing multi-part data that contains the content of the
327
+ # message turn.
328
+ # Corresponds to the JSON property `systemInstruction`
329
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content]
330
+ attr_accessor :system_instruction
331
+
332
+ # Optional. A list of `Tools` the model may use to generate the next response. A
333
+ # `Tool` is a piece of code that enables the system to interact with external
334
+ # systems to perform an action, or set of actions, outside of knowledge and
335
+ # scope of the model.
336
+ # Corresponds to the JSON property `tools`
337
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Tool>]
338
+ attr_accessor :tools
339
+
280
340
  def initialize(**args)
281
341
  update!(**args)
282
342
  end
@@ -284,8 +344,11 @@ module Google
284
344
  # Update properties of this object
285
345
  def update!(**args)
286
346
  @contents = args[:contents] if args.key?(:contents)
347
+ @generation_config = args[:generation_config] if args.key?(:generation_config)
287
348
  @instances = args[:instances] if args.key?(:instances)
288
349
  @model = args[:model] if args.key?(:model)
350
+ @system_instruction = args[:system_instruction] if args.key?(:system_instruction)
351
+ @tools = args[:tools] if args.key?(:tools)
289
352
  end
290
353
  end
291
354
 
@@ -315,6 +378,59 @@ module Google
315
378
  end
316
379
  end
317
380
 
381
+ # Describes the options to customize dynamic retrieval.
382
+ class GoogleCloudAiplatformV1beta1DynamicRetrievalConfig
383
+ include Google::Apis::Core::Hashable
384
+
385
+ # Optional. The threshold to be used in dynamic retrieval. If not set, a system
386
+ # default value is used.
387
+ # Corresponds to the JSON property `dynamicThreshold`
388
+ # @return [Float]
389
+ attr_accessor :dynamic_threshold
390
+
391
+ # The mode of the predictor to be used in dynamic retrieval.
392
+ # Corresponds to the JSON property `mode`
393
+ # @return [String]
394
+ attr_accessor :mode
395
+
396
+ def initialize(**args)
397
+ update!(**args)
398
+ end
399
+
400
+ # Update properties of this object
401
+ def update!(**args)
402
+ @dynamic_threshold = args[:dynamic_threshold] if args.key?(:dynamic_threshold)
403
+ @mode = args[:mode] if args.key?(:mode)
404
+ end
405
+ end
406
+
407
+ # Code generated by the model that is meant to be executed, and the result
408
+ # returned to the model. Generated when using the [FunctionDeclaration] tool and
409
+ # [FunctionCallingConfig] mode is set to [Mode.CODE].
410
+ class GoogleCloudAiplatformV1beta1ExecutableCode
411
+ include Google::Apis::Core::Hashable
412
+
413
+ # Required. The code to be executed.
414
+ # Corresponds to the JSON property `code`
415
+ # @return [String]
416
+ attr_accessor :code
417
+
418
+ # Required. Programming language of the `code`.
419
+ # Corresponds to the JSON property `language`
420
+ # @return [String]
421
+ attr_accessor :language
422
+
423
+ def initialize(**args)
424
+ update!(**args)
425
+ end
426
+
427
+ # Update properties of this object
428
+ def update!(**args)
429
+ @code = args[:code] if args.key?(:code)
430
+ @language = args[:language] if args.key?(:language)
431
+ end
432
+ end
433
+
318
434
  # URI based data.
319
435
  class GoogleCloudAiplatformV1beta1FileData
320
436
  include Google::Apis::Core::Hashable
@@ -397,9 +513,9 @@ module Google
397
513
 
398
514
  # Structured representation of a function declaration as defined by the [OpenAPI
399
515
  # 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this
400
- # declaration are the function name and parameters. This FunctionDeclaration is
401
- # a representation of a block of code that can be used as a `Tool` by the model
402
- # and executed by the client.
516
+ # declaration are the function name, description, parameters and response type.
517
+ # This FunctionDeclaration is a representation of a block of code that can be
518
+ # used as a `Tool` by the model and executed by the client.
403
519
  class GoogleCloudAiplatformV1beta1FunctionDeclaration
404
520
  include Google::Apis::Core::Hashable
405
521
 
@@ -418,14 +534,14 @@ module Google
418
534
 
419
535
  # Schema is used to define the format of input/output data. Represents a select
420
536
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
421
- # schema). More fields may be added in the future as needed.
537
+ # schema-object). More fields may be added in the future as needed.
422
538
  # Corresponds to the JSON property `parameters`
423
539
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
424
540
  attr_accessor :parameters
425
541
 
426
542
  # Schema is used to define the format of input/output data. Represents a select
427
543
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
428
- # schema). More fields may be added in the future as needed.
544
+ # schema-object). More fields may be added in the future as needed.
429
545
  # Corresponds to the JSON property `response`
430
546
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
431
547
  attr_accessor :response
@@ -456,7 +572,10 @@ module Google
456
572
  # @return [String]
457
573
  attr_accessor :name
458
574
 
459
- # Required. The function response in JSON object format.
575
+ # Required. The function response in JSON object format. Use "output" key to
576
+ # specify function output and "error" key to specify error details (if any). If "
577
+ # output" and "error" keys are not specified, then whole "response" is treated
578
+ # as function output.
460
579
  # Corresponds to the JSON property `response`
461
580
  # @return [Hash<String,Object>]
462
581
  attr_accessor :response
@@ -497,6 +616,15 @@ module Google
497
616
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfig]
498
617
  attr_accessor :generation_config
499
618
 
619
+ # Optional. The labels with user-defined metadata for the request. It is used
620
+ # for billing and reporting only. Label keys and values can be no longer than 63
621
+ # characters (Unicode codepoints) and can only contain lowercase letters,
622
+ # numeric characters, underscores, and dashes. International characters are
623
+ # allowed. Label values are optional. Label keys must start with a letter.
624
+ # Corresponds to the JSON property `labels`
625
+ # @return [Hash<String,String>]
626
+ attr_accessor :labels
627
+
500
628
  # Optional. Per request settings for blocking unsafe content. Enforced on
501
629
  # GenerateContentResponse.candidates.
502
630
  # Corresponds to the JSON property `safetySettings`
@@ -533,6 +661,7 @@ module Google
533
661
  @cached_content = args[:cached_content] if args.key?(:cached_content)
534
662
  @contents = args[:contents] if args.key?(:contents)
535
663
  @generation_config = args[:generation_config] if args.key?(:generation_config)
664
+ @labels = args[:labels] if args.key?(:labels)
536
665
  @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
537
666
  @system_instruction = args[:system_instruction] if args.key?(:system_instruction)
538
667
  @tool_config = args[:tool_config] if args.key?(:tool_config)
@@ -549,6 +678,11 @@ module Google
549
678
  # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Candidate>]
550
679
  attr_accessor :candidates
551
680
 
681
+ # Output only. The model version used to generate the response.
682
+ # Corresponds to the JSON property `modelVersion`
683
+ # @return [String]
684
+ attr_accessor :model_version
685
+
552
686
  # Content filter results for a prompt sent in the request.
553
687
  # Corresponds to the JSON property `promptFeedback`
554
688
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback]
@@ -566,6 +700,7 @@ module Google
566
700
  # Update properties of this object
567
701
  def update!(**args)
568
702
  @candidates = args[:candidates] if args.key?(:candidates)
703
+ @model_version = args[:model_version] if args.key?(:model_version)
569
704
  @prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
570
705
  @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
571
706
  end
@@ -606,17 +741,25 @@ module Google
606
741
  class GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
607
742
  include Google::Apis::Core::Hashable
608
743
 
744
+ # Output only. Number of tokens in the cached part in the input (the cached
745
+ # content).
746
+ # Corresponds to the JSON property `cachedContentTokenCount`
747
+ # @return [Fixnum]
748
+ attr_accessor :cached_content_token_count
749
+
609
750
  # Number of tokens in the response(s).
610
751
  # Corresponds to the JSON property `candidatesTokenCount`
611
752
  # @return [Fixnum]
612
753
  attr_accessor :candidates_token_count
613
754
 
614
- # Number of tokens in the request.
755
+ # Number of tokens in the request. When `cached_content` is set, this is still
756
+ # the total effective prompt size meaning this includes the number of tokens in
757
+ # the cached content.
615
758
  # Corresponds to the JSON property `promptTokenCount`
616
759
  # @return [Fixnum]
617
760
  attr_accessor :prompt_token_count
618
761
 
619
- #
762
+ # Total token count for prompt and response candidates.
620
763
  # Corresponds to the JSON property `totalTokenCount`
621
764
  # @return [Fixnum]
622
765
  attr_accessor :total_token_count
@@ -627,6 +770,7 @@ module Google
627
770
 
628
771
  # Update properties of this object
629
772
  def update!(**args)
773
+ @cached_content_token_count = args[:cached_content_token_count] if args.key?(:cached_content_token_count)
630
774
  @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
631
775
  @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
632
776
  @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
@@ -637,6 +781,13 @@ module Google
637
781
  class GoogleCloudAiplatformV1beta1GenerationConfig
638
782
  include Google::Apis::Core::Hashable
639
783
 
784
+ # Optional. If enabled, audio timestamp will be included in the request to the
785
+ # model.
786
+ # Corresponds to the JSON property `audioTimestamp`
787
+ # @return [Boolean]
788
+ attr_accessor :audio_timestamp
789
+ alias_method :audio_timestamp?, :audio_timestamp
790
+
640
791
  # Optional. Number of candidates to generate.
641
792
  # Corresponds to the JSON property `candidateCount`
642
793
  # @return [Fixnum]
@@ -647,6 +798,11 @@ module Google
647
798
  # @return [Float]
648
799
  attr_accessor :frequency_penalty
649
800
 
801
+ # Optional. Logit probabilities.
802
+ # Corresponds to the JSON property `logprobs`
803
+ # @return [Fixnum]
804
+ attr_accessor :logprobs
805
+
650
806
  # Optional. The maximum number of output tokens to generate per message.
651
807
  # Corresponds to the JSON property `maxOutputTokens`
652
808
  # @return [Fixnum]
@@ -657,6 +813,12 @@ module Google
657
813
  # @return [Float]
658
814
  attr_accessor :presence_penalty
659
815
 
816
+ # Optional. If true, export the logprobs results in response.
817
+ # Corresponds to the JSON property `responseLogprobs`
818
+ # @return [Boolean]
819
+ attr_accessor :response_logprobs
820
+ alias_method :response_logprobs?, :response_logprobs
821
+
660
822
  # Optional. Output response mimetype of the generated candidate text. Supported
661
823
  # mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON
662
824
  # response in the candidates. The model needs to be prompted to output the
@@ -668,11 +830,21 @@ module Google
668
830
 
669
831
  # Schema is used to define the format of input/output data. Represents a select
670
832
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
671
- # schema). More fields may be added in the future as needed.
833
+ # schema-object). More fields may be added in the future as needed.
672
834
  # Corresponds to the JSON property `responseSchema`
673
835
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
674
836
  attr_accessor :response_schema
675
837
 
838
+ # The configuration for routing the request to a specific model.
839
+ # Corresponds to the JSON property `routingConfig`
840
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig]
841
+ attr_accessor :routing_config
842
+
843
+ # Optional. Seed.
844
+ # Corresponds to the JSON property `seed`
845
+ # @return [Fixnum]
846
+ attr_accessor :seed
847
+
676
848
  # Optional. Stop sequences.
677
849
  # Corresponds to the JSON property `stopSequences`
678
850
  # @return [Array<String>]
@@ -699,12 +871,17 @@ module Google
699
871
 
700
872
  # Update properties of this object
701
873
  def update!(**args)
874
+ @audio_timestamp = args[:audio_timestamp] if args.key?(:audio_timestamp)
702
875
  @candidate_count = args[:candidate_count] if args.key?(:candidate_count)
703
876
  @frequency_penalty = args[:frequency_penalty] if args.key?(:frequency_penalty)
877
+ @logprobs = args[:logprobs] if args.key?(:logprobs)
704
878
  @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
705
879
  @presence_penalty = args[:presence_penalty] if args.key?(:presence_penalty)
880
+ @response_logprobs = args[:response_logprobs] if args.key?(:response_logprobs)
706
881
  @response_mime_type = args[:response_mime_type] if args.key?(:response_mime_type)
707
882
  @response_schema = args[:response_schema] if args.key?(:response_schema)
883
+ @routing_config = args[:routing_config] if args.key?(:routing_config)
884
+ @seed = args[:seed] if args.key?(:seed)
708
885
  @stop_sequences = args[:stop_sequences] if args.key?(:stop_sequences)
709
886
  @temperature = args[:temperature] if args.key?(:temperature)
710
887
  @top_k = args[:top_k] if args.key?(:top_k)
@@ -712,43 +889,41 @@ module Google
712
889
  end
713
890
  end
714
891
 
715
- # Tool to retrieve public web data for grounding, powered by Google.
716
- class GoogleCloudAiplatformV1beta1GoogleSearchRetrieval
892
+ # The configuration for routing the request to a specific model.
893
+ class GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig
717
894
  include Google::Apis::Core::Hashable
718
895
 
896
+ # When automated routing is specified, the routing will be determined by the
897
+ # pretrained routing model and customer provided model routing preference.
898
+ # Corresponds to the JSON property `autoMode`
899
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode]
900
+ attr_accessor :auto_mode
901
+
902
+ # When manual routing is set, the specified model will be used directly.
903
+ # Corresponds to the JSON property `manualMode`
904
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode]
905
+ attr_accessor :manual_mode
906
+
719
907
  def initialize(**args)
720
908
  update!(**args)
721
909
  end
722
910
 
723
911
  # Update properties of this object
724
912
  def update!(**args)
913
+ @auto_mode = args[:auto_mode] if args.key?(:auto_mode)
914
+ @manual_mode = args[:manual_mode] if args.key?(:manual_mode)
725
915
  end
726
916
  end
727
917
 
728
- # Grounding attribution.
729
- class GoogleCloudAiplatformV1beta1GroundingAttribution
918
+ # When automated routing is specified, the routing will be determined by the
919
+ # pretrained routing model and customer provided model routing preference.
920
+ class GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigAutoRoutingMode
730
921
  include Google::Apis::Core::Hashable
731
922
 
732
- # Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1.
733
- # 1 is the most confident.
734
- # Corresponds to the JSON property `confidenceScore`
735
- # @return [Float]
736
- attr_accessor :confidence_score
737
-
738
- # Attribution from context retrieved by the retrieval tools.
739
- # Corresponds to the JSON property `retrievedContext`
740
- # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext]
741
- attr_accessor :retrieved_context
742
-
743
- # Segment of the content.
744
- # Corresponds to the JSON property `segment`
745
- # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Segment]
746
- attr_accessor :segment
747
-
748
- # Attribution from the web.
749
- # Corresponds to the JSON property `web`
750
- # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingAttributionWeb]
751
- attr_accessor :web
923
+ # The model routing preference.
924
+ # Corresponds to the JSON property `modelRoutingPreference`
925
+ # @return [String]
926
+ attr_accessor :model_routing_preference
752
927
 
753
928
  def initialize(**args)
754
929
  update!(**args)
@@ -756,26 +931,19 @@ module Google
756
931
 
757
932
  # Update properties of this object
758
933
  def update!(**args)
759
- @confidence_score = args[:confidence_score] if args.key?(:confidence_score)
760
- @retrieved_context = args[:retrieved_context] if args.key?(:retrieved_context)
761
- @segment = args[:segment] if args.key?(:segment)
762
- @web = args[:web] if args.key?(:web)
934
+ @model_routing_preference = args[:model_routing_preference] if args.key?(:model_routing_preference)
763
935
  end
764
936
  end
765
937
 
766
- # Attribution from context retrieved by the retrieval tools.
767
- class GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext
938
+ # When manual routing is set, the specified model will be used directly.
939
+ class GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode
768
940
  include Google::Apis::Core::Hashable
769
941
 
770
- # Output only. Title of the attribution.
771
- # Corresponds to the JSON property `title`
772
- # @return [String]
773
- attr_accessor :title
774
-
775
- # Output only. URI reference of the attribution.
776
- # Corresponds to the JSON property `uri`
942
+ # The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.
943
+ # 5-pro-001'.
944
+ # Corresponds to the JSON property `modelName`
777
945
  # @return [String]
778
- attr_accessor :uri
946
+ attr_accessor :model_name
779
947
 
780
948
  def initialize(**args)
781
949
  update!(**args)
@@ -783,24 +951,18 @@ module Google
783
951
 
784
952
  # Update properties of this object
785
953
  def update!(**args)
786
- @title = args[:title] if args.key?(:title)
787
- @uri = args[:uri] if args.key?(:uri)
954
+ @model_name = args[:model_name] if args.key?(:model_name)
788
955
  end
789
956
  end
790
957
 
791
- # Attribution from the web.
792
- class GoogleCloudAiplatformV1beta1GroundingAttributionWeb
958
+ # Tool to retrieve public web data for grounding, powered by Google.
959
+ class GoogleCloudAiplatformV1beta1GoogleSearchRetrieval
793
960
  include Google::Apis::Core::Hashable
794
961
 
795
- # Output only. Title of the attribution.
796
- # Corresponds to the JSON property `title`
797
- # @return [String]
798
- attr_accessor :title
799
-
800
- # Output only. URI reference of the attribution.
801
- # Corresponds to the JSON property `uri`
802
- # @return [String]
803
- attr_accessor :uri
962
+ # Describes the options to customize dynamic retrieval.
963
+ # Corresponds to the JSON property `dynamicRetrievalConfig`
964
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1DynamicRetrievalConfig]
965
+ attr_accessor :dynamic_retrieval_config
804
966
 
805
967
  def initialize(**args)
806
968
  update!(**args)
@@ -808,8 +970,7 @@ module Google
808
970
 
809
971
  # Update properties of this object
810
972
  def update!(**args)
811
- @title = args[:title] if args.key?(:title)
812
- @uri = args[:uri] if args.key?(:uri)
973
+ @dynamic_retrieval_config = args[:dynamic_retrieval_config] if args.key?(:dynamic_retrieval_config)
813
974
  end
814
975
  end
815
976
 
@@ -842,6 +1003,11 @@ module Google
842
1003
  class GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext
843
1004
  include Google::Apis::Core::Hashable
844
1005
 
1006
+ # Text of the attribution.
1007
+ # Corresponds to the JSON property `text`
1008
+ # @return [String]
1009
+ attr_accessor :text
1010
+
845
1011
  # Title of the attribution.
846
1012
  # Corresponds to the JSON property `title`
847
1013
  # @return [String]
@@ -858,6 +1024,7 @@ module Google
858
1024
 
859
1025
  # Update properties of this object
860
1026
  def update!(**args)
1027
+ @text = args[:text] if args.key?(:text)
861
1028
  @title = args[:title] if args.key?(:title)
862
1029
  @uri = args[:uri] if args.key?(:uri)
863
1030
  end
@@ -892,11 +1059,6 @@ module Google
892
1059
  class GoogleCloudAiplatformV1beta1GroundingMetadata
893
1060
  include Google::Apis::Core::Hashable
894
1061
 
895
- # Optional. List of grounding attributions.
896
- # Corresponds to the JSON property `groundingAttributions`
897
- # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingAttribution>]
898
- attr_accessor :grounding_attributions
899
-
900
1062
  # List of supporting references retrieved from specified grounding source.
901
1063
  # Corresponds to the JSON property `groundingChunks`
902
1064
  # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingChunk>]
@@ -907,6 +1069,11 @@ module Google
907
1069
  # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingSupport>]
908
1070
  attr_accessor :grounding_supports
909
1071
 
1072
+ # Metadata related to retrieval in the grounding flow.
1073
+ # Corresponds to the JSON property `retrievalMetadata`
1074
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RetrievalMetadata]
1075
+ attr_accessor :retrieval_metadata
1076
+
910
1077
  # Optional. Queries executed by the retrieval tools.
911
1078
  # Corresponds to the JSON property `retrievalQueries`
912
1079
  # @return [Array<String>]
@@ -928,9 +1095,9 @@ module Google
928
1095
 
929
1096
  # Update properties of this object
930
1097
  def update!(**args)
931
- @grounding_attributions = args[:grounding_attributions] if args.key?(:grounding_attributions)
932
1098
  @grounding_chunks = args[:grounding_chunks] if args.key?(:grounding_chunks)
933
1099
  @grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
1100
+ @retrieval_metadata = args[:retrieval_metadata] if args.key?(:retrieval_metadata)
934
1101
  @retrieval_queries = args[:retrieval_queries] if args.key?(:retrieval_queries)
935
1102
  @search_entry_point = args[:search_entry_point] if args.key?(:search_entry_point)
936
1103
  @web_search_queries = args[:web_search_queries] if args.key?(:web_search_queries)
@@ -972,6 +1139,82 @@ module Google
972
1139
  end
973
1140
  end
974
1141
 
1142
+ # Logprobs Result
1143
+ class GoogleCloudAiplatformV1beta1LogprobsResult
1144
+ include Google::Apis::Core::Hashable
1145
+
1146
+ # Length = total number of decoding steps. The chosen candidates may or may not
1147
+ # be in top_candidates.
1148
+ # Corresponds to the JSON property `chosenCandidates`
1149
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1LogprobsResultCandidate>]
1150
+ attr_accessor :chosen_candidates
1151
+
1152
+ # Length = total number of decoding steps.
1153
+ # Corresponds to the JSON property `topCandidates`
1154
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates>]
1155
+ attr_accessor :top_candidates
1156
+
1157
+ def initialize(**args)
1158
+ update!(**args)
1159
+ end
1160
+
1161
+ # Update properties of this object
1162
+ def update!(**args)
1163
+ @chosen_candidates = args[:chosen_candidates] if args.key?(:chosen_candidates)
1164
+ @top_candidates = args[:top_candidates] if args.key?(:top_candidates)
1165
+ end
1166
+ end
1167
+
1168
+ # Candidate for the logprobs token and score.
1169
+ class GoogleCloudAiplatformV1beta1LogprobsResultCandidate
1170
+ include Google::Apis::Core::Hashable
1171
+
1172
+ # The candidate's log probability.
1173
+ # Corresponds to the JSON property `logProbability`
1174
+ # @return [Float]
1175
+ attr_accessor :log_probability
1176
+
1177
+ # The candidate's token string value.
1178
+ # Corresponds to the JSON property `token`
1179
+ # @return [String]
1180
+ attr_accessor :token
1181
+
1182
+ # The candidate's token id value.
1183
+ # Corresponds to the JSON property `tokenId`
1184
+ # @return [Fixnum]
1185
+ attr_accessor :token_id
1186
+
1187
+ def initialize(**args)
1188
+ update!(**args)
1189
+ end
1190
+
1191
+ # Update properties of this object
1192
+ def update!(**args)
1193
+ @log_probability = args[:log_probability] if args.key?(:log_probability)
1194
+ @token = args[:token] if args.key?(:token)
1195
+ @token_id = args[:token_id] if args.key?(:token_id)
1196
+ end
1197
+ end
1198
+
1199
+ # Candidates with top log probabilities at each decoding step.
1200
+ class GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates
1201
+ include Google::Apis::Core::Hashable
1202
+
1203
+ # Sorted by log probability in descending order.
1204
+ # Corresponds to the JSON property `candidates`
1205
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1LogprobsResultCandidate>]
1206
+ attr_accessor :candidates
1207
+
1208
+ def initialize(**args)
1209
+ update!(**args)
1210
+ end
1211
+
1212
+ # Update properties of this object
1213
+ def update!(**args)
1214
+ @candidates = args[:candidates] if args.key?(:candidates)
1215
+ end
1216
+ end
1217
+
975
1218
  # A datatype containing media that is part of a multi-part `Content` message. A `
976
1219
  # Part` consists of data which has an associated datatype. A `Part` can only
977
1220
  # contain one of the accepted types in `Part.data`. A `Part` must have a fixed
@@ -980,6 +1223,19 @@ module Google
980
1223
  class GoogleCloudAiplatformV1beta1Part
981
1224
  include Google::Apis::Core::Hashable
982
1225
 
1226
+ # Result of executing the [ExecutableCode]. Always follows a `part` containing
1227
+ # the [ExecutableCode].
1228
+ # Corresponds to the JSON property `codeExecutionResult`
1229
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1CodeExecutionResult]
1230
+ attr_accessor :code_execution_result
1231
+
1232
+ # Code generated by the model that is meant to be executed, and the result
1233
+ # returned to the model. Generated when using the [FunctionDeclaration] tool and
1234
+ # [FunctionCallingConfig] mode is set to [Mode.CODE].
1235
+ # Corresponds to the JSON property `executableCode`
1236
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ExecutableCode]
1237
+ attr_accessor :executable_code
1238
+
983
1239
  # URI based data.
984
1240
  # Corresponds to the JSON property `fileData`
985
1241
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FileData]
@@ -1021,6 +1277,8 @@ module Google
1021
1277
 
1022
1278
  # Update properties of this object
1023
1279
  def update!(**args)
1280
+ @code_execution_result = args[:code_execution_result] if args.key?(:code_execution_result)
1281
+ @executable_code = args[:executable_code] if args.key?(:executable_code)
1024
1282
  @file_data = args[:file_data] if args.key?(:file_data)
1025
1283
  @function_call = args[:function_call] if args.key?(:function_call)
1026
1284
  @function_response = args[:function_response] if args.key?(:function_response)
@@ -1030,20 +1288,174 @@ module Google
1030
1288
  end
1031
1289
  end
1032
1290
 
1291
+ # Specifies the context retrieval config.
1292
+ class GoogleCloudAiplatformV1beta1RagRetrievalConfig
1293
+ include Google::Apis::Core::Hashable
1294
+
1295
+ # Config for filters.
1296
+ # Corresponds to the JSON property `filter`
1297
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfigFilter]
1298
+ attr_accessor :filter
1299
+
1300
+ # Config for Hybrid Search.
1301
+ # Corresponds to the JSON property `hybridSearch`
1302
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfigHybridSearch]
1303
+ attr_accessor :hybrid_search
1304
+
1305
+ # Config for ranking and reranking.
1306
+ # Corresponds to the JSON property `ranking`
1307
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfigRanking]
1308
+ attr_accessor :ranking
1309
+
1310
+ # Optional. The number of contexts to retrieve.
1311
+ # Corresponds to the JSON property `topK`
1312
+ # @return [Fixnum]
1313
+ attr_accessor :top_k
1314
+
1315
+ def initialize(**args)
1316
+ update!(**args)
1317
+ end
1318
+
1319
+ # Update properties of this object
1320
+ def update!(**args)
1321
+ @filter = args[:filter] if args.key?(:filter)
1322
+ @hybrid_search = args[:hybrid_search] if args.key?(:hybrid_search)
1323
+ @ranking = args[:ranking] if args.key?(:ranking)
1324
+ @top_k = args[:top_k] if args.key?(:top_k)
1325
+ end
1326
+ end
1327
+
1328
+ # Config for filters.
1329
+ class GoogleCloudAiplatformV1beta1RagRetrievalConfigFilter
1330
+ include Google::Apis::Core::Hashable
1331
+
1332
+ # Optional. String for metadata filtering.
1333
+ # Corresponds to the JSON property `metadataFilter`
1334
+ # @return [String]
1335
+ attr_accessor :metadata_filter
1336
+
1337
+ # Optional. Only returns contexts with vector distance smaller than the
1338
+ # threshold.
1339
+ # Corresponds to the JSON property `vectorDistanceThreshold`
1340
+ # @return [Float]
1341
+ attr_accessor :vector_distance_threshold
1342
+
1343
+ # Optional. Only returns contexts with vector similarity larger than the
1344
+ # threshold.
1345
+ # Corresponds to the JSON property `vectorSimilarityThreshold`
1346
+ # @return [Float]
1347
+ attr_accessor :vector_similarity_threshold
1348
+
1349
+ def initialize(**args)
1350
+ update!(**args)
1351
+ end
1352
+
1353
+ # Update properties of this object
1354
+ def update!(**args)
1355
+ @metadata_filter = args[:metadata_filter] if args.key?(:metadata_filter)
1356
+ @vector_distance_threshold = args[:vector_distance_threshold] if args.key?(:vector_distance_threshold)
1357
+ @vector_similarity_threshold = args[:vector_similarity_threshold] if args.key?(:vector_similarity_threshold)
1358
+ end
1359
+ end
1360
+
1361
+ # Config for Hybrid Search.
1362
+ class GoogleCloudAiplatformV1beta1RagRetrievalConfigHybridSearch
1363
+ include Google::Apis::Core::Hashable
1364
+
1365
+ # Optional. Alpha value controls the weight between dense and sparse vector
1366
+ # search results. The range is [0, 1], while 0 means sparse vector search only
1367
+ # and 1 means dense vector search only. The default value is 0.5 which balances
1368
+ # sparse and dense vector search equally.
1369
+ # Corresponds to the JSON property `alpha`
1370
+ # @return [Float]
1371
+ attr_accessor :alpha
1372
+
1373
+ def initialize(**args)
1374
+ update!(**args)
1375
+ end
1376
+
1377
+ # Update properties of this object
1378
+ def update!(**args)
1379
+ @alpha = args[:alpha] if args.key?(:alpha)
1380
+ end
1381
+ end
1382
+
1383
+ # Config for ranking and reranking.
1384
+ class GoogleCloudAiplatformV1beta1RagRetrievalConfigRanking
1385
+ include Google::Apis::Core::Hashable
1386
+
1387
+ # Config for LlmRanker.
1388
+ # Corresponds to the JSON property `llmRanker`
1389
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfigRankingLlmRanker]
1390
+ attr_accessor :llm_ranker
1391
+
1392
+ # Config for Rank Service.
1393
+ # Corresponds to the JSON property `rankService`
1394
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfigRankingRankService]
1395
+ attr_accessor :rank_service
1396
+
1397
+ def initialize(**args)
1398
+ update!(**args)
1399
+ end
1400
+
1401
+ # Update properties of this object
1402
+ def update!(**args)
1403
+ @llm_ranker = args[:llm_ranker] if args.key?(:llm_ranker)
1404
+ @rank_service = args[:rank_service] if args.key?(:rank_service)
1405
+ end
1406
+ end
1407
+
1408
+ # Config for LlmRanker.
1409
+ class GoogleCloudAiplatformV1beta1RagRetrievalConfigRankingLlmRanker
1410
+ include Google::Apis::Core::Hashable
1411
+
1412
+ # Optional. The model name used for ranking. Format: `gemini-1.5-pro`
1413
+ # Corresponds to the JSON property `modelName`
1414
+ # @return [String]
1415
+ attr_accessor :model_name
1416
+
1417
+ def initialize(**args)
1418
+ update!(**args)
1419
+ end
1420
+
1421
+ # Update properties of this object
1422
+ def update!(**args)
1423
+ @model_name = args[:model_name] if args.key?(:model_name)
1424
+ end
1425
+ end
1426
+
1427
+ # Config for Rank Service.
1428
+ class GoogleCloudAiplatformV1beta1RagRetrievalConfigRankingRankService
1429
+ include Google::Apis::Core::Hashable
1430
+
1431
+ # Optional. The model name of the rank service. Format: `semantic-ranker-512@
1432
+ # latest`
1433
+ # Corresponds to the JSON property `modelName`
1434
+ # @return [String]
1435
+ attr_accessor :model_name
1436
+
1437
+ def initialize(**args)
1438
+ update!(**args)
1439
+ end
1440
+
1441
+ # Update properties of this object
1442
+ def update!(**args)
1443
+ @model_name = args[:model_name] if args.key?(:model_name)
1444
+ end
1445
+ end
1446
+
1033
1447
  # Defines a retrieval tool that model can call to access external knowledge.
1034
1448
  class GoogleCloudAiplatformV1beta1Retrieval
1035
1449
  include Google::Apis::Core::Hashable
1036
1450
 
1037
- # Optional. Disable using the result from this tool in detecting grounding
1038
- # attribution. This does not affect how the result is given to the model for
1039
- # generation.
1451
+ # Optional. Deprecated. This option is no longer supported.
1040
1452
  # Corresponds to the JSON property `disableAttribution`
1041
1453
  # @return [Boolean]
1042
1454
  attr_accessor :disable_attribution
1043
1455
  alias_method :disable_attribution?, :disable_attribution
1044
1456
 
1045
1457
  # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.
1046
- # google.com/vertex-ai-search-and-conversation
1458
+ # google.com/products/agent-builder
1047
1459
  # Corresponds to the JSON property `vertexAiSearch`
1048
1460
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexAiSearch]
1049
1461
  attr_accessor :vertex_ai_search
@@ -1065,6 +1477,29 @@ module Google
1065
1477
  end
1066
1478
  end
1067
1479
 
1480
+ # Metadata related to retrieval in the grounding flow.
1481
+ class GoogleCloudAiplatformV1beta1RetrievalMetadata
1482
+ include Google::Apis::Core::Hashable
1483
+
1484
+ # Optional. Score indicating how likely information from Google Search could
1485
+ # help answer the prompt. The score is in the range `[0, 1]`, where 0 is the
1486
+ # least likely and 1 is the most likely. This score is only populated when
1487
+ # Google Search grounding and dynamic retrieval is enabled. It will be compared
1488
+ # to the threshold to determine whether to trigger Google Search.
1489
+ # Corresponds to the JSON property `googleSearchDynamicRetrievalScore`
1490
+ # @return [Float]
1491
+ attr_accessor :google_search_dynamic_retrieval_score
1492
+
1493
+ def initialize(**args)
1494
+ update!(**args)
1495
+ end
1496
+
1497
+ # Update properties of this object
1498
+ def update!(**args)
1499
+ @google_search_dynamic_retrieval_score = args[:google_search_dynamic_retrieval_score] if args.key?(:google_search_dynamic_retrieval_score)
1500
+ end
1501
+ end
1502
+
1068
1503
  # Safety rating corresponding to the generated content.
1069
1504
  class GoogleCloudAiplatformV1beta1SafetyRating
1070
1505
  include Google::Apis::Core::Hashable
@@ -1150,10 +1585,16 @@ module Google
1150
1585
 
1151
1586
  # Schema is used to define the format of input/output data. Represents a select
1152
1587
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
1153
- # schema). More fields may be added in the future as needed.
1588
+ # schema-object). More fields may be added in the future as needed.
1154
1589
  class GoogleCloudAiplatformV1beta1Schema
1155
1590
  include Google::Apis::Core::Hashable
1156
1591
 
1592
+ # Optional. The value should be validated against any (one or more) of the
1593
+ # subschemas in the list.
1594
+ # Corresponds to the JSON property `anyOf`
1595
+ # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema>]
1596
+ attr_accessor :any_of
1597
+
1157
1598
  # Optional. Default value of the data.
1158
1599
  # Corresponds to the JSON property `default`
1159
1600
  # @return [Object]
@@ -1164,9 +1605,10 @@ module Google
1164
1605
  # @return [String]
1165
1606
  attr_accessor :description
1166
1607
 
1167
- # Optional. Possible values of the element of Type.STRING with enum format. For
1168
- # example we can define an Enum Direction as : `type:STRING, format:enum, enum:["
1169
- # EAST", NORTH", "SOUTH", "WEST"]`
1608
+ # Optional. Possible values of the element of primitive type with enum format.
1609
+ # Examples: 1. We can define direction as : `type:STRING, format:enum, enum:["
1610
+ # EAST", NORTH", "SOUTH", "WEST"]` 2. We can define apartment number as : `type:
1611
+ # INTEGER, format:enum, enum:["101", "201", "301"]`
1170
1612
  # Corresponds to the JSON property `enum`
1171
1613
  # @return [Array<String>]
1172
1614
  attr_accessor :enum
@@ -1186,7 +1628,7 @@ module Google
1186
1628
 
1187
1629
  # Schema is used to define the format of input/output data. Represents a select
1188
1630
  # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
1189
- # schema). More fields may be added in the future as needed.
1631
+ # schema-object). More fields may be added in the future as needed.
1190
1632
  # Corresponds to the JSON property `items`
1191
1633
  # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
1192
1634
  attr_accessor :items
@@ -1249,6 +1691,12 @@ module Google
1249
1691
  # @return [Hash<String,Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema>]
1250
1692
  attr_accessor :properties
1251
1693
 
1694
+ # Optional. The order of the properties. Not a standard field in open api spec.
1695
+ # Only used to support the order of the properties.
1696
+ # Corresponds to the JSON property `propertyOrdering`
1697
+ # @return [Array<String>]
1698
+ attr_accessor :property_ordering
1699
+
1252
1700
  # Optional. Required properties of Type.OBJECT.
1253
1701
  # Corresponds to the JSON property `required`
1254
1702
  # @return [Array<String>]
@@ -1270,6 +1718,7 @@ module Google
1270
1718
 
1271
1719
  # Update properties of this object
1272
1720
  def update!(**args)
1721
+ @any_of = args[:any_of] if args.key?(:any_of)
1273
1722
  @default = args[:default] if args.key?(:default)
1274
1723
  @description = args[:description] if args.key?(:description)
1275
1724
  @enum = args[:enum] if args.key?(:enum)
@@ -1287,6 +1736,7 @@ module Google
1287
1736
  @nullable = args[:nullable] if args.key?(:nullable)
1288
1737
  @pattern = args[:pattern] if args.key?(:pattern)
1289
1738
  @properties = args[:properties] if args.key?(:properties)
1739
+ @property_ordering = args[:property_ordering] if args.key?(:property_ordering)
1290
1740
  @required = args[:required] if args.key?(:required)
1291
1741
  @title = args[:title] if args.key?(:title)
1292
1742
  @type = args[:type] if args.key?(:type)
@@ -1367,12 +1817,19 @@ module Google
1367
1817
  class GoogleCloudAiplatformV1beta1Tool
1368
1818
  include Google::Apis::Core::Hashable
1369
1819
 
1820
+ # Tool that executes code generated by the model, and automatically returns the
1821
+ # result to the model. See also [ExecutableCode]and [CodeExecutionResult] which
1822
+ # are input and output to this tool.
1823
+ # Corresponds to the JSON property `codeExecution`
1824
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1ToolCodeExecution]
1825
+ attr_accessor :code_execution
1826
+
1370
1827
  # Optional. Function tool type. One or more function declarations to be passed
1371
1828
  # to the model along with the current user query. Model may decide to call a
1372
1829
  # subset of these functions by populating FunctionCall in the response. User
1373
1830
  # should provide a FunctionResponse for each function call in the next turn.
1374
1831
  # Based on the function responses, Model will generate the final response back
1375
- # to the user. Maximum 64 function declarations can be provided.
1832
+ # to the user. Maximum 128 function declarations can be provided.
1376
1833
  # Corresponds to the JSON property `functionDeclarations`
1377
1834
  # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionDeclaration>]
1378
1835
  attr_accessor :function_declarations
@@ -1393,12 +1850,28 @@ module Google
1393
1850
 
1394
1851
  # Update properties of this object
1395
1852
  def update!(**args)
1853
+ @code_execution = args[:code_execution] if args.key?(:code_execution)
1396
1854
  @function_declarations = args[:function_declarations] if args.key?(:function_declarations)
1397
1855
  @google_search_retrieval = args[:google_search_retrieval] if args.key?(:google_search_retrieval)
1398
1856
  @retrieval = args[:retrieval] if args.key?(:retrieval)
1399
1857
  end
1400
1858
  end
1401
1859
 
1860
+ # Tool that executes code generated by the model, and automatically returns the
1861
+ # result to the model. See also [ExecutableCode]and [CodeExecutionResult] which
1862
+ # are input and output to this tool.
1863
+ class GoogleCloudAiplatformV1beta1ToolCodeExecution
1864
+ include Google::Apis::Core::Hashable
1865
+
1866
+ def initialize(**args)
1867
+ update!(**args)
1868
+ end
1869
+
1870
+ # Update properties of this object
1871
+ def update!(**args)
1872
+ end
1873
+ end
1874
+
1402
1875
  # Tool config. This config is shared for all tools provided in the request.
1403
1876
  class GoogleCloudAiplatformV1beta1ToolConfig
1404
1877
  include Google::Apis::Core::Hashable
@@ -1419,11 +1892,11 @@ module Google
1419
1892
  end
1420
1893
 
1421
1894
  # Retrieve from Vertex AI Search datastore for grounding. See https://cloud.
1422
- # google.com/vertex-ai-search-and-conversation
1895
+ # google.com/products/agent-builder
1423
1896
  class GoogleCloudAiplatformV1beta1VertexAiSearch
1424
1897
  include Google::Apis::Core::Hashable
1425
1898
 
1426
- # Required. Fully-qualified Vertex AI Search's datastore resource ID. Format: `
1899
+ # Required. Fully-qualified Vertex AI Search data store resource ID. Format: `
1427
1900
  # projects/`project`/locations/`location`/collections/`collection`/dataStores/`
1428
1901
  # dataStore``
1429
1902
  # Corresponds to the JSON property `datastore`
@@ -1456,6 +1929,11 @@ module Google
1456
1929
  # @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexRagStoreRagResource>]
1457
1930
  attr_accessor :rag_resources
1458
1931
 
1932
+ # Specifies the context retrieval config.
1933
+ # Corresponds to the JSON property `ragRetrievalConfig`
1934
+ # @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfig]
1935
+ attr_accessor :rag_retrieval_config
1936
+
1459
1937
  # Optional. Number of top k results to return from the selected corpora.
1460
1938
  # Corresponds to the JSON property `similarityTopK`
1461
1939
  # @return [Fixnum]
@@ -1474,6 +1952,7 @@ module Google
1474
1952
  def update!(**args)
1475
1953
  @rag_corpora = args[:rag_corpora] if args.key?(:rag_corpora)
1476
1954
  @rag_resources = args[:rag_resources] if args.key?(:rag_resources)
1955
+ @rag_retrieval_config = args[:rag_retrieval_config] if args.key?(:rag_retrieval_config)
1477
1956
  @similarity_top_k = args[:similarity_top_k] if args.key?(:similarity_top_k)
1478
1957
  @vector_distance_threshold = args[:vector_distance_threshold] if args.key?(:vector_distance_threshold)
1479
1958
  end