google-apis-firebaseml_v2beta 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/google/apis/firebaseml_v2beta/classes.rb +575 -18
- data/lib/google/apis/firebaseml_v2beta/gem_version.rb +3 -3
- data/lib/google/apis/firebaseml_v2beta/representations.rb +273 -0
- data/lib/google/apis/firebaseml_v2beta/service.rb +8 -4
- metadata +4 -4
@@ -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
|
@@ -265,6 +304,11 @@ module Google
|
|
265
304
|
# @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content>]
|
266
305
|
attr_accessor :contents
|
267
306
|
|
307
|
+
# Generation config.
|
308
|
+
# Corresponds to the JSON property `generationConfig`
|
309
|
+
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfig]
|
310
|
+
attr_accessor :generation_config
|
311
|
+
|
268
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`
|
@@ -300,6 +344,7 @@ module Google
|
|
300
344
|
# Update properties of this object
|
301
345
|
def update!(**args)
|
302
346
|
@contents = args[:contents] if args.key?(:contents)
|
347
|
+
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
303
348
|
@instances = args[:instances] if args.key?(:instances)
|
304
349
|
@model = args[:model] if args.key?(:model)
|
305
350
|
@system_instruction = args[:system_instruction] if args.key?(:system_instruction)
|
@@ -333,6 +378,59 @@ module Google
|
|
333
378
|
end
|
334
379
|
end
|
335
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
|
+
|
336
434
|
# URI based data.
|
337
435
|
class GoogleCloudAiplatformV1beta1FileData
|
338
436
|
include Google::Apis::Core::Hashable
|
@@ -415,9 +513,9 @@ module Google
|
|
415
513
|
|
416
514
|
# Structured representation of a function declaration as defined by the [OpenAPI
|
417
515
|
# 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this
|
418
|
-
# declaration are the function name
|
419
|
-
# a representation of a block of code that can be
|
420
|
-
# 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.
|
421
519
|
class GoogleCloudAiplatformV1beta1FunctionDeclaration
|
422
520
|
include Google::Apis::Core::Hashable
|
423
521
|
|
@@ -436,14 +534,14 @@ module Google
|
|
436
534
|
|
437
535
|
# Schema is used to define the format of input/output data. Represents a select
|
438
536
|
# subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
|
439
|
-
# schema). More fields may be added in the future as needed.
|
537
|
+
# schema-object). More fields may be added in the future as needed.
|
440
538
|
# Corresponds to the JSON property `parameters`
|
441
539
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
|
442
540
|
attr_accessor :parameters
|
443
541
|
|
444
542
|
# Schema is used to define the format of input/output data. Represents a select
|
445
543
|
# subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
|
446
|
-
# schema). More fields may be added in the future as needed.
|
544
|
+
# schema-object). More fields may be added in the future as needed.
|
447
545
|
# Corresponds to the JSON property `response`
|
448
546
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
|
449
547
|
attr_accessor :response
|
@@ -474,7 +572,10 @@ module Google
|
|
474
572
|
# @return [String]
|
475
573
|
attr_accessor :name
|
476
574
|
|
477
|
-
# 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.
|
478
579
|
# Corresponds to the JSON property `response`
|
479
580
|
# @return [Hash<String,Object>]
|
480
581
|
attr_accessor :response
|
@@ -515,6 +616,15 @@ module Google
|
|
515
616
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerationConfig]
|
516
617
|
attr_accessor :generation_config
|
517
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
|
+
|
518
628
|
# Optional. Per request settings for blocking unsafe content. Enforced on
|
519
629
|
# GenerateContentResponse.candidates.
|
520
630
|
# Corresponds to the JSON property `safetySettings`
|
@@ -551,6 +661,7 @@ module Google
|
|
551
661
|
@cached_content = args[:cached_content] if args.key?(:cached_content)
|
552
662
|
@contents = args[:contents] if args.key?(:contents)
|
553
663
|
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
664
|
+
@labels = args[:labels] if args.key?(:labels)
|
554
665
|
@safety_settings = args[:safety_settings] if args.key?(:safety_settings)
|
555
666
|
@system_instruction = args[:system_instruction] if args.key?(:system_instruction)
|
556
667
|
@tool_config = args[:tool_config] if args.key?(:tool_config)
|
@@ -567,6 +678,11 @@ module Google
|
|
567
678
|
# @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Candidate>]
|
568
679
|
attr_accessor :candidates
|
569
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
|
+
|
570
686
|
# Content filter results for a prompt sent in the request.
|
571
687
|
# Corresponds to the JSON property `promptFeedback`
|
572
688
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback]
|
@@ -584,6 +700,7 @@ module Google
|
|
584
700
|
# Update properties of this object
|
585
701
|
def update!(**args)
|
586
702
|
@candidates = args[:candidates] if args.key?(:candidates)
|
703
|
+
@model_version = args[:model_version] if args.key?(:model_version)
|
587
704
|
@prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
|
588
705
|
@usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
|
589
706
|
end
|
@@ -624,17 +741,25 @@ module Google
|
|
624
741
|
class GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
|
625
742
|
include Google::Apis::Core::Hashable
|
626
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
|
+
|
627
750
|
# Number of tokens in the response(s).
|
628
751
|
# Corresponds to the JSON property `candidatesTokenCount`
|
629
752
|
# @return [Fixnum]
|
630
753
|
attr_accessor :candidates_token_count
|
631
754
|
|
632
|
-
# 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.
|
633
758
|
# Corresponds to the JSON property `promptTokenCount`
|
634
759
|
# @return [Fixnum]
|
635
760
|
attr_accessor :prompt_token_count
|
636
761
|
|
637
|
-
#
|
762
|
+
# Total token count for prompt and response candidates.
|
638
763
|
# Corresponds to the JSON property `totalTokenCount`
|
639
764
|
# @return [Fixnum]
|
640
765
|
attr_accessor :total_token_count
|
@@ -645,6 +770,7 @@ module Google
|
|
645
770
|
|
646
771
|
# Update properties of this object
|
647
772
|
def update!(**args)
|
773
|
+
@cached_content_token_count = args[:cached_content_token_count] if args.key?(:cached_content_token_count)
|
648
774
|
@candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
|
649
775
|
@prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
|
650
776
|
@total_token_count = args[:total_token_count] if args.key?(:total_token_count)
|
@@ -655,6 +781,13 @@ module Google
|
|
655
781
|
class GoogleCloudAiplatformV1beta1GenerationConfig
|
656
782
|
include Google::Apis::Core::Hashable
|
657
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
|
+
|
658
791
|
# Optional. Number of candidates to generate.
|
659
792
|
# Corresponds to the JSON property `candidateCount`
|
660
793
|
# @return [Fixnum]
|
@@ -665,6 +798,11 @@ module Google
|
|
665
798
|
# @return [Float]
|
666
799
|
attr_accessor :frequency_penalty
|
667
800
|
|
801
|
+
# Optional. Logit probabilities.
|
802
|
+
# Corresponds to the JSON property `logprobs`
|
803
|
+
# @return [Fixnum]
|
804
|
+
attr_accessor :logprobs
|
805
|
+
|
668
806
|
# Optional. The maximum number of output tokens to generate per message.
|
669
807
|
# Corresponds to the JSON property `maxOutputTokens`
|
670
808
|
# @return [Fixnum]
|
@@ -675,6 +813,12 @@ module Google
|
|
675
813
|
# @return [Float]
|
676
814
|
attr_accessor :presence_penalty
|
677
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
|
+
|
678
822
|
# Optional. Output response mimetype of the generated candidate text. Supported
|
679
823
|
# mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON
|
680
824
|
# response in the candidates. The model needs to be prompted to output the
|
@@ -686,11 +830,21 @@ module Google
|
|
686
830
|
|
687
831
|
# Schema is used to define the format of input/output data. Represents a select
|
688
832
|
# subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
|
689
|
-
# schema). More fields may be added in the future as needed.
|
833
|
+
# schema-object). More fields may be added in the future as needed.
|
690
834
|
# Corresponds to the JSON property `responseSchema`
|
691
835
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
|
692
836
|
attr_accessor :response_schema
|
693
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
|
+
|
694
848
|
# Optional. Stop sequences.
|
695
849
|
# Corresponds to the JSON property `stopSequences`
|
696
850
|
# @return [Array<String>]
|
@@ -717,12 +871,17 @@ module Google
|
|
717
871
|
|
718
872
|
# Update properties of this object
|
719
873
|
def update!(**args)
|
874
|
+
@audio_timestamp = args[:audio_timestamp] if args.key?(:audio_timestamp)
|
720
875
|
@candidate_count = args[:candidate_count] if args.key?(:candidate_count)
|
721
876
|
@frequency_penalty = args[:frequency_penalty] if args.key?(:frequency_penalty)
|
877
|
+
@logprobs = args[:logprobs] if args.key?(:logprobs)
|
722
878
|
@max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
|
723
879
|
@presence_penalty = args[:presence_penalty] if args.key?(:presence_penalty)
|
880
|
+
@response_logprobs = args[:response_logprobs] if args.key?(:response_logprobs)
|
724
881
|
@response_mime_type = args[:response_mime_type] if args.key?(:response_mime_type)
|
725
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)
|
726
885
|
@stop_sequences = args[:stop_sequences] if args.key?(:stop_sequences)
|
727
886
|
@temperature = args[:temperature] if args.key?(:temperature)
|
728
887
|
@top_k = args[:top_k] if args.key?(:top_k)
|
@@ -730,16 +889,88 @@ module Google
|
|
730
889
|
end
|
731
890
|
end
|
732
891
|
|
892
|
+
# The configuration for routing the request to a specific model.
|
893
|
+
class GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig
|
894
|
+
include Google::Apis::Core::Hashable
|
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
|
+
|
907
|
+
def initialize(**args)
|
908
|
+
update!(**args)
|
909
|
+
end
|
910
|
+
|
911
|
+
# Update properties of this object
|
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)
|
915
|
+
end
|
916
|
+
end
|
917
|
+
|
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
|
921
|
+
include Google::Apis::Core::Hashable
|
922
|
+
|
923
|
+
# The model routing preference.
|
924
|
+
# Corresponds to the JSON property `modelRoutingPreference`
|
925
|
+
# @return [String]
|
926
|
+
attr_accessor :model_routing_preference
|
927
|
+
|
928
|
+
def initialize(**args)
|
929
|
+
update!(**args)
|
930
|
+
end
|
931
|
+
|
932
|
+
# Update properties of this object
|
933
|
+
def update!(**args)
|
934
|
+
@model_routing_preference = args[:model_routing_preference] if args.key?(:model_routing_preference)
|
935
|
+
end
|
936
|
+
end
|
937
|
+
|
938
|
+
# When manual routing is set, the specified model will be used directly.
|
939
|
+
class GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfigManualRoutingMode
|
940
|
+
include Google::Apis::Core::Hashable
|
941
|
+
|
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`
|
945
|
+
# @return [String]
|
946
|
+
attr_accessor :model_name
|
947
|
+
|
948
|
+
def initialize(**args)
|
949
|
+
update!(**args)
|
950
|
+
end
|
951
|
+
|
952
|
+
# Update properties of this object
|
953
|
+
def update!(**args)
|
954
|
+
@model_name = args[:model_name] if args.key?(:model_name)
|
955
|
+
end
|
956
|
+
end
|
957
|
+
|
733
958
|
# Tool to retrieve public web data for grounding, powered by Google.
|
734
959
|
class GoogleCloudAiplatformV1beta1GoogleSearchRetrieval
|
735
960
|
include Google::Apis::Core::Hashable
|
736
961
|
|
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
|
966
|
+
|
737
967
|
def initialize(**args)
|
738
968
|
update!(**args)
|
739
969
|
end
|
740
970
|
|
741
971
|
# Update properties of this object
|
742
972
|
def update!(**args)
|
973
|
+
@dynamic_retrieval_config = args[:dynamic_retrieval_config] if args.key?(:dynamic_retrieval_config)
|
743
974
|
end
|
744
975
|
end
|
745
976
|
|
@@ -772,6 +1003,11 @@ module Google
|
|
772
1003
|
class GoogleCloudAiplatformV1beta1GroundingChunkRetrievedContext
|
773
1004
|
include Google::Apis::Core::Hashable
|
774
1005
|
|
1006
|
+
# Text of the attribution.
|
1007
|
+
# Corresponds to the JSON property `text`
|
1008
|
+
# @return [String]
|
1009
|
+
attr_accessor :text
|
1010
|
+
|
775
1011
|
# Title of the attribution.
|
776
1012
|
# Corresponds to the JSON property `title`
|
777
1013
|
# @return [String]
|
@@ -788,6 +1024,7 @@ module Google
|
|
788
1024
|
|
789
1025
|
# Update properties of this object
|
790
1026
|
def update!(**args)
|
1027
|
+
@text = args[:text] if args.key?(:text)
|
791
1028
|
@title = args[:title] if args.key?(:title)
|
792
1029
|
@uri = args[:uri] if args.key?(:uri)
|
793
1030
|
end
|
@@ -832,6 +1069,11 @@ module Google
|
|
832
1069
|
# @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingSupport>]
|
833
1070
|
attr_accessor :grounding_supports
|
834
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
|
+
|
835
1077
|
# Optional. Queries executed by the retrieval tools.
|
836
1078
|
# Corresponds to the JSON property `retrievalQueries`
|
837
1079
|
# @return [Array<String>]
|
@@ -855,6 +1097,7 @@ module Google
|
|
855
1097
|
def update!(**args)
|
856
1098
|
@grounding_chunks = args[:grounding_chunks] if args.key?(:grounding_chunks)
|
857
1099
|
@grounding_supports = args[:grounding_supports] if args.key?(:grounding_supports)
|
1100
|
+
@retrieval_metadata = args[:retrieval_metadata] if args.key?(:retrieval_metadata)
|
858
1101
|
@retrieval_queries = args[:retrieval_queries] if args.key?(:retrieval_queries)
|
859
1102
|
@search_entry_point = args[:search_entry_point] if args.key?(:search_entry_point)
|
860
1103
|
@web_search_queries = args[:web_search_queries] if args.key?(:web_search_queries)
|
@@ -896,6 +1139,82 @@ module Google
|
|
896
1139
|
end
|
897
1140
|
end
|
898
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
|
+
|
899
1218
|
# A datatype containing media that is part of a multi-part `Content` message. A `
|
900
1219
|
# Part` consists of data which has an associated datatype. A `Part` can only
|
901
1220
|
# contain one of the accepted types in `Part.data`. A `Part` must have a fixed
|
@@ -904,6 +1223,19 @@ module Google
|
|
904
1223
|
class GoogleCloudAiplatformV1beta1Part
|
905
1224
|
include Google::Apis::Core::Hashable
|
906
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
|
+
|
907
1239
|
# URI based data.
|
908
1240
|
# Corresponds to the JSON property `fileData`
|
909
1241
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FileData]
|
@@ -945,6 +1277,8 @@ module Google
|
|
945
1277
|
|
946
1278
|
# Update properties of this object
|
947
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)
|
948
1282
|
@file_data = args[:file_data] if args.key?(:file_data)
|
949
1283
|
@function_call = args[:function_call] if args.key?(:function_call)
|
950
1284
|
@function_response = args[:function_response] if args.key?(:function_response)
|
@@ -954,6 +1288,162 @@ module Google
|
|
954
1288
|
end
|
955
1289
|
end
|
956
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
|
+
|
957
1447
|
# Defines a retrieval tool that model can call to access external knowledge.
|
958
1448
|
class GoogleCloudAiplatformV1beta1Retrieval
|
959
1449
|
include Google::Apis::Core::Hashable
|
@@ -965,7 +1455,7 @@ module Google
|
|
965
1455
|
alias_method :disable_attribution?, :disable_attribution
|
966
1456
|
|
967
1457
|
# Retrieve from Vertex AI Search datastore for grounding. See https://cloud.
|
968
|
-
# google.com/
|
1458
|
+
# google.com/products/agent-builder
|
969
1459
|
# Corresponds to the JSON property `vertexAiSearch`
|
970
1460
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexAiSearch]
|
971
1461
|
attr_accessor :vertex_ai_search
|
@@ -987,6 +1477,29 @@ module Google
|
|
987
1477
|
end
|
988
1478
|
end
|
989
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
|
+
|
990
1503
|
# Safety rating corresponding to the generated content.
|
991
1504
|
class GoogleCloudAiplatformV1beta1SafetyRating
|
992
1505
|
include Google::Apis::Core::Hashable
|
@@ -1072,10 +1585,16 @@ module Google
|
|
1072
1585
|
|
1073
1586
|
# Schema is used to define the format of input/output data. Represents a select
|
1074
1587
|
# subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
|
1075
|
-
# schema). More fields may be added in the future as needed.
|
1588
|
+
# schema-object). More fields may be added in the future as needed.
|
1076
1589
|
class GoogleCloudAiplatformV1beta1Schema
|
1077
1590
|
include Google::Apis::Core::Hashable
|
1078
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
|
+
|
1079
1598
|
# Optional. Default value of the data.
|
1080
1599
|
# Corresponds to the JSON property `default`
|
1081
1600
|
# @return [Object]
|
@@ -1086,9 +1605,10 @@ module Google
|
|
1086
1605
|
# @return [String]
|
1087
1606
|
attr_accessor :description
|
1088
1607
|
|
1089
|
-
# Optional. Possible values of the element of
|
1090
|
-
#
|
1091
|
-
# 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"]`
|
1092
1612
|
# Corresponds to the JSON property `enum`
|
1093
1613
|
# @return [Array<String>]
|
1094
1614
|
attr_accessor :enum
|
@@ -1108,7 +1628,7 @@ module Google
|
|
1108
1628
|
|
1109
1629
|
# Schema is used to define the format of input/output data. Represents a select
|
1110
1630
|
# subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
|
1111
|
-
# schema). More fields may be added in the future as needed.
|
1631
|
+
# schema-object). More fields may be added in the future as needed.
|
1112
1632
|
# Corresponds to the JSON property `items`
|
1113
1633
|
# @return [Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema]
|
1114
1634
|
attr_accessor :items
|
@@ -1171,6 +1691,12 @@ module Google
|
|
1171
1691
|
# @return [Hash<String,Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Schema>]
|
1172
1692
|
attr_accessor :properties
|
1173
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
|
+
|
1174
1700
|
# Optional. Required properties of Type.OBJECT.
|
1175
1701
|
# Corresponds to the JSON property `required`
|
1176
1702
|
# @return [Array<String>]
|
@@ -1192,6 +1718,7 @@ module Google
|
|
1192
1718
|
|
1193
1719
|
# Update properties of this object
|
1194
1720
|
def update!(**args)
|
1721
|
+
@any_of = args[:any_of] if args.key?(:any_of)
|
1195
1722
|
@default = args[:default] if args.key?(:default)
|
1196
1723
|
@description = args[:description] if args.key?(:description)
|
1197
1724
|
@enum = args[:enum] if args.key?(:enum)
|
@@ -1209,6 +1736,7 @@ module Google
|
|
1209
1736
|
@nullable = args[:nullable] if args.key?(:nullable)
|
1210
1737
|
@pattern = args[:pattern] if args.key?(:pattern)
|
1211
1738
|
@properties = args[:properties] if args.key?(:properties)
|
1739
|
+
@property_ordering = args[:property_ordering] if args.key?(:property_ordering)
|
1212
1740
|
@required = args[:required] if args.key?(:required)
|
1213
1741
|
@title = args[:title] if args.key?(:title)
|
1214
1742
|
@type = args[:type] if args.key?(:type)
|
@@ -1289,12 +1817,19 @@ module Google
|
|
1289
1817
|
class GoogleCloudAiplatformV1beta1Tool
|
1290
1818
|
include Google::Apis::Core::Hashable
|
1291
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
|
+
|
1292
1827
|
# Optional. Function tool type. One or more function declarations to be passed
|
1293
1828
|
# to the model along with the current user query. Model may decide to call a
|
1294
1829
|
# subset of these functions by populating FunctionCall in the response. User
|
1295
1830
|
# should provide a FunctionResponse for each function call in the next turn.
|
1296
1831
|
# Based on the function responses, Model will generate the final response back
|
1297
|
-
# to the user. Maximum
|
1832
|
+
# to the user. Maximum 128 function declarations can be provided.
|
1298
1833
|
# Corresponds to the JSON property `functionDeclarations`
|
1299
1834
|
# @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1FunctionDeclaration>]
|
1300
1835
|
attr_accessor :function_declarations
|
@@ -1315,12 +1850,28 @@ module Google
|
|
1315
1850
|
|
1316
1851
|
# Update properties of this object
|
1317
1852
|
def update!(**args)
|
1853
|
+
@code_execution = args[:code_execution] if args.key?(:code_execution)
|
1318
1854
|
@function_declarations = args[:function_declarations] if args.key?(:function_declarations)
|
1319
1855
|
@google_search_retrieval = args[:google_search_retrieval] if args.key?(:google_search_retrieval)
|
1320
1856
|
@retrieval = args[:retrieval] if args.key?(:retrieval)
|
1321
1857
|
end
|
1322
1858
|
end
|
1323
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
|
+
|
1324
1875
|
# Tool config. This config is shared for all tools provided in the request.
|
1325
1876
|
class GoogleCloudAiplatformV1beta1ToolConfig
|
1326
1877
|
include Google::Apis::Core::Hashable
|
@@ -1341,11 +1892,11 @@ module Google
|
|
1341
1892
|
end
|
1342
1893
|
|
1343
1894
|
# Retrieve from Vertex AI Search datastore for grounding. See https://cloud.
|
1344
|
-
# google.com/
|
1895
|
+
# google.com/products/agent-builder
|
1345
1896
|
class GoogleCloudAiplatformV1beta1VertexAiSearch
|
1346
1897
|
include Google::Apis::Core::Hashable
|
1347
1898
|
|
1348
|
-
# Required. Fully-qualified Vertex AI Search
|
1899
|
+
# Required. Fully-qualified Vertex AI Search data store resource ID. Format: `
|
1349
1900
|
# projects/`project`/locations/`location`/collections/`collection`/dataStores/`
|
1350
1901
|
# dataStore``
|
1351
1902
|
# Corresponds to the JSON property `datastore`
|
@@ -1378,6 +1929,11 @@ module Google
|
|
1378
1929
|
# @return [Array<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexRagStoreRagResource>]
|
1379
1930
|
attr_accessor :rag_resources
|
1380
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
|
+
|
1381
1937
|
# Optional. Number of top k results to return from the selected corpora.
|
1382
1938
|
# Corresponds to the JSON property `similarityTopK`
|
1383
1939
|
# @return [Fixnum]
|
@@ -1396,6 +1952,7 @@ module Google
|
|
1396
1952
|
def update!(**args)
|
1397
1953
|
@rag_corpora = args[:rag_corpora] if args.key?(:rag_corpora)
|
1398
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)
|
1399
1956
|
@similarity_top_k = args[:similarity_top_k] if args.key?(:similarity_top_k)
|
1400
1957
|
@vector_distance_threshold = args[:vector_distance_threshold] if args.key?(:vector_distance_threshold)
|
1401
1958
|
end
|