google-apis-aiplatform_v1 0.9.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -647,6 +647,12 @@ module Google
647
647
  # @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceCandidate>]
648
648
  attr_accessor :candidates
649
649
 
650
+ # Debug information containing message metadata. Clients should not consume this
651
+ # field, and this is only populated for Flow Runner path.
652
+ # Corresponds to the JSON property `debugMetadata`
653
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceMessageMetadata]
654
+ attr_accessor :debug_metadata
655
+
650
656
  # Content filter results for a prompt sent in the request.
651
657
  # Corresponds to the JSON property `promptFeedback`
652
658
  # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServicePromptFeedback]
@@ -669,12 +675,46 @@ module Google
669
675
  # Update properties of this object
670
676
  def update!(**args)
671
677
  @candidates = args[:candidates] if args.key?(:candidates)
678
+ @debug_metadata = args[:debug_metadata] if args.key?(:debug_metadata)
672
679
  @prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
673
680
  @reporting_metrics = args[:reporting_metrics] if args.key?(:reporting_metrics)
674
681
  @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
675
682
  end
676
683
  end
677
684
 
685
+ #
686
+ class CloudAiNlLlmProtoServiceMessageMetadata
687
+ include Google::Apis::Core::Hashable
688
+
689
+ # LINT.IfChange This metadata contains additional information required for
690
+ # debugging.
691
+ # Corresponds to the JSON property `inputFilterInfo`
692
+ # @return [Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata]
693
+ attr_accessor :input_filter_info
694
+
695
+ # Holds the final routing decision, by storing the model_config_id. And
696
+ # individual scores each model got.
697
+ # Corresponds to the JSON property `modelRoutingDecision`
698
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecision]
699
+ attr_accessor :model_routing_decision
700
+
701
+ # Filter metadata of the output messages.
702
+ # Corresponds to the JSON property `outputFilterInfo`
703
+ # @return [Array<Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata>]
704
+ attr_accessor :output_filter_info
705
+
706
+ def initialize(**args)
707
+ update!(**args)
708
+ end
709
+
710
+ # Update properties of this object
711
+ def update!(**args)
712
+ @input_filter_info = args[:input_filter_info] if args.key?(:input_filter_info)
713
+ @model_routing_decision = args[:model_routing_decision] if args.key?(:model_routing_decision)
714
+ @output_filter_info = args[:output_filter_info] if args.key?(:output_filter_info)
715
+ end
716
+ end
717
+
678
718
  # A single part of a message.
679
719
  class CloudAiNlLlmProtoServicePart
680
720
  include Google::Apis::Core::Hashable
@@ -837,6 +877,122 @@ module Google
837
877
  end
838
878
  end
839
879
 
880
+ # The RAI results for a given text.
881
+ class CloudAiNlLlmProtoServiceRaiResult
882
+ include Google::Apis::Core::Hashable
883
+
884
+ # The recitation result for one input
885
+ # Corresponds to the JSON property `aidaRecitationResult`
886
+ # @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoRecitationResult]
887
+ attr_accessor :aida_recitation_result
888
+
889
+ # Use `triggered_blocklist`.
890
+ # Corresponds to the JSON property `blocked`
891
+ # @return [Boolean]
892
+ attr_accessor :blocked
893
+ alias_method :blocked?, :blocked
894
+
895
+ # The error codes indicate which RAI filters block the response.
896
+ # Corresponds to the JSON property `errorCodes`
897
+ # @return [Array<Fixnum>]
898
+ attr_accessor :error_codes
899
+
900
+ # Whether the text should be filtered and not shown to the end user. This is
901
+ # determined based on a combination of `triggered_recitation`, `
902
+ # triggered_blocklist`, `language_filter_result`, and `triggered_safety_filter`.
903
+ # Corresponds to the JSON property `filtered`
904
+ # @return [Boolean]
905
+ attr_accessor :filtered
906
+ alias_method :filtered?, :filtered
907
+
908
+ # Language filter result from SAFT LangId.
909
+ # Corresponds to the JSON property `languageFilterResult`
910
+ # @return [Google::Apis::AiplatformV1::LearningServingLlmLanguageFilterResult]
911
+ attr_accessor :language_filter_result
912
+
913
+ # The RAI signals for the text.
914
+ # Corresponds to the JSON property `raiSignals`
915
+ # @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal>]
916
+ attr_accessor :rai_signals
917
+
918
+ # Whether the text triggered the blocklist.
919
+ # Corresponds to the JSON property `triggeredBlocklist`
920
+ # @return [Boolean]
921
+ attr_accessor :triggered_blocklist
922
+ alias_method :triggered_blocklist?, :triggered_blocklist
923
+
924
+ # Whether the text should be blocked by the recitation result from Aida
925
+ # recitation checker. It is determined from aida_recitation_result.
926
+ # Corresponds to the JSON property `triggeredRecitation`
927
+ # @return [Boolean]
928
+ attr_accessor :triggered_recitation
929
+ alias_method :triggered_recitation?, :triggered_recitation
930
+
931
+ # Whether the text triggered the safety filter. Currently, this is due to CSAI
932
+ # triggering or one of four categories (derogatory, sexual, toxic, violent)
933
+ # having a score over the filter threshold.
934
+ # Corresponds to the JSON property `triggeredSafetyFilter`
935
+ # @return [Boolean]
936
+ attr_accessor :triggered_safety_filter
937
+ alias_method :triggered_safety_filter?, :triggered_safety_filter
938
+
939
+ def initialize(**args)
940
+ update!(**args)
941
+ end
942
+
943
+ # Update properties of this object
944
+ def update!(**args)
945
+ @aida_recitation_result = args[:aida_recitation_result] if args.key?(:aida_recitation_result)
946
+ @blocked = args[:blocked] if args.key?(:blocked)
947
+ @error_codes = args[:error_codes] if args.key?(:error_codes)
948
+ @filtered = args[:filtered] if args.key?(:filtered)
949
+ @language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
950
+ @rai_signals = args[:rai_signals] if args.key?(:rai_signals)
951
+ @triggered_blocklist = args[:triggered_blocklist] if args.key?(:triggered_blocklist)
952
+ @triggered_recitation = args[:triggered_recitation] if args.key?(:triggered_recitation)
953
+ @triggered_safety_filter = args[:triggered_safety_filter] if args.key?(:triggered_safety_filter)
954
+ end
955
+ end
956
+
957
+ # An RAI signal for a single category.
958
+ class CloudAiNlLlmProtoServiceRaiSignal
959
+ include Google::Apis::Core::Hashable
960
+
961
+ # The confidence level for the RAI category.
962
+ # Corresponds to the JSON property `confidence`
963
+ # @return [String]
964
+ attr_accessor :confidence
965
+
966
+ # Whether the category is flagged as being present. Currently, this is set to
967
+ # true if score >= 0.5.
968
+ # Corresponds to the JSON property `flagged`
969
+ # @return [Boolean]
970
+ attr_accessor :flagged
971
+ alias_method :flagged?, :flagged
972
+
973
+ # The RAI category.
974
+ # Corresponds to the JSON property `raiCategory`
975
+ # @return [String]
976
+ attr_accessor :rai_category
977
+
978
+ # The score for the category, in the range [0.0, 1.0].
979
+ # Corresponds to the JSON property `score`
980
+ # @return [Float]
981
+ attr_accessor :score
982
+
983
+ def initialize(**args)
984
+ update!(**args)
985
+ end
986
+
987
+ # Update properties of this object
988
+ def update!(**args)
989
+ @confidence = args[:confidence] if args.key?(:confidence)
990
+ @flagged = args[:flagged] if args.key?(:flagged)
991
+ @rai_category = args[:rai_category] if args.key?(:rai_category)
992
+ @score = args[:score] if args.key?(:score)
993
+ end
994
+ end
995
+
840
996
  # Safety rating corresponding to the generated content.
841
997
  class CloudAiNlLlmProtoServiceSafetyRating
842
998
  include Google::Apis::Core::Hashable
@@ -2709,6 +2865,61 @@ module Google
2709
2865
  end
2710
2866
  end
2711
2867
 
2868
+ # A response candidate generated from the model.
2869
+ class GoogleCloudAiplatformV1Candidate
2870
+ include Google::Apis::Core::Hashable
2871
+
2872
+ # A collection of source attributions for a piece of content.
2873
+ # Corresponds to the JSON property `citationMetadata`
2874
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CitationMetadata]
2875
+ attr_accessor :citation_metadata
2876
+
2877
+ # The base structured datatype containing multi-part content of a message. A `
2878
+ # Content` includes a `role` field designating the producer of the `Content` and
2879
+ # a `parts` field containing multi-part data that contains the content of the
2880
+ # message turn.
2881
+ # Corresponds to the JSON property `content`
2882
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content]
2883
+ attr_accessor :content
2884
+
2885
+ # Output only. Describes the reason the mode stopped generating tokens in more
2886
+ # detail. This is only filled when `finish_reason` is set.
2887
+ # Corresponds to the JSON property `finishMessage`
2888
+ # @return [String]
2889
+ attr_accessor :finish_message
2890
+
2891
+ # Output only. The reason why the model stopped generating tokens. If empty, the
2892
+ # model has not stopped generating the tokens.
2893
+ # Corresponds to the JSON property `finishReason`
2894
+ # @return [String]
2895
+ attr_accessor :finish_reason
2896
+
2897
+ # Output only. Index of the candidate.
2898
+ # Corresponds to the JSON property `index`
2899
+ # @return [Fixnum]
2900
+ attr_accessor :index
2901
+
2902
+ # Output only. List of ratings for the safety of a response candidate. There is
2903
+ # at most one rating per category.
2904
+ # Corresponds to the JSON property `safetyRatings`
2905
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetyRating>]
2906
+ attr_accessor :safety_ratings
2907
+
2908
+ def initialize(**args)
2909
+ update!(**args)
2910
+ end
2911
+
2912
+ # Update properties of this object
2913
+ def update!(**args)
2914
+ @citation_metadata = args[:citation_metadata] if args.key?(:citation_metadata)
2915
+ @content = args[:content] if args.key?(:content)
2916
+ @finish_message = args[:finish_message] if args.key?(:finish_message)
2917
+ @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
2918
+ @index = args[:index] if args.key?(:index)
2919
+ @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
2920
+ end
2921
+ end
2922
+
2712
2923
  # This message will be placed in the metadata field of a google.longrunning.
2713
2924
  # Operation associated with a CheckTrialEarlyStoppingState request.
2714
2925
  class GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateMetatdata
@@ -2774,6 +2985,81 @@ module Google
2774
2985
  end
2775
2986
  end
2776
2987
 
2988
+ # Source attributions for content.
2989
+ class GoogleCloudAiplatformV1Citation
2990
+ include Google::Apis::Core::Hashable
2991
+
2992
+ # Output only. End index into the content.
2993
+ # Corresponds to the JSON property `endIndex`
2994
+ # @return [Fixnum]
2995
+ attr_accessor :end_index
2996
+
2997
+ # Output only. License of the attribution.
2998
+ # Corresponds to the JSON property `license`
2999
+ # @return [String]
3000
+ attr_accessor :license
3001
+
3002
+ # Represents a whole or partial calendar date, such as a birthday. The time of
3003
+ # day and time zone are either specified elsewhere or are insignificant. The
3004
+ # date is relative to the Gregorian Calendar. This can represent one of the
3005
+ # following: * A full date, with non-zero year, month, and day values. * A month
3006
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
3007
+ # with a zero month and a zero day. * A year and month, with a zero day (for
3008
+ # example, a credit card expiration date). Related types: * google.type.
3009
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
3010
+ # Corresponds to the JSON property `publicationDate`
3011
+ # @return [Google::Apis::AiplatformV1::GoogleTypeDate]
3012
+ attr_accessor :publication_date
3013
+
3014
+ # Output only. Start index into the content.
3015
+ # Corresponds to the JSON property `startIndex`
3016
+ # @return [Fixnum]
3017
+ attr_accessor :start_index
3018
+
3019
+ # Output only. Title of the attribution.
3020
+ # Corresponds to the JSON property `title`
3021
+ # @return [String]
3022
+ attr_accessor :title
3023
+
3024
+ # Output only. Url reference of the attribution.
3025
+ # Corresponds to the JSON property `uri`
3026
+ # @return [String]
3027
+ attr_accessor :uri
3028
+
3029
+ def initialize(**args)
3030
+ update!(**args)
3031
+ end
3032
+
3033
+ # Update properties of this object
3034
+ def update!(**args)
3035
+ @end_index = args[:end_index] if args.key?(:end_index)
3036
+ @license = args[:license] if args.key?(:license)
3037
+ @publication_date = args[:publication_date] if args.key?(:publication_date)
3038
+ @start_index = args[:start_index] if args.key?(:start_index)
3039
+ @title = args[:title] if args.key?(:title)
3040
+ @uri = args[:uri] if args.key?(:uri)
3041
+ end
3042
+ end
3043
+
3044
+ # A collection of source attributions for a piece of content.
3045
+ class GoogleCloudAiplatformV1CitationMetadata
3046
+ include Google::Apis::Core::Hashable
3047
+
3048
+ # Output only. List of citations.
3049
+ # Corresponds to the JSON property `citations`
3050
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Citation>]
3051
+ attr_accessor :citations
3052
+
3053
+ def initialize(**args)
3054
+ update!(**args)
3055
+ end
3056
+
3057
+ # Update properties of this object
3058
+ def update!(**args)
3059
+ @citations = args[:citations] if args.key?(:citations)
3060
+ end
3061
+ end
3062
+
2777
3063
  # Request message for VizierService.CompleteTrial.
2778
3064
  class GoogleCloudAiplatformV1CompleteTrialRequest
2779
3065
  include Google::Apis::Core::Hashable
@@ -6893,8 +7179,8 @@ module Google
6893
7179
  attr_accessor :data_stats
6894
7180
 
6895
7181
  # All of the files that are exported in this export operation. For custom code
6896
- # training export, only three (training, validation and test) GCS paths in
6897
- # wildcard format are populated (e.g., gs://.../training-*).
7182
+ # training export, only three (training, validation and test) Cloud Storage
7183
+ # paths in wildcard format are populated (for example, gs://.../training-*).
6898
7184
  # Corresponds to the JSON property `exportedFiles`
6899
7185
  # @return [Array<String>]
6900
7186
  attr_accessor :exported_files
@@ -7390,7 +7676,7 @@ module Google
7390
7676
  attr_accessor :value_type
7391
7677
 
7392
7678
  # Only applicable for Vertex AI Feature Store. The name of the BigQuery Table/
7393
- # View columnn hosting data for this version. If no value is provided, will use
7679
+ # View column hosting data for this version. If no value is provided, will use
7394
7680
  # feature_id.
7395
7681
  # Corresponds to the JSON property `versionColumnName`
7396
7682
  # @return [String]
@@ -8861,6 +9147,103 @@ module Google
8861
9147
  end
8862
9148
  end
8863
9149
 
9150
+ # A predicted [FunctionCall] returned from the model that contains a string
9151
+ # representing the [FunctionDeclaration.name] and a structured JSON object
9152
+ # containing the parameters and their values.
9153
+ class GoogleCloudAiplatformV1FunctionCall
9154
+ include Google::Apis::Core::Hashable
9155
+
9156
+ # Optional. Required. The function parameters and values in JSON object format.
9157
+ # See [FunctionDeclaration.parameters] for parameter details.
9158
+ # Corresponds to the JSON property `args`
9159
+ # @return [Hash<String,Object>]
9160
+ attr_accessor :args
9161
+
9162
+ # Required. The name of the function to call. Matches [FunctionDeclaration.name].
9163
+ # Corresponds to the JSON property `name`
9164
+ # @return [String]
9165
+ attr_accessor :name
9166
+
9167
+ def initialize(**args)
9168
+ update!(**args)
9169
+ end
9170
+
9171
+ # Update properties of this object
9172
+ def update!(**args)
9173
+ @args = args[:args] if args.key?(:args)
9174
+ @name = args[:name] if args.key?(:name)
9175
+ end
9176
+ end
9177
+
9178
+ # Structured representation of a function declaration as defined by the [OpenAPI
9179
+ # 3.0 specification](https://spec.openapis.org/oas/v3.0.3). Included in this
9180
+ # declaration are the function name and parameters. This FunctionDeclaration is
9181
+ # a representation of a block of code that can be used as a `Tool` by the model
9182
+ # and executed by the client.
9183
+ class GoogleCloudAiplatformV1FunctionDeclaration
9184
+ include Google::Apis::Core::Hashable
9185
+
9186
+ # Optional. Description and purpose of the function. Model uses it to decide how
9187
+ # and whether to call the function.
9188
+ # Corresponds to the JSON property `description`
9189
+ # @return [String]
9190
+ attr_accessor :description
9191
+
9192
+ # Required. The name of the function to call. Must start with a letter or an
9193
+ # underscore. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a
9194
+ # maximum length of 64.
9195
+ # Corresponds to the JSON property `name`
9196
+ # @return [String]
9197
+ attr_accessor :name
9198
+
9199
+ # Schema is used to define the format of input/output data. Represents a select
9200
+ # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
9201
+ # schema). More fields may be added in the future as needed.
9202
+ # Corresponds to the JSON property `parameters`
9203
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema]
9204
+ attr_accessor :parameters
9205
+
9206
+ def initialize(**args)
9207
+ update!(**args)
9208
+ end
9209
+
9210
+ # Update properties of this object
9211
+ def update!(**args)
9212
+ @description = args[:description] if args.key?(:description)
9213
+ @name = args[:name] if args.key?(:name)
9214
+ @parameters = args[:parameters] if args.key?(:parameters)
9215
+ end
9216
+ end
9217
+
9218
+ # The result output from a [FunctionCall] that contains a string representing
9219
+ # the [FunctionDeclaration.name] and a structured JSON object containing any
9220
+ # output from the function is used as context to the model. This should contain
9221
+ # the result of a [FunctionCall] made based on model prediction.
9222
+ class GoogleCloudAiplatformV1FunctionResponse
9223
+ include Google::Apis::Core::Hashable
9224
+
9225
+ # Required. The name of the function to call. Matches [FunctionDeclaration.name]
9226
+ # and [FunctionCall.name].
9227
+ # Corresponds to the JSON property `name`
9228
+ # @return [String]
9229
+ attr_accessor :name
9230
+
9231
+ # Required. The function response in JSON object format.
9232
+ # Corresponds to the JSON property `response`
9233
+ # @return [Hash<String,Object>]
9234
+ attr_accessor :response
9235
+
9236
+ def initialize(**args)
9237
+ update!(**args)
9238
+ end
9239
+
9240
+ # Update properties of this object
9241
+ def update!(**args)
9242
+ @name = args[:name] if args.key?(:name)
9243
+ @response = args[:response] if args.key?(:response)
9244
+ end
9245
+ end
9246
+
8864
9247
  # The Google Cloud Storage location where the output is to be written to.
8865
9248
  class GoogleCloudAiplatformV1GcsDestination
8866
9249
  include Google::Apis::Core::Hashable
@@ -8903,18 +9286,203 @@ module Google
8903
9286
  end
8904
9287
  end
8905
9288
 
8906
- # Generic Metadata shared by all operations.
8907
- class GoogleCloudAiplatformV1GenericOperationMetadata
9289
+ # Request message for [PredictionService.GenerateContent].
9290
+ class GoogleCloudAiplatformV1GenerateContentRequest
8908
9291
  include Google::Apis::Core::Hashable
8909
9292
 
8910
- # Output only. Time when the operation was created.
8911
- # Corresponds to the JSON property `createTime`
8912
- # @return [String]
8913
- attr_accessor :create_time
9293
+ # Required. The content of the current conversation with the model. For single-
9294
+ # turn queries, this is a single instance. For multi-turn queries, this is a
9295
+ # repeated field that contains conversation history + latest request.
9296
+ # Corresponds to the JSON property `contents`
9297
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
9298
+ attr_accessor :contents
8914
9299
 
8915
- # Output only. Partial failures encountered. E.g. single files that couldn't be
8916
- # read. This field should never exceed 20 entries. Status details field will
8917
- # contain standard Google Cloud error details.
9300
+ # Generation config.
9301
+ # Corresponds to the JSON property `generationConfig`
9302
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
9303
+ attr_accessor :generation_config
9304
+
9305
+ # Optional. Per request settings for blocking unsafe content. Enforced on
9306
+ # GenerateContentResponse.candidates.
9307
+ # Corresponds to the JSON property `safetySettings`
9308
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetySetting>]
9309
+ attr_accessor :safety_settings
9310
+
9311
+ # Optional. A list of `Tools` the model may use to generate the next response. A
9312
+ # `Tool` is a piece of code that enables the system to interact with external
9313
+ # systems to perform an action, or set of actions, outside of knowledge and
9314
+ # scope of the model. The only supported tool is currently `Function`
9315
+ # Corresponds to the JSON property `tools`
9316
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool>]
9317
+ attr_accessor :tools
9318
+
9319
+ def initialize(**args)
9320
+ update!(**args)
9321
+ end
9322
+
9323
+ # Update properties of this object
9324
+ def update!(**args)
9325
+ @contents = args[:contents] if args.key?(:contents)
9326
+ @generation_config = args[:generation_config] if args.key?(:generation_config)
9327
+ @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
9328
+ @tools = args[:tools] if args.key?(:tools)
9329
+ end
9330
+ end
9331
+
9332
+ # Response message for [PredictionService.GenerateContent].
9333
+ class GoogleCloudAiplatformV1GenerateContentResponse
9334
+ include Google::Apis::Core::Hashable
9335
+
9336
+ # Output only. Generated candidates.
9337
+ # Corresponds to the JSON property `candidates`
9338
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Candidate>]
9339
+ attr_accessor :candidates
9340
+
9341
+ # Content filter results for a prompt sent in the request.
9342
+ # Corresponds to the JSON property `promptFeedback`
9343
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback]
9344
+ attr_accessor :prompt_feedback
9345
+
9346
+ # Usage metadata about response(s).
9347
+ # Corresponds to the JSON property `usageMetadata`
9348
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata]
9349
+ attr_accessor :usage_metadata
9350
+
9351
+ def initialize(**args)
9352
+ update!(**args)
9353
+ end
9354
+
9355
+ # Update properties of this object
9356
+ def update!(**args)
9357
+ @candidates = args[:candidates] if args.key?(:candidates)
9358
+ @prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
9359
+ @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
9360
+ end
9361
+ end
9362
+
9363
+ # Content filter results for a prompt sent in the request.
9364
+ class GoogleCloudAiplatformV1GenerateContentResponsePromptFeedback
9365
+ include Google::Apis::Core::Hashable
9366
+
9367
+ # Output only. Blocked reason.
9368
+ # Corresponds to the JSON property `blockReason`
9369
+ # @return [String]
9370
+ attr_accessor :block_reason
9371
+
9372
+ # Output only. A readable block reason message.
9373
+ # Corresponds to the JSON property `blockReasonMessage`
9374
+ # @return [String]
9375
+ attr_accessor :block_reason_message
9376
+
9377
+ # Output only. Safety ratings.
9378
+ # Corresponds to the JSON property `safetyRatings`
9379
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetyRating>]
9380
+ attr_accessor :safety_ratings
9381
+
9382
+ def initialize(**args)
9383
+ update!(**args)
9384
+ end
9385
+
9386
+ # Update properties of this object
9387
+ def update!(**args)
9388
+ @block_reason = args[:block_reason] if args.key?(:block_reason)
9389
+ @block_reason_message = args[:block_reason_message] if args.key?(:block_reason_message)
9390
+ @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
9391
+ end
9392
+ end
9393
+
9394
+ # Usage metadata about response(s).
9395
+ class GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata
9396
+ include Google::Apis::Core::Hashable
9397
+
9398
+ # Number of tokens in the response(s).
9399
+ # Corresponds to the JSON property `candidatesTokenCount`
9400
+ # @return [Fixnum]
9401
+ attr_accessor :candidates_token_count
9402
+
9403
+ # Number of tokens in the request.
9404
+ # Corresponds to the JSON property `promptTokenCount`
9405
+ # @return [Fixnum]
9406
+ attr_accessor :prompt_token_count
9407
+
9408
+ #
9409
+ # Corresponds to the JSON property `totalTokenCount`
9410
+ # @return [Fixnum]
9411
+ attr_accessor :total_token_count
9412
+
9413
+ def initialize(**args)
9414
+ update!(**args)
9415
+ end
9416
+
9417
+ # Update properties of this object
9418
+ def update!(**args)
9419
+ @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count)
9420
+ @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
9421
+ @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
9422
+ end
9423
+ end
9424
+
9425
+ # Generation config.
9426
+ class GoogleCloudAiplatformV1GenerationConfig
9427
+ include Google::Apis::Core::Hashable
9428
+
9429
+ # Optional. Number of candidates to generate.
9430
+ # Corresponds to the JSON property `candidateCount`
9431
+ # @return [Fixnum]
9432
+ attr_accessor :candidate_count
9433
+
9434
+ # Optional. The maximum number of output tokens to generate per message.
9435
+ # Corresponds to the JSON property `maxOutputTokens`
9436
+ # @return [Fixnum]
9437
+ attr_accessor :max_output_tokens
9438
+
9439
+ # Optional. Stop sequences.
9440
+ # Corresponds to the JSON property `stopSequences`
9441
+ # @return [Array<String>]
9442
+ attr_accessor :stop_sequences
9443
+
9444
+ # Optional. Controls the randomness of predictions.
9445
+ # Corresponds to the JSON property `temperature`
9446
+ # @return [Float]
9447
+ attr_accessor :temperature
9448
+
9449
+ # Optional. If specified, top-k sampling will be used.
9450
+ # Corresponds to the JSON property `topK`
9451
+ # @return [Float]
9452
+ attr_accessor :top_k
9453
+
9454
+ # Optional. If specified, nucleus sampling will be used.
9455
+ # Corresponds to the JSON property `topP`
9456
+ # @return [Float]
9457
+ attr_accessor :top_p
9458
+
9459
+ def initialize(**args)
9460
+ update!(**args)
9461
+ end
9462
+
9463
+ # Update properties of this object
9464
+ def update!(**args)
9465
+ @candidate_count = args[:candidate_count] if args.key?(:candidate_count)
9466
+ @max_output_tokens = args[:max_output_tokens] if args.key?(:max_output_tokens)
9467
+ @stop_sequences = args[:stop_sequences] if args.key?(:stop_sequences)
9468
+ @temperature = args[:temperature] if args.key?(:temperature)
9469
+ @top_k = args[:top_k] if args.key?(:top_k)
9470
+ @top_p = args[:top_p] if args.key?(:top_p)
9471
+ end
9472
+ end
9473
+
9474
+ # Generic Metadata shared by all operations.
9475
+ class GoogleCloudAiplatformV1GenericOperationMetadata
9476
+ include Google::Apis::Core::Hashable
9477
+
9478
+ # Output only. Time when the operation was created.
9479
+ # Corresponds to the JSON property `createTime`
9480
+ # @return [String]
9481
+ attr_accessor :create_time
9482
+
9483
+ # Output only. Partial failures encountered. E.g. single files that couldn't be
9484
+ # read. This field should never exceed 20 entries. Status details field will
9485
+ # contain standard Google Cloud error details.
8918
9486
  # Corresponds to the JSON property `partialFailures`
8919
9487
  # @return [Array<Google::Apis::AiplatformV1::GoogleRpcStatus>]
8920
9488
  attr_accessor :partial_failures
@@ -12896,7 +13464,8 @@ module Google
12896
13464
 
12897
13465
  # The metadata of the ModelEvaluation. For the ModelEvaluation uploaded from
12898
13466
  # Managed Pipeline, metadata contains a structured value with keys of "
12899
- # pipeline_job_id", "evaluation_dataset_type", "evaluation_dataset_path".
13467
+ # pipeline_job_id", "evaluation_dataset_type", "evaluation_dataset_path", "
13468
+ # row_based_metrics_path".
12900
13469
  # Corresponds to the JSON property `metadata`
12901
13470
  # @return [Object]
12902
13471
  attr_accessor :metadata
@@ -14442,6 +15011,42 @@ module Google
14442
15011
  end
14443
15012
  end
14444
15013
 
15014
+ # Notebook Reservation Affinity for consuming Zonal reservation.
15015
+ class GoogleCloudAiplatformV1NotebookReservationAffinity
15016
+ include Google::Apis::Core::Hashable
15017
+
15018
+ # Required. Specifies the type of reservation from which this instance can
15019
+ # consume resources: RESERVATION_ANY (default), RESERVATION_SPECIFIC, or
15020
+ # RESERVATION_NONE. See Consuming reserved instances for examples.
15021
+ # Corresponds to the JSON property `consumeReservationType`
15022
+ # @return [String]
15023
+ attr_accessor :consume_reservation_type
15024
+
15025
+ # Optional. Corresponds to the label key of a reservation resource. To target a
15026
+ # RESERVATION_SPECIFIC by name, use compute.googleapis.com/reservation-name as
15027
+ # the key and specify the name of your reservation as its value.
15028
+ # Corresponds to the JSON property `key`
15029
+ # @return [String]
15030
+ attr_accessor :key
15031
+
15032
+ # Optional. Corresponds to the label values of a reservation resource. This must
15033
+ # be the full path name of Reservation.
15034
+ # Corresponds to the JSON property `values`
15035
+ # @return [Array<String>]
15036
+ attr_accessor :values
15037
+
15038
+ def initialize(**args)
15039
+ update!(**args)
15040
+ end
15041
+
15042
+ # Update properties of this object
15043
+ def update!(**args)
15044
+ @consume_reservation_type = args[:consume_reservation_type] if args.key?(:consume_reservation_type)
15045
+ @key = args[:key] if args.key?(:key)
15046
+ @values = args[:values] if args.key?(:values)
15047
+ end
15048
+ end
15049
+
14445
15050
  # A runtime is a virtual machine allocated to a particular user for a particular
14446
15051
  # Notebook file on temporary basis with lifetime limited to 24 hours.
14447
15052
  class GoogleCloudAiplatformV1NotebookRuntime
@@ -14477,6 +15082,12 @@ module Google
14477
15082
  # @return [String]
14478
15083
  attr_accessor :health_state
14479
15084
 
15085
+ # Output only. Whether NotebookRuntime is upgradable.
15086
+ # Corresponds to the JSON property `isUpgradable`
15087
+ # @return [Boolean]
15088
+ attr_accessor :is_upgradable
15089
+ alias_method :is_upgradable?, :is_upgradable
15090
+
14480
15091
  # The labels with user-defined metadata to organize your NotebookRuntime. Label
14481
15092
  # keys and values can be no longer than 64 characters (Unicode codepoints), can
14482
15093
  # only contain lowercase letters, numeric characters, underscores and dashes.
@@ -14499,6 +15110,12 @@ module Google
14499
15110
  # @return [String]
14500
15111
  attr_accessor :name
14501
15112
 
15113
+ # Optional. The Compute Engine tags to add to runtime (see [Tagging instances](
15114
+ # https://cloud.google.com/vpc/docs/add-remove-network-tags)).
15115
+ # Corresponds to the JSON property `networkTags`
15116
+ # @return [Array<String>]
15117
+ attr_accessor :network_tags
15118
+
14502
15119
  # Points to a NotebookRuntimeTemplateRef.
14503
15120
  # Corresponds to the JSON property `notebookRuntimeTemplateRef`
14504
15121
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1NotebookRuntimeTemplateRef]
@@ -14514,6 +15131,11 @@ module Google
14514
15131
  # @return [String]
14515
15132
  attr_accessor :proxy_uri
14516
15133
 
15134
+ # Notebook Reservation Affinity for consuming Zonal reservation.
15135
+ # Corresponds to the JSON property `reservationAffinity`
15136
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1NotebookReservationAffinity]
15137
+ attr_accessor :reservation_affinity
15138
+
14517
15139
  # Output only. The runtime (instance) state of the NotebookRuntime.
14518
15140
  # Corresponds to the JSON property `runtimeState`
14519
15141
  # @return [String]
@@ -14550,11 +15172,14 @@ module Google
14550
15172
  @display_name = args[:display_name] if args.key?(:display_name)
14551
15173
  @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
14552
15174
  @health_state = args[:health_state] if args.key?(:health_state)
15175
+ @is_upgradable = args[:is_upgradable] if args.key?(:is_upgradable)
14553
15176
  @labels = args[:labels] if args.key?(:labels)
14554
15177
  @name = args[:name] if args.key?(:name)
15178
+ @network_tags = args[:network_tags] if args.key?(:network_tags)
14555
15179
  @notebook_runtime_template_ref = args[:notebook_runtime_template_ref] if args.key?(:notebook_runtime_template_ref)
14556
15180
  @notebook_runtime_type = args[:notebook_runtime_type] if args.key?(:notebook_runtime_type)
14557
15181
  @proxy_uri = args[:proxy_uri] if args.key?(:proxy_uri)
15182
+ @reservation_affinity = args[:reservation_affinity] if args.key?(:reservation_affinity)
14558
15183
  @runtime_state = args[:runtime_state] if args.key?(:runtime_state)
14559
15184
  @runtime_user = args[:runtime_user] if args.key?(:runtime_user)
14560
15185
  @service_account = args[:service_account] if args.key?(:service_account)
@@ -14637,11 +15262,22 @@ module Google
14637
15262
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1NetworkSpec]
14638
15263
  attr_accessor :network_spec
14639
15264
 
15265
+ # Optional. The Compute Engine tags to add to runtime (see [Tagging instances](
15266
+ # https://cloud.google.com/vpc/docs/add-remove-network-tags)).
15267
+ # Corresponds to the JSON property `networkTags`
15268
+ # @return [Array<String>]
15269
+ attr_accessor :network_tags
15270
+
14640
15271
  # Optional. Immutable. The type of the notebook runtime template.
14641
15272
  # Corresponds to the JSON property `notebookRuntimeType`
14642
15273
  # @return [String]
14643
15274
  attr_accessor :notebook_runtime_type
14644
15275
 
15276
+ # Notebook Reservation Affinity for consuming Zonal reservation.
15277
+ # Corresponds to the JSON property `reservationAffinity`
15278
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1NotebookReservationAffinity]
15279
+ attr_accessor :reservation_affinity
15280
+
14645
15281
  # The service account that the runtime workload runs as. You can use any service
14646
15282
  # account within the same project, but you must have the service account user
14647
15283
  # permission to use the instance. If not specified, the [Compute Engine default
@@ -14651,6 +15287,13 @@ module Google
14651
15287
  # @return [String]
14652
15288
  attr_accessor :service_account
14653
15289
 
15290
+ # A set of Shielded Instance options. See [Images using supported Shielded VM
15291
+ # features](https://cloud.google.com/compute/docs/instances/modifying-shielded-
15292
+ # vm).
15293
+ # Corresponds to the JSON property `shieldedVmConfig`
15294
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ShieldedVmConfig]
15295
+ attr_accessor :shielded_vm_config
15296
+
14654
15297
  # Output only. Timestamp when this NotebookRuntimeTemplate was most recently
14655
15298
  # updated.
14656
15299
  # Corresponds to the JSON property `updateTime`
@@ -14675,8 +15318,11 @@ module Google
14675
15318
  @machine_spec = args[:machine_spec] if args.key?(:machine_spec)
14676
15319
  @name = args[:name] if args.key?(:name)
14677
15320
  @network_spec = args[:network_spec] if args.key?(:network_spec)
15321
+ @network_tags = args[:network_tags] if args.key?(:network_tags)
14678
15322
  @notebook_runtime_type = args[:notebook_runtime_type] if args.key?(:notebook_runtime_type)
15323
+ @reservation_affinity = args[:reservation_affinity] if args.key?(:reservation_affinity)
14679
15324
  @service_account = args[:service_account] if args.key?(:service_account)
15325
+ @shielded_vm_config = args[:shielded_vm_config] if args.key?(:shielded_vm_config)
14680
15326
  @update_time = args[:update_time] if args.key?(:update_time)
14681
15327
  end
14682
15328
  end
@@ -14713,6 +15359,21 @@ module Google
14713
15359
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FileData]
14714
15360
  attr_accessor :file_data
14715
15361
 
15362
+ # A predicted [FunctionCall] returned from the model that contains a string
15363
+ # representing the [FunctionDeclaration.name] and a structured JSON object
15364
+ # containing the parameters and their values.
15365
+ # Corresponds to the JSON property `functionCall`
15366
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionCall]
15367
+ attr_accessor :function_call
15368
+
15369
+ # The result output from a [FunctionCall] that contains a string representing
15370
+ # the [FunctionDeclaration.name] and a structured JSON object containing any
15371
+ # output from the function is used as context to the model. This should contain
15372
+ # the result of a [FunctionCall] made based on model prediction.
15373
+ # Corresponds to the JSON property `functionResponse`
15374
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionResponse]
15375
+ attr_accessor :function_response
15376
+
14716
15377
  # Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.
14717
15378
  # Corresponds to the JSON property `inlineData`
14718
15379
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Blob]
@@ -14735,6 +15396,8 @@ module Google
14735
15396
  # Update properties of this object
14736
15397
  def update!(**args)
14737
15398
  @file_data = args[:file_data] if args.key?(:file_data)
15399
+ @function_call = args[:function_call] if args.key?(:function_call)
15400
+ @function_response = args[:function_response] if args.key?(:function_response)
14738
15401
  @inline_data = args[:inline_data] if args.key?(:inline_data)
14739
15402
  @text = args[:text] if args.key?(:text)
14740
15403
  @video_metadata = args[:video_metadata] if args.key?(:video_metadata)
@@ -15820,6 +16483,11 @@ module Google
15820
16483
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences]
15821
16484
  attr_accessor :open_fine_tuning_pipeline
15822
16485
 
16486
+ # Open fine tuning pipelines.
16487
+ # Corresponds to the JSON property `openFineTuningPipelines`
16488
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines]
16489
+ attr_accessor :open_fine_tuning_pipelines
16490
+
15823
16491
  # The regional resource name or the URI. Key is region, e.g., us-central1,
15824
16492
  # europe-west2, global, etc..
15825
16493
  # Corresponds to the JSON property `openGenerationAiStudio`
@@ -15838,6 +16506,11 @@ module Google
15838
16506
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences]
15839
16507
  attr_accessor :open_notebook
15840
16508
 
16509
+ # Open notebooks.
16510
+ # Corresponds to the JSON property `openNotebooks`
16511
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks]
16512
+ attr_accessor :open_notebooks
16513
+
15841
16514
  # The regional resource name or the URI. Key is region, e.g., us-central1,
15842
16515
  # europe-west2, global, etc..
15843
16516
  # Corresponds to the JSON property `openPromptTuningPipeline`
@@ -15865,9 +16538,11 @@ module Google
15865
16538
  @deploy = args[:deploy] if args.key?(:deploy)
15866
16539
  @open_evaluation_pipeline = args[:open_evaluation_pipeline] if args.key?(:open_evaluation_pipeline)
15867
16540
  @open_fine_tuning_pipeline = args[:open_fine_tuning_pipeline] if args.key?(:open_fine_tuning_pipeline)
16541
+ @open_fine_tuning_pipelines = args[:open_fine_tuning_pipelines] if args.key?(:open_fine_tuning_pipelines)
15868
16542
  @open_generation_ai_studio = args[:open_generation_ai_studio] if args.key?(:open_generation_ai_studio)
15869
16543
  @open_genie = args[:open_genie] if args.key?(:open_genie)
15870
16544
  @open_notebook = args[:open_notebook] if args.key?(:open_notebook)
16545
+ @open_notebooks = args[:open_notebooks] if args.key?(:open_notebooks)
15871
16546
  @open_prompt_tuning_pipeline = args[:open_prompt_tuning_pipeline] if args.key?(:open_prompt_tuning_pipeline)
15872
16547
  @request_access = args[:request_access] if args.key?(:request_access)
15873
16548
  @view_rest_api = args[:view_rest_api] if args.key?(:view_rest_api)
@@ -15951,6 +16626,44 @@ module Google
15951
16626
  end
15952
16627
  end
15953
16628
 
16629
+ # Open fine tuning pipelines.
16630
+ class GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines
16631
+ include Google::Apis::Core::Hashable
16632
+
16633
+ # Required. Regional resource references to fine tuning pipelines.
16634
+ # Corresponds to the JSON property `fineTuningPipelines`
16635
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences>]
16636
+ attr_accessor :fine_tuning_pipelines
16637
+
16638
+ def initialize(**args)
16639
+ update!(**args)
16640
+ end
16641
+
16642
+ # Update properties of this object
16643
+ def update!(**args)
16644
+ @fine_tuning_pipelines = args[:fine_tuning_pipelines] if args.key?(:fine_tuning_pipelines)
16645
+ end
16646
+ end
16647
+
16648
+ # Open notebooks.
16649
+ class GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks
16650
+ include Google::Apis::Core::Hashable
16651
+
16652
+ # Required. Regional resource references to notebooks.
16653
+ # Corresponds to the JSON property `notebooks`
16654
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences>]
16655
+ attr_accessor :notebooks
16656
+
16657
+ def initialize(**args)
16658
+ update!(**args)
16659
+ end
16660
+
16661
+ # Update properties of this object
16662
+ def update!(**args)
16663
+ @notebooks = args[:notebooks] if args.key?(:notebooks)
16664
+ end
16665
+ end
16666
+
15954
16667
  # The regional resource name or the URI. Key is region, e.g., us-central1,
15955
16668
  # europe-west2, global, etc..
15956
16669
  class GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences
@@ -15961,7 +16674,22 @@ module Google
15961
16674
  # @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelResourceReference>]
15962
16675
  attr_accessor :references
15963
16676
 
15964
- # Required. The title of the regional resource reference.
16677
+ # Optional. Description of the resource.
16678
+ # Corresponds to the JSON property `resourceDescription`
16679
+ # @return [String]
16680
+ attr_accessor :resource_description
16681
+
16682
+ # Optional. Title of the resource.
16683
+ # Corresponds to the JSON property `resourceTitle`
16684
+ # @return [String]
16685
+ attr_accessor :resource_title
16686
+
16687
+ # Optional. Use case (CUJ) of the resource.
16688
+ # Corresponds to the JSON property `resourceUseCase`
16689
+ # @return [String]
16690
+ attr_accessor :resource_use_case
16691
+
16692
+ # Required.
15965
16693
  # Corresponds to the JSON property `title`
15966
16694
  # @return [String]
15967
16695
  attr_accessor :title
@@ -15973,6 +16701,9 @@ module Google
15973
16701
  # Update properties of this object
15974
16702
  def update!(**args)
15975
16703
  @references = args[:references] if args.key?(:references)
16704
+ @resource_description = args[:resource_description] if args.key?(:resource_description)
16705
+ @resource_title = args[:resource_title] if args.key?(:resource_title)
16706
+ @resource_use_case = args[:resource_use_case] if args.key?(:resource_use_case)
15976
16707
  @title = args[:title] if args.key?(:title)
15977
16708
  end
15978
16709
  end
@@ -16878,27 +17609,26 @@ module Google
16878
17609
  end
16879
17610
  end
16880
17611
 
16881
- # Active learning data sampling config. For every active learning labeling
16882
- # iteration, it will select a batch of data based on the sampling strategy.
16883
- class GoogleCloudAiplatformV1SampleConfig
17612
+ # Safety rating corresponding to the generated content.
17613
+ class GoogleCloudAiplatformV1SafetyRating
16884
17614
  include Google::Apis::Core::Hashable
16885
17615
 
16886
- # The percentage of data needed to be labeled in each following batch (except
16887
- # the first batch).
16888
- # Corresponds to the JSON property `followingBatchSamplePercentage`
16889
- # @return [Fixnum]
16890
- attr_accessor :following_batch_sample_percentage
17616
+ # Output only. Indicates whether the content was filtered out because of this
17617
+ # rating.
17618
+ # Corresponds to the JSON property `blocked`
17619
+ # @return [Boolean]
17620
+ attr_accessor :blocked
17621
+ alias_method :blocked?, :blocked
16891
17622
 
16892
- # The percentage of data needed to be labeled in the first batch.
16893
- # Corresponds to the JSON property `initialBatchSamplePercentage`
16894
- # @return [Fixnum]
16895
- attr_accessor :initial_batch_sample_percentage
17623
+ # Output only. Harm category.
17624
+ # Corresponds to the JSON property `category`
17625
+ # @return [String]
17626
+ attr_accessor :category
16896
17627
 
16897
- # Field to choose sampling strategy. Sampling strategy will decide which data
16898
- # should be selected for human labeling in every batch.
16899
- # Corresponds to the JSON property `sampleStrategy`
17628
+ # Output only. Harm probability levels in the content.
17629
+ # Corresponds to the JSON property `probability`
16900
17630
  # @return [String]
16901
- attr_accessor :sample_strategy
17631
+ attr_accessor :probability
16902
17632
 
16903
17633
  def initialize(**args)
16904
17634
  update!(**args)
@@ -16906,15 +17636,74 @@ module Google
16906
17636
 
16907
17637
  # Update properties of this object
16908
17638
  def update!(**args)
16909
- @following_batch_sample_percentage = args[:following_batch_sample_percentage] if args.key?(:following_batch_sample_percentage)
16910
- @initial_batch_sample_percentage = args[:initial_batch_sample_percentage] if args.key?(:initial_batch_sample_percentage)
16911
- @sample_strategy = args[:sample_strategy] if args.key?(:sample_strategy)
17639
+ @blocked = args[:blocked] if args.key?(:blocked)
17640
+ @category = args[:category] if args.key?(:category)
17641
+ @probability = args[:probability] if args.key?(:probability)
16912
17642
  end
16913
17643
  end
16914
17644
 
16915
- # An attribution method that approximates Shapley values for features that
16916
- # contribute to the label being predicted. A sampling strategy is used to
16917
- # approximate the value rather than considering all subsets of features.
17645
+ # Safety settings.
17646
+ class GoogleCloudAiplatformV1SafetySetting
17647
+ include Google::Apis::Core::Hashable
17648
+
17649
+ # Required. Harm category.
17650
+ # Corresponds to the JSON property `category`
17651
+ # @return [String]
17652
+ attr_accessor :category
17653
+
17654
+ # Required. The harm block threshold.
17655
+ # Corresponds to the JSON property `threshold`
17656
+ # @return [String]
17657
+ attr_accessor :threshold
17658
+
17659
+ def initialize(**args)
17660
+ update!(**args)
17661
+ end
17662
+
17663
+ # Update properties of this object
17664
+ def update!(**args)
17665
+ @category = args[:category] if args.key?(:category)
17666
+ @threshold = args[:threshold] if args.key?(:threshold)
17667
+ end
17668
+ end
17669
+
17670
+ # Active learning data sampling config. For every active learning labeling
17671
+ # iteration, it will select a batch of data based on the sampling strategy.
17672
+ class GoogleCloudAiplatformV1SampleConfig
17673
+ include Google::Apis::Core::Hashable
17674
+
17675
+ # The percentage of data needed to be labeled in each following batch (except
17676
+ # the first batch).
17677
+ # Corresponds to the JSON property `followingBatchSamplePercentage`
17678
+ # @return [Fixnum]
17679
+ attr_accessor :following_batch_sample_percentage
17680
+
17681
+ # The percentage of data needed to be labeled in the first batch.
17682
+ # Corresponds to the JSON property `initialBatchSamplePercentage`
17683
+ # @return [Fixnum]
17684
+ attr_accessor :initial_batch_sample_percentage
17685
+
17686
+ # Field to choose sampling strategy. Sampling strategy will decide which data
17687
+ # should be selected for human labeling in every batch.
17688
+ # Corresponds to the JSON property `sampleStrategy`
17689
+ # @return [String]
17690
+ attr_accessor :sample_strategy
17691
+
17692
+ def initialize(**args)
17693
+ update!(**args)
17694
+ end
17695
+
17696
+ # Update properties of this object
17697
+ def update!(**args)
17698
+ @following_batch_sample_percentage = args[:following_batch_sample_percentage] if args.key?(:following_batch_sample_percentage)
17699
+ @initial_batch_sample_percentage = args[:initial_batch_sample_percentage] if args.key?(:initial_batch_sample_percentage)
17700
+ @sample_strategy = args[:sample_strategy] if args.key?(:sample_strategy)
17701
+ end
17702
+ end
17703
+
17704
+ # An attribution method that approximates Shapley values for features that
17705
+ # contribute to the label being predicted. A sampling strategy is used to
17706
+ # approximate the value rather than considering all subsets of features.
16918
17707
  class GoogleCloudAiplatformV1SampledShapleyAttribution
16919
17708
  include Google::Apis::Core::Hashable
16920
17709
 
@@ -17257,6 +18046,12 @@ module Google
17257
18046
  attr_accessor :disable_retries
17258
18047
  alias_method :disable_retries?, :disable_retries
17259
18048
 
18049
+ # Optional. This is the maximum time a user will wait in the QRM queue for
18050
+ # resources. Default is 1 day
18051
+ # Corresponds to the JSON property `maxWaitDuration`
18052
+ # @return [String]
18053
+ attr_accessor :max_wait_duration
18054
+
17260
18055
  # Restarts the entire CustomJob if a worker gets restarted. This feature can be
17261
18056
  # used by distributed training jobs that are not resilient to workers leaving
17262
18057
  # and joining a job.
@@ -17277,11 +18072,88 @@ module Google
17277
18072
  # Update properties of this object
17278
18073
  def update!(**args)
17279
18074
  @disable_retries = args[:disable_retries] if args.key?(:disable_retries)
18075
+ @max_wait_duration = args[:max_wait_duration] if args.key?(:max_wait_duration)
17280
18076
  @restart_job_on_worker_restart = args[:restart_job_on_worker_restart] if args.key?(:restart_job_on_worker_restart)
17281
18077
  @timeout = args[:timeout] if args.key?(:timeout)
17282
18078
  end
17283
18079
  end
17284
18080
 
18081
+ # Schema is used to define the format of input/output data. Represents a select
18082
+ # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
18083
+ # schema). More fields may be added in the future as needed.
18084
+ class GoogleCloudAiplatformV1Schema
18085
+ include Google::Apis::Core::Hashable
18086
+
18087
+ # Optional. The description of the data.
18088
+ # Corresponds to the JSON property `description`
18089
+ # @return [String]
18090
+ attr_accessor :description
18091
+
18092
+ # Optional. Possible values of the element of Type.STRING with enum format. For
18093
+ # example we can define an Enum Direction as : `type:STRING, format:enum, enum:["
18094
+ # EAST", NORTH", "SOUTH", "WEST"]`
18095
+ # Corresponds to the JSON property `enum`
18096
+ # @return [Array<String>]
18097
+ attr_accessor :enum
18098
+
18099
+ # Optional. Example of the object. Will only populated when the object is the
18100
+ # root.
18101
+ # Corresponds to the JSON property `example`
18102
+ # @return [Object]
18103
+ attr_accessor :example
18104
+
18105
+ # Optional. The format of the data. Supported formats: for NUMBER type: float,
18106
+ # double for INTEGER type: int32, int64
18107
+ # Corresponds to the JSON property `format`
18108
+ # @return [String]
18109
+ attr_accessor :format
18110
+
18111
+ # Schema is used to define the format of input/output data. Represents a select
18112
+ # subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#
18113
+ # schema). More fields may be added in the future as needed.
18114
+ # Corresponds to the JSON property `items`
18115
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema]
18116
+ attr_accessor :items
18117
+
18118
+ # Optional. Indicates if the value may be null.
18119
+ # Corresponds to the JSON property `nullable`
18120
+ # @return [Boolean]
18121
+ attr_accessor :nullable
18122
+ alias_method :nullable?, :nullable
18123
+
18124
+ # Optional. Properties of Type.OBJECT.
18125
+ # Corresponds to the JSON property `properties`
18126
+ # @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Schema>]
18127
+ attr_accessor :properties
18128
+
18129
+ # Optional. Required properties of Type.OBJECT.
18130
+ # Corresponds to the JSON property `required`
18131
+ # @return [Array<String>]
18132
+ attr_accessor :required
18133
+
18134
+ # Optional. The type of the data.
18135
+ # Corresponds to the JSON property `type`
18136
+ # @return [String]
18137
+ attr_accessor :type
18138
+
18139
+ def initialize(**args)
18140
+ update!(**args)
18141
+ end
18142
+
18143
+ # Update properties of this object
18144
+ def update!(**args)
18145
+ @description = args[:description] if args.key?(:description)
18146
+ @enum = args[:enum] if args.key?(:enum)
18147
+ @example = args[:example] if args.key?(:example)
18148
+ @format = args[:format] if args.key?(:format)
18149
+ @items = args[:items] if args.key?(:items)
18150
+ @nullable = args[:nullable] if args.key?(:nullable)
18151
+ @properties = args[:properties] if args.key?(:properties)
18152
+ @required = args[:required] if args.key?(:required)
18153
+ @type = args[:type] if args.key?(:type)
18154
+ end
18155
+ end
18156
+
17285
18157
  # An entry of mapping between color and AnnotationSpec. The mapping is used in
17286
18158
  # segmentation mask.
17287
18159
  class GoogleCloudAiplatformV1SchemaAnnotationSpecColor
@@ -18978,7 +19850,7 @@ module Google
18978
19850
  attr_accessor :enterprise_datastore
18979
19851
 
18980
19852
  # The grounding text passed inline with the Predict API. It can support up to 1
18981
- # million token context.
19853
+ # million bytes.
18982
19854
  # Corresponds to the JSON property `inlineContext`
18983
19855
  # @return [String]
18984
19856
  attr_accessor :inline_context
@@ -23541,6 +24413,32 @@ module Google
23541
24413
  end
23542
24414
  end
23543
24415
 
24416
+ # A set of Shielded Instance options. See [Images using supported Shielded VM
24417
+ # features](https://cloud.google.com/compute/docs/instances/modifying-shielded-
24418
+ # vm).
24419
+ class GoogleCloudAiplatformV1ShieldedVmConfig
24420
+ include Google::Apis::Core::Hashable
24421
+
24422
+ # Defines whether the instance has [Secure Boot](https://cloud.google.com/
24423
+ # compute/shielded-vm/docs/shielded-vm#secure-boot) enabled. Secure Boot helps
24424
+ # ensure that the system only runs authentic software by verifying the digital
24425
+ # signature of all boot components, and halting the boot process if signature
24426
+ # verification fails.
24427
+ # Corresponds to the JSON property `enableSecureBoot`
24428
+ # @return [Boolean]
24429
+ attr_accessor :enable_secure_boot
24430
+ alias_method :enable_secure_boot?, :enable_secure_boot
24431
+
24432
+ def initialize(**args)
24433
+ update!(**args)
24434
+ end
24435
+
24436
+ # Update properties of this object
24437
+ def update!(**args)
24438
+ @enable_secure_boot = args[:enable_secure_boot] if args.key?(:enable_secure_boot)
24439
+ end
24440
+ end
24441
+
23544
24442
  # Config for SmoothGrad approximation of gradients. When enabled, the gradients
23545
24443
  # are approximated by averaging the gradients from noisy samples in the vicinity
23546
24444
  # of the inputs. Adding noise can help improve the computed gradients. Refer to
@@ -25421,6 +26319,32 @@ module Google
25421
26319
  end
25422
26320
  end
25423
26321
 
26322
+ # Tool details that the model may use to generate response. A `Tool` is a piece
26323
+ # of code that enables the system to interact with external systems to perform
26324
+ # an action, or set of actions, outside of knowledge and scope of the model.
26325
+ class GoogleCloudAiplatformV1Tool
26326
+ include Google::Apis::Core::Hashable
26327
+
26328
+ # Optional. One or more function declarations to be passed to the model along
26329
+ # with the current user query. Model may decide to call a subset of these
26330
+ # functions by populating FunctionCall in the response. User should provide a
26331
+ # FunctionResponse for each function call in the next turn. Based on the
26332
+ # function responses, Model will generate the final response back to the user.
26333
+ # Maximum 64 function declarations can be provided.
26334
+ # Corresponds to the JSON property `functionDeclarations`
26335
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1FunctionDeclaration>]
26336
+ attr_accessor :function_declarations
26337
+
26338
+ def initialize(**args)
26339
+ update!(**args)
26340
+ end
26341
+
26342
+ # Update properties of this object
26343
+ def update!(**args)
26344
+ @function_declarations = args[:function_declarations] if args.key?(:function_declarations)
26345
+ end
26346
+ end
26347
+
25424
26348
  # CMLE training config. For every active learning labeling iteration, system
25425
26349
  # will train a machine learning model on CMLE. The trained model will be used by
25426
26350
  # data sampling algorithm to select DataItems.
@@ -26759,21 +27683,43 @@ module Google
26759
27683
  # project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:`emailid``: An
26760
27684
  # email address that represents a Google group. For example, `admins@example.com`
26761
27685
  # . * `domain:`domain``: The G Suite domain (primary) that represents all the
26762
- # users of that domain. For example, `google.com` or `example.com`. * `deleted:
26763
- # user:`emailid`?uid=`uniqueid``: An email address (plus unique identifier)
26764
- # representing a user that has been recently deleted. For example, `alice@
26765
- # example.com?uid=123456789012345678901`. If the user is recovered, this value
26766
- # reverts to `user:`emailid`` and the recovered user retains the role in the
26767
- # binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email address
26768
- # (plus unique identifier) representing a service account that has been recently
26769
- # deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
27686
+ # users of that domain. For example, `google.com` or `example.com`. * `principal:
27687
+ # //iam.googleapis.com/locations/global/workforcePools/`pool_id`/subject/`
27688
+ # subject_attribute_value``: A single identity in a workforce identity pool. * `
27689
+ # principalSet://iam.googleapis.com/locations/global/workforcePools/`pool_id`/
27690
+ # group/`group_id``: All workforce identities in a group. * `principalSet://iam.
27691
+ # googleapis.com/locations/global/workforcePools/`pool_id`/attribute.`
27692
+ # attribute_name`/`attribute_value``: All workforce identities with a specific
27693
+ # attribute value. * `principalSet://iam.googleapis.com/locations/global/
27694
+ # workforcePools/`pool_id`/*`: All identities in a workforce identity pool. * `
27695
+ # principal://iam.googleapis.com/projects/`project_number`/locations/global/
27696
+ # workloadIdentityPools/`pool_id`/subject/`subject_attribute_value``: A single
27697
+ # identity in a workload identity pool. * `principalSet://iam.googleapis.com/
27698
+ # projects/`project_number`/locations/global/workloadIdentityPools/`pool_id`/
27699
+ # group/`group_id``: A workload identity pool group. * `principalSet://iam.
27700
+ # googleapis.com/projects/`project_number`/locations/global/
27701
+ # workloadIdentityPools/`pool_id`/attribute.`attribute_name`/`attribute_value``:
27702
+ # All identities in a workload identity pool with a certain attribute. * `
27703
+ # principalSet://iam.googleapis.com/projects/`project_number`/locations/global/
27704
+ # workloadIdentityPools/`pool_id`/*`: All identities in a workload identity pool.
27705
+ # * `deleted:user:`emailid`?uid=`uniqueid``: An email address (plus unique
27706
+ # identifier) representing a user that has been recently deleted. For example, `
27707
+ # alice@example.com?uid=123456789012345678901`. If the user is recovered, this
27708
+ # value reverts to `user:`emailid`` and the recovered user retains the role in
27709
+ # the binding. * `deleted:serviceAccount:`emailid`?uid=`uniqueid``: An email
27710
+ # address (plus unique identifier) representing a service account that has been
27711
+ # recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=
26770
27712
  # 123456789012345678901`. If the service account is undeleted, this value
26771
27713
  # reverts to `serviceAccount:`emailid`` and the undeleted service account
26772
27714
  # retains the role in the binding. * `deleted:group:`emailid`?uid=`uniqueid``:
26773
27715
  # An email address (plus unique identifier) representing a Google group that has
26774
27716
  # been recently deleted. For example, `admins@example.com?uid=
26775
27717
  # 123456789012345678901`. If the group is recovered, this value reverts to `
26776
- # group:`emailid`` and the recovered group retains the role in the binding.
27718
+ # group:`emailid`` and the recovered group retains the role in the binding. * `
27719
+ # deleted:principal://iam.googleapis.com/locations/global/workforcePools/`
27720
+ # pool_id`/subject/`subject_attribute_value``: Deleted single identity in a
27721
+ # workforce identity pool. For example, `deleted:principal://iam.googleapis.com/
27722
+ # locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.
26777
27723
  # Corresponds to the JSON property `members`
26778
27724
  # @return [Array<String>]
26779
27725
  attr_accessor :members
@@ -27435,6 +28381,2272 @@ module Google
27435
28381
  @metric_entries = args[:metric_entries] if args.key?(:metric_entries)
27436
28382
  end
27437
28383
  end
28384
+
28385
+ # The proto defines the attribution information for a document using whatever
28386
+ # fields are most applicable for that document's datasource. For example, a
28387
+ # Wikipedia article's attribution is in the form of its article title, a website
28388
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28389
+ # id:28
28390
+ class LanguageLabsAidaTrustRecitationProtoDocAttribution
28391
+ include Google::Apis::Core::Hashable
28392
+
28393
+ #
28394
+ # Corresponds to the JSON property `amarnaId`
28395
+ # @return [String]
28396
+ attr_accessor :amarna_id
28397
+
28398
+ #
28399
+ # Corresponds to the JSON property `arxivId`
28400
+ # @return [String]
28401
+ attr_accessor :arxiv_id
28402
+
28403
+ #
28404
+ # Corresponds to the JSON property `author`
28405
+ # @return [String]
28406
+ attr_accessor :author
28407
+
28408
+ #
28409
+ # Corresponds to the JSON property `bibkey`
28410
+ # @return [String]
28411
+ attr_accessor :bibkey
28412
+
28413
+ #
28414
+ # Corresponds to the JSON property `bookTitle`
28415
+ # @return [String]
28416
+ attr_accessor :book_title
28417
+
28418
+ # The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
28419
+ # of a book. There is a deterministic function from a volume id to a URL under
28420
+ # the books.google.com domain. Marked as 'optional' since a volume ID of zero is
28421
+ # potentially possible and we want to distinguish that from the volume ID not
28422
+ # being set.
28423
+ # Corresponds to the JSON property `bookVolumeId`
28424
+ # @return [Fixnum]
28425
+ attr_accessor :book_volume_id
28426
+
28427
+ #
28428
+ # Corresponds to the JSON property `category`
28429
+ # @return [String]
28430
+ attr_accessor :category
28431
+
28432
+ #
28433
+ # Corresponds to the JSON property `conversationId`
28434
+ # @return [String]
28435
+ attr_accessor :conversation_id
28436
+
28437
+ # The dataset this document comes from.
28438
+ # Corresponds to the JSON property `dataset`
28439
+ # @return [String]
28440
+ attr_accessor :dataset
28441
+
28442
+ #
28443
+ # Corresponds to the JSON property `filepath`
28444
+ # @return [String]
28445
+ attr_accessor :filepath
28446
+
28447
+ #
28448
+ # Corresponds to the JSON property `geminiId`
28449
+ # @return [String]
28450
+ attr_accessor :gemini_id
28451
+
28452
+ #
28453
+ # Corresponds to the JSON property `gnewsArticleTitle`
28454
+ # @return [String]
28455
+ attr_accessor :gnews_article_title
28456
+
28457
+ #
28458
+ # Corresponds to the JSON property `goodallExampleId`
28459
+ # @return [String]
28460
+ attr_accessor :goodall_example_id
28461
+
28462
+ # Whether the document is opted out.
28463
+ # Corresponds to the JSON property `isOptOut`
28464
+ # @return [Boolean]
28465
+ attr_accessor :is_opt_out
28466
+ alias_method :is_opt_out?, :is_opt_out
28467
+
28468
+ #
28469
+ # Corresponds to the JSON property `isPrompt`
28470
+ # @return [Boolean]
28471
+ attr_accessor :is_prompt
28472
+ alias_method :is_prompt?, :is_prompt
28473
+
28474
+ #
28475
+ # Corresponds to the JSON property `lamdaExampleId`
28476
+ # @return [String]
28477
+ attr_accessor :lamda_example_id
28478
+
28479
+ #
28480
+ # Corresponds to the JSON property `license`
28481
+ # @return [String]
28482
+ attr_accessor :license
28483
+
28484
+ #
28485
+ # Corresponds to the JSON property `meenaConversationId`
28486
+ # @return [String]
28487
+ attr_accessor :meena_conversation_id
28488
+
28489
+ # Natural (not programming) language of the document. Language code as defined
28490
+ # by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
28491
+ # html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
28492
+ # & read language fields. See go/iii.
28493
+ # Corresponds to the JSON property `naturalLanguageCode`
28494
+ # @return [String]
28495
+ attr_accessor :natural_language_code
28496
+
28497
+ # True if this doc has no attribution information available. We use an explicit
28498
+ # field for this instead of just implicitly leaving all the DocAttribution
28499
+ # fields blank to distinguish a case where a bug/oversight has left the
28500
+ # attribution information empty vs when we really have no attribution
28501
+ # information available.
28502
+ # Corresponds to the JSON property `noAttribution`
28503
+ # @return [Boolean]
28504
+ attr_accessor :no_attribution
28505
+ alias_method :no_attribution?, :no_attribution
28506
+
28507
+ #
28508
+ # Corresponds to the JSON property `podcastUtteranceId`
28509
+ # @return [String]
28510
+ attr_accessor :podcast_utterance_id
28511
+
28512
+ # Represents a whole or partial calendar date, such as a birthday. The time of
28513
+ # day and time zone are either specified elsewhere or are insignificant. The
28514
+ # date is relative to the Gregorian Calendar. This can represent one of the
28515
+ # following: * A full date, with non-zero year, month, and day values. * A month
28516
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
28517
+ # with a zero month and a zero day. * A year and month, with a zero day (for
28518
+ # example, a credit card expiration date). Related types: * google.type.
28519
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
28520
+ # Corresponds to the JSON property `publicationDate`
28521
+ # @return [Google::Apis::AiplatformV1::GoogleTypeDate]
28522
+ attr_accessor :publication_date
28523
+
28524
+ # This field is for opt-out experiment only, MUST never be used during actual
28525
+ # production/serving.
28526
+ # Corresponds to the JSON property `qualityScoreExperimentOnly`
28527
+ # @return [Float]
28528
+ attr_accessor :quality_score_experiment_only
28529
+
28530
+ # Github repository
28531
+ # Corresponds to the JSON property `repo`
28532
+ # @return [String]
28533
+ attr_accessor :repo
28534
+
28535
+ # URL of a webdoc
28536
+ # Corresponds to the JSON property `url`
28537
+ # @return [String]
28538
+ attr_accessor :url
28539
+
28540
+ #
28541
+ # Corresponds to the JSON property `volumeId`
28542
+ # @return [String]
28543
+ attr_accessor :volume_id
28544
+
28545
+ # Wikipedia article title. The Wikipedia TFDS dataset includes article titles
28546
+ # but not URLs. While a URL is to the best of our knowledge a deterministic
28547
+ # function of the title, we store the original title to reflect the information
28548
+ # in the original dataset.
28549
+ # Corresponds to the JSON property `wikipediaArticleTitle`
28550
+ # @return [String]
28551
+ attr_accessor :wikipedia_article_title
28552
+
28553
+ def initialize(**args)
28554
+ update!(**args)
28555
+ end
28556
+
28557
+ # Update properties of this object
28558
+ def update!(**args)
28559
+ @amarna_id = args[:amarna_id] if args.key?(:amarna_id)
28560
+ @arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
28561
+ @author = args[:author] if args.key?(:author)
28562
+ @bibkey = args[:bibkey] if args.key?(:bibkey)
28563
+ @book_title = args[:book_title] if args.key?(:book_title)
28564
+ @book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
28565
+ @category = args[:category] if args.key?(:category)
28566
+ @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
28567
+ @dataset = args[:dataset] if args.key?(:dataset)
28568
+ @filepath = args[:filepath] if args.key?(:filepath)
28569
+ @gemini_id = args[:gemini_id] if args.key?(:gemini_id)
28570
+ @gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
28571
+ @goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
28572
+ @is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
28573
+ @is_prompt = args[:is_prompt] if args.key?(:is_prompt)
28574
+ @lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
28575
+ @license = args[:license] if args.key?(:license)
28576
+ @meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
28577
+ @natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
28578
+ @no_attribution = args[:no_attribution] if args.key?(:no_attribution)
28579
+ @podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
28580
+ @publication_date = args[:publication_date] if args.key?(:publication_date)
28581
+ @quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
28582
+ @repo = args[:repo] if args.key?(:repo)
28583
+ @url = args[:url] if args.key?(:url)
28584
+ @volume_id = args[:volume_id] if args.key?(:volume_id)
28585
+ @wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
28586
+ end
28587
+ end
28588
+
28589
+ # The recitation result for one input
28590
+ class LanguageLabsAidaTrustRecitationProtoRecitationResult
28591
+ include Google::Apis::Core::Hashable
28592
+
28593
+ #
28594
+ # Corresponds to the JSON property `dynamicSegmentResults`
28595
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28596
+ attr_accessor :dynamic_segment_results
28597
+
28598
+ # The recitation action for one given input. When its segments contain different
28599
+ # actions, the overall action will be returned in the precedence of BLOCK > CITE
28600
+ # > NO_ACTION.
28601
+ # Corresponds to the JSON property `recitationAction`
28602
+ # @return [String]
28603
+ attr_accessor :recitation_action
28604
+
28605
+ #
28606
+ # Corresponds to the JSON property `trainingSegmentResults`
28607
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28608
+ attr_accessor :training_segment_results
28609
+
28610
+ def initialize(**args)
28611
+ update!(**args)
28612
+ end
28613
+
28614
+ # Update properties of this object
28615
+ def update!(**args)
28616
+ @dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
28617
+ @recitation_action = args[:recitation_action] if args.key?(:recitation_action)
28618
+ @training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
28619
+ end
28620
+ end
28621
+
28622
+ # The recitation result for each segment in a given input.
28623
+ class LanguageLabsAidaTrustRecitationProtoSegmentResult
28624
+ include Google::Apis::Core::Hashable
28625
+
28626
+ # The dataset the segment came from.
28627
+ # Corresponds to the JSON property `attributionDataset`
28628
+ # @return [String]
28629
+ attr_accessor :attribution_dataset
28630
+
28631
+ # human-friendly string that contains information from doc_attribution which
28632
+ # could be shown by clients
28633
+ # Corresponds to the JSON property `displayAttributionMessage`
28634
+ # @return [String]
28635
+ attr_accessor :display_attribution_message
28636
+
28637
+ # The proto defines the attribution information for a document using whatever
28638
+ # fields are most applicable for that document's datasource. For example, a
28639
+ # Wikipedia article's attribution is in the form of its article title, a website
28640
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28641
+ # id:28
28642
+ # Corresponds to the JSON property `docAttribution`
28643
+ # @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoDocAttribution]
28644
+ attr_accessor :doc_attribution
28645
+
28646
+ # number of documents that contained this segment
28647
+ # Corresponds to the JSON property `docOccurrences`
28648
+ # @return [Fixnum]
28649
+ attr_accessor :doc_occurrences
28650
+
28651
+ #
28652
+ # Corresponds to the JSON property `endIndex`
28653
+ # @return [Fixnum]
28654
+ attr_accessor :end_index
28655
+
28656
+ # The raw text in the given input that is corresponding to the segment. It will
28657
+ # be available only when 'return_segment_raw_text' is enabled in the request
28658
+ # options.
28659
+ # Corresponds to the JSON property `rawText`
28660
+ # @return [String]
28661
+ attr_accessor :raw_text
28662
+
28663
+ #
28664
+ # Corresponds to the JSON property `segmentRecitationAction`
28665
+ # @return [String]
28666
+ attr_accessor :segment_recitation_action
28667
+
28668
+ # The segment boundary start (inclusive) and end index (exclusive) in the given
28669
+ # text. In the streaming RPC, the indexes always start from the beginning of the
28670
+ # first text in the entire stream. The indexes are measured in UTF-16 code units.
28671
+ # Corresponds to the JSON property `startIndex`
28672
+ # @return [Fixnum]
28673
+ attr_accessor :start_index
28674
+
28675
+ def initialize(**args)
28676
+ update!(**args)
28677
+ end
28678
+
28679
+ # Update properties of this object
28680
+ def update!(**args)
28681
+ @attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
28682
+ @display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
28683
+ @doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
28684
+ @doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
28685
+ @end_index = args[:end_index] if args.key?(:end_index)
28686
+ @raw_text = args[:raw_text] if args.key?(:raw_text)
28687
+ @segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
28688
+ @start_index = args[:start_index] if args.key?(:start_index)
28689
+ end
28690
+ end
28691
+
28692
+ # The recitation result for one stream input
28693
+ class LanguageLabsAidaTrustRecitationProtoStreamRecitationResult
28694
+ include Google::Apis::Core::Hashable
28695
+
28696
+ # The recitation result against the given dynamic data source.
28697
+ # Corresponds to the JSON property `dynamicSegmentResults`
28698
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28699
+ attr_accessor :dynamic_segment_results
28700
+
28701
+ # Last index of input text fully checked for recitation in the entire streaming
28702
+ # context. Would return `-1` if no Input was checked for recitation.
28703
+ # Corresponds to the JSON property `fullyCheckedTextIndex`
28704
+ # @return [Fixnum]
28705
+ attr_accessor :fully_checked_text_index
28706
+
28707
+ # The recitation action for one given input. When its segments contain different
28708
+ # actions, the overall action will be returned in the precedence of BLOCK > CITE
28709
+ # > NO_ACTION.
28710
+ # Corresponds to the JSON property `recitationAction`
28711
+ # @return [String]
28712
+ attr_accessor :recitation_action
28713
+
28714
+ # The recitation result against model training data.
28715
+ # Corresponds to the JSON property `trainingSegmentResults`
28716
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28717
+ attr_accessor :training_segment_results
28718
+
28719
+ def initialize(**args)
28720
+ update!(**args)
28721
+ end
28722
+
28723
+ # Update properties of this object
28724
+ def update!(**args)
28725
+ @dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
28726
+ @fully_checked_text_index = args[:fully_checked_text_index] if args.key?(:fully_checked_text_index)
28727
+ @recitation_action = args[:recitation_action] if args.key?(:recitation_action)
28728
+ @training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
28729
+ end
28730
+ end
28731
+
28732
+ # The proto defines the attribution information for a document using whatever
28733
+ # fields are most applicable for that document's datasource. For example, a
28734
+ # Wikipedia article's attribution is in the form of its article title, a website
28735
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28736
+ # id: 28
28737
+ class LearningGenaiRecitationDocAttribution
28738
+ include Google::Apis::Core::Hashable
28739
+
28740
+ #
28741
+ # Corresponds to the JSON property `amarnaId`
28742
+ # @return [String]
28743
+ attr_accessor :amarna_id
28744
+
28745
+ #
28746
+ # Corresponds to the JSON property `arxivId`
28747
+ # @return [String]
28748
+ attr_accessor :arxiv_id
28749
+
28750
+ #
28751
+ # Corresponds to the JSON property `author`
28752
+ # @return [String]
28753
+ attr_accessor :author
28754
+
28755
+ #
28756
+ # Corresponds to the JSON property `bibkey`
28757
+ # @return [String]
28758
+ attr_accessor :bibkey
28759
+
28760
+ #
28761
+ # Corresponds to the JSON property `bookTitle`
28762
+ # @return [String]
28763
+ attr_accessor :book_title
28764
+
28765
+ # The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
28766
+ # of a book. There is a deterministic function from a volume id to a URL under
28767
+ # the books.google.com domain. Marked as 'optional' since a volume ID of zero is
28768
+ # potentially possible and we want to distinguish that from the volume ID not
28769
+ # being set.
28770
+ # Corresponds to the JSON property `bookVolumeId`
28771
+ # @return [Fixnum]
28772
+ attr_accessor :book_volume_id
28773
+
28774
+ #
28775
+ # Corresponds to the JSON property `conversationId`
28776
+ # @return [String]
28777
+ attr_accessor :conversation_id
28778
+
28779
+ # The dataset this document comes from.
28780
+ # Corresponds to the JSON property `dataset`
28781
+ # @return [String]
28782
+ attr_accessor :dataset
28783
+
28784
+ #
28785
+ # Corresponds to the JSON property `filepath`
28786
+ # @return [String]
28787
+ attr_accessor :filepath
28788
+
28789
+ #
28790
+ # Corresponds to the JSON property `geminiId`
28791
+ # @return [String]
28792
+ attr_accessor :gemini_id
28793
+
28794
+ #
28795
+ # Corresponds to the JSON property `gnewsArticleTitle`
28796
+ # @return [String]
28797
+ attr_accessor :gnews_article_title
28798
+
28799
+ #
28800
+ # Corresponds to the JSON property `goodallExampleId`
28801
+ # @return [String]
28802
+ attr_accessor :goodall_example_id
28803
+
28804
+ # Whether the document is opted out.
28805
+ # Corresponds to the JSON property `isOptOut`
28806
+ # @return [Boolean]
28807
+ attr_accessor :is_opt_out
28808
+ alias_method :is_opt_out?, :is_opt_out
28809
+
28810
+ # When true, this attribution came from the user's prompt.
28811
+ # Corresponds to the JSON property `isPrompt`
28812
+ # @return [Boolean]
28813
+ attr_accessor :is_prompt
28814
+ alias_method :is_prompt?, :is_prompt
28815
+
28816
+ #
28817
+ # Corresponds to the JSON property `lamdaExampleId`
28818
+ # @return [String]
28819
+ attr_accessor :lamda_example_id
28820
+
28821
+ #
28822
+ # Corresponds to the JSON property `license`
28823
+ # @return [String]
28824
+ attr_accessor :license
28825
+
28826
+ #
28827
+ # Corresponds to the JSON property `meenaConversationId`
28828
+ # @return [String]
28829
+ attr_accessor :meena_conversation_id
28830
+
28831
+ # Natural (not programming) language of the document. Language code as defined
28832
+ # by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
28833
+ # html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
28834
+ # & read language fields. See go/iii.
28835
+ # Corresponds to the JSON property `naturalLanguageCode`
28836
+ # @return [String]
28837
+ attr_accessor :natural_language_code
28838
+
28839
+ # True if this doc has no attribution information available. We use an explicit
28840
+ # field for this instead of just implicitly leaving all the DocAttribution
28841
+ # fields blank to distinguish a case where a bug/oversight has left the
28842
+ # attribution information empty vs when we really have no attribution
28843
+ # information available.
28844
+ # Corresponds to the JSON property `noAttribution`
28845
+ # @return [Boolean]
28846
+ attr_accessor :no_attribution
28847
+ alias_method :no_attribution?, :no_attribution
28848
+
28849
+ #
28850
+ # Corresponds to the JSON property `podcastUtteranceId`
28851
+ # @return [String]
28852
+ attr_accessor :podcast_utterance_id
28853
+
28854
+ # Represents a whole or partial calendar date, such as a birthday. The time of
28855
+ # day and time zone are either specified elsewhere or are insignificant. The
28856
+ # date is relative to the Gregorian Calendar. This can represent one of the
28857
+ # following: * A full date, with non-zero year, month, and day values. * A month
28858
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
28859
+ # with a zero month and a zero day. * A year and month, with a zero day (for
28860
+ # example, a credit card expiration date). Related types: * google.type.
28861
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
28862
+ # Corresponds to the JSON property `publicationDate`
28863
+ # @return [Google::Apis::AiplatformV1::GoogleTypeDate]
28864
+ attr_accessor :publication_date
28865
+
28866
+ # This field is for opt-out experiment only, MUST never be used during actual
28867
+ # production/serving.
28868
+ # Corresponds to the JSON property `qualityScoreExperimentOnly`
28869
+ # @return [Float]
28870
+ attr_accessor :quality_score_experiment_only
28871
+
28872
+ # Github repository
28873
+ # Corresponds to the JSON property `repo`
28874
+ # @return [String]
28875
+ attr_accessor :repo
28876
+
28877
+ # URL of a webdoc
28878
+ # Corresponds to the JSON property `url`
28879
+ # @return [String]
28880
+ attr_accessor :url
28881
+
28882
+ #
28883
+ # Corresponds to the JSON property `volumeId`
28884
+ # @return [String]
28885
+ attr_accessor :volume_id
28886
+
28887
+ # Wikipedia article title. The Wikipedia TFDS dataset includes article titles
28888
+ # but not URLs. While a URL is to the best of our knowledge a deterministic
28889
+ # function of the title, we store the original title to reflect the information
28890
+ # in the original dataset.
28891
+ # Corresponds to the JSON property `wikipediaArticleTitle`
28892
+ # @return [String]
28893
+ attr_accessor :wikipedia_article_title
28894
+
28895
+ def initialize(**args)
28896
+ update!(**args)
28897
+ end
28898
+
28899
+ # Update properties of this object
28900
+ def update!(**args)
28901
+ @amarna_id = args[:amarna_id] if args.key?(:amarna_id)
28902
+ @arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
28903
+ @author = args[:author] if args.key?(:author)
28904
+ @bibkey = args[:bibkey] if args.key?(:bibkey)
28905
+ @book_title = args[:book_title] if args.key?(:book_title)
28906
+ @book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
28907
+ @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
28908
+ @dataset = args[:dataset] if args.key?(:dataset)
28909
+ @filepath = args[:filepath] if args.key?(:filepath)
28910
+ @gemini_id = args[:gemini_id] if args.key?(:gemini_id)
28911
+ @gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
28912
+ @goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
28913
+ @is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
28914
+ @is_prompt = args[:is_prompt] if args.key?(:is_prompt)
28915
+ @lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
28916
+ @license = args[:license] if args.key?(:license)
28917
+ @meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
28918
+ @natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
28919
+ @no_attribution = args[:no_attribution] if args.key?(:no_attribution)
28920
+ @podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
28921
+ @publication_date = args[:publication_date] if args.key?(:publication_date)
28922
+ @quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
28923
+ @repo = args[:repo] if args.key?(:repo)
28924
+ @url = args[:url] if args.key?(:url)
28925
+ @volume_id = args[:volume_id] if args.key?(:volume_id)
28926
+ @wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
28927
+ end
28928
+ end
28929
+
28930
+ # The recitation result for one input
28931
+ class LearningGenaiRecitationRecitationResult
28932
+ include Google::Apis::Core::Hashable
28933
+
28934
+ #
28935
+ # Corresponds to the JSON property `dynamicSegmentResults`
28936
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRecitationSegmentResult>]
28937
+ attr_accessor :dynamic_segment_results
28938
+
28939
+ # The recitation action for one given input. When its segments contain different
28940
+ # actions, the overall action will be returned in the precedence of BLOCK > CITE
28941
+ # > NO_ACTION.
28942
+ # Corresponds to the JSON property `recitationAction`
28943
+ # @return [String]
28944
+ attr_accessor :recitation_action
28945
+
28946
+ #
28947
+ # Corresponds to the JSON property `trainingSegmentResults`
28948
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRecitationSegmentResult>]
28949
+ attr_accessor :training_segment_results
28950
+
28951
+ def initialize(**args)
28952
+ update!(**args)
28953
+ end
28954
+
28955
+ # Update properties of this object
28956
+ def update!(**args)
28957
+ @dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
28958
+ @recitation_action = args[:recitation_action] if args.key?(:recitation_action)
28959
+ @training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
28960
+ end
28961
+ end
28962
+
28963
+ # The recitation result for each segment in a given input.
28964
+ class LearningGenaiRecitationSegmentResult
28965
+ include Google::Apis::Core::Hashable
28966
+
28967
+ # The dataset the segment came from.
28968
+ # Corresponds to the JSON property `attributionDataset`
28969
+ # @return [String]
28970
+ attr_accessor :attribution_dataset
28971
+
28972
+ # human-friendly string that contains information from doc_attribution which
28973
+ # could be shown by clients
28974
+ # Corresponds to the JSON property `displayAttributionMessage`
28975
+ # @return [String]
28976
+ attr_accessor :display_attribution_message
28977
+
28978
+ # The proto defines the attribution information for a document using whatever
28979
+ # fields are most applicable for that document's datasource. For example, a
28980
+ # Wikipedia article's attribution is in the form of its article title, a website
28981
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28982
+ # id: 28
28983
+ # Corresponds to the JSON property `docAttribution`
28984
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRecitationDocAttribution]
28985
+ attr_accessor :doc_attribution
28986
+
28987
+ # number of documents that contained this segment
28988
+ # Corresponds to the JSON property `docOccurrences`
28989
+ # @return [Fixnum]
28990
+ attr_accessor :doc_occurrences
28991
+
28992
+ #
28993
+ # Corresponds to the JSON property `endIndex`
28994
+ # @return [Fixnum]
28995
+ attr_accessor :end_index
28996
+
28997
+ # The raw text in the given input that is corresponding to the segment. It will
28998
+ # be available only when 'return_segment_raw_text' is enabled in the request
28999
+ # options.
29000
+ # Corresponds to the JSON property `rawText`
29001
+ # @return [String]
29002
+ attr_accessor :raw_text
29003
+
29004
+ #
29005
+ # Corresponds to the JSON property `segmentRecitationAction`
29006
+ # @return [String]
29007
+ attr_accessor :segment_recitation_action
29008
+
29009
+ # The segment boundary start (inclusive) and end index (exclusive) in the given
29010
+ # text. In the streaming RPC, the indexes always start from the beginning of the
29011
+ # first text in the entire stream. The indexes are measured in UTF-16 code units.
29012
+ # Corresponds to the JSON property `startIndex`
29013
+ # @return [Fixnum]
29014
+ attr_accessor :start_index
29015
+
29016
+ def initialize(**args)
29017
+ update!(**args)
29018
+ end
29019
+
29020
+ # Update properties of this object
29021
+ def update!(**args)
29022
+ @attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
29023
+ @display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
29024
+ @doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
29025
+ @doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
29026
+ @end_index = args[:end_index] if args.key?(:end_index)
29027
+ @raw_text = args[:raw_text] if args.key?(:raw_text)
29028
+ @segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
29029
+ @start_index = args[:start_index] if args.key?(:start_index)
29030
+ end
29031
+ end
29032
+
29033
+ # The type used for final weights calculation.
29034
+ class LearningGenaiRootCalculationType
29035
+ include Google::Apis::Core::Hashable
29036
+
29037
+ #
29038
+ # Corresponds to the JSON property `scoreType`
29039
+ # @return [String]
29040
+ attr_accessor :score_type
29041
+
29042
+ #
29043
+ # Corresponds to the JSON property `weights`
29044
+ # @return [Float]
29045
+ attr_accessor :weights
29046
+
29047
+ def initialize(**args)
29048
+ update!(**args)
29049
+ end
29050
+
29051
+ # Update properties of this object
29052
+ def update!(**args)
29053
+ @score_type = args[:score_type] if args.key?(:score_type)
29054
+ @weights = args[:weights] if args.key?(:weights)
29055
+ end
29056
+ end
29057
+
29058
+ #
29059
+ class LearningGenaiRootClassifierOutput
29060
+ include Google::Apis::Core::Hashable
29061
+
29062
+ # If set, this is the output of the first matching rule.
29063
+ # Corresponds to the JSON property `ruleOutput`
29064
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput]
29065
+ attr_accessor :rule_output
29066
+
29067
+ # outputs of all matching rule.
29068
+ # Corresponds to the JSON property `ruleOutputs`
29069
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput>]
29070
+ attr_accessor :rule_outputs
29071
+
29072
+ # DataProviderOutput and MetricOutput can be saved between calls to the
29073
+ # Classifier framework. For instance, you can run the query classifier, get
29074
+ # outputs from those metrics, then use them in a result classifier as well.
29075
+ # Example rule based on this idea: and_rules ` rule ` metric_name: '
29076
+ # query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
29077
+ # Corresponds to the JSON property `state`
29078
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierState]
29079
+ attr_accessor :state
29080
+
29081
+ def initialize(**args)
29082
+ update!(**args)
29083
+ end
29084
+
29085
+ # Update properties of this object
29086
+ def update!(**args)
29087
+ @rule_output = args[:rule_output] if args.key?(:rule_output)
29088
+ @rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
29089
+ @state = args[:state] if args.key?(:state)
29090
+ end
29091
+ end
29092
+
29093
+ #
29094
+ class LearningGenaiRootClassifierOutputSummary
29095
+ include Google::Apis::Core::Hashable
29096
+
29097
+ #
29098
+ # Corresponds to the JSON property `metrics`
29099
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootMetricOutput>]
29100
+ attr_accessor :metrics
29101
+
29102
+ # Output of the first matching rule.
29103
+ # Corresponds to the JSON property `ruleOutput`
29104
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput]
29105
+ attr_accessor :rule_output
29106
+
29107
+ # outputs of all matching rule.
29108
+ # Corresponds to the JSON property `ruleOutputs`
29109
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput>]
29110
+ attr_accessor :rule_outputs
29111
+
29112
+ def initialize(**args)
29113
+ update!(**args)
29114
+ end
29115
+
29116
+ # Update properties of this object
29117
+ def update!(**args)
29118
+ @metrics = args[:metrics] if args.key?(:metrics)
29119
+ @rule_output = args[:rule_output] if args.key?(:rule_output)
29120
+ @rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
29121
+ end
29122
+ end
29123
+
29124
+ # DataProviderOutput and MetricOutput can be saved between calls to the
29125
+ # Classifier framework. For instance, you can run the query classifier, get
29126
+ # outputs from those metrics, then use them in a result classifier as well.
29127
+ # Example rule based on this idea: and_rules ` rule ` metric_name: '
29128
+ # query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
29129
+ class LearningGenaiRootClassifierState
29130
+ include Google::Apis::Core::Hashable
29131
+
29132
+ #
29133
+ # Corresponds to the JSON property `dataProviderOutput`
29134
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootDataProviderOutput>]
29135
+ attr_accessor :data_provider_output
29136
+
29137
+ #
29138
+ # Corresponds to the JSON property `metricOutput`
29139
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootMetricOutput>]
29140
+ attr_accessor :metric_output
29141
+
29142
+ def initialize(**args)
29143
+ update!(**args)
29144
+ end
29145
+
29146
+ # Update properties of this object
29147
+ def update!(**args)
29148
+ @data_provider_output = args[:data_provider_output] if args.key?(:data_provider_output)
29149
+ @metric_output = args[:metric_output] if args.key?(:metric_output)
29150
+ end
29151
+ end
29152
+
29153
+ #
29154
+ class LearningGenaiRootDataProviderOutput
29155
+ include Google::Apis::Core::Hashable
29156
+
29157
+ #
29158
+ # Corresponds to the JSON property `name`
29159
+ # @return [String]
29160
+ attr_accessor :name
29161
+
29162
+ # Wire-format for a Status object
29163
+ # Corresponds to the JSON property `status`
29164
+ # @return [Google::Apis::AiplatformV1::UtilStatusProto]
29165
+ attr_accessor :status
29166
+
29167
+ def initialize(**args)
29168
+ update!(**args)
29169
+ end
29170
+
29171
+ # Update properties of this object
29172
+ def update!(**args)
29173
+ @name = args[:name] if args.key?(:name)
29174
+ @status = args[:status] if args.key?(:status)
29175
+ end
29176
+ end
29177
+
29178
+ #
29179
+ class LearningGenaiRootFilterMetadata
29180
+ include Google::Apis::Core::Hashable
29181
+
29182
+ # Filter confidence.
29183
+ # Corresponds to the JSON property `confidence`
29184
+ # @return [String]
29185
+ attr_accessor :confidence
29186
+
29187
+ # Debug info for the message.
29188
+ # Corresponds to the JSON property `debugInfo`
29189
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadataFilterDebugInfo]
29190
+ attr_accessor :debug_info
29191
+
29192
+ # A fallback message chosen by the applied filter.
29193
+ # Corresponds to the JSON property `fallback`
29194
+ # @return [String]
29195
+ attr_accessor :fallback
29196
+
29197
+ # Additional info for the filter.
29198
+ # Corresponds to the JSON property `info`
29199
+ # @return [String]
29200
+ attr_accessor :info
29201
+
29202
+ # Name of the filter that triggered.
29203
+ # Corresponds to the JSON property `name`
29204
+ # @return [String]
29205
+ attr_accessor :name
29206
+
29207
+ # Filter reason.
29208
+ # Corresponds to the JSON property `reason`
29209
+ # @return [String]
29210
+ attr_accessor :reason
29211
+
29212
+ # The input query or generated response that is getting filtered.
29213
+ # Corresponds to the JSON property `text`
29214
+ # @return [String]
29215
+ attr_accessor :text
29216
+
29217
+ def initialize(**args)
29218
+ update!(**args)
29219
+ end
29220
+
29221
+ # Update properties of this object
29222
+ def update!(**args)
29223
+ @confidence = args[:confidence] if args.key?(:confidence)
29224
+ @debug_info = args[:debug_info] if args.key?(:debug_info)
29225
+ @fallback = args[:fallback] if args.key?(:fallback)
29226
+ @info = args[:info] if args.key?(:info)
29227
+ @name = args[:name] if args.key?(:name)
29228
+ @reason = args[:reason] if args.key?(:reason)
29229
+ @text = args[:text] if args.key?(:text)
29230
+ end
29231
+ end
29232
+
29233
+ #
29234
+ class LearningGenaiRootFilterMetadataFilterDebugInfo
29235
+ include Google::Apis::Core::Hashable
29236
+
29237
+ #
29238
+ # Corresponds to the JSON property `classifierOutput`
29239
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierOutput]
29240
+ attr_accessor :classifier_output
29241
+
29242
+ #
29243
+ # Corresponds to the JSON property `defaultMetadata`
29244
+ # @return [String]
29245
+ attr_accessor :default_metadata
29246
+
29247
+ #
29248
+ # Corresponds to the JSON property `languageFilterResult`
29249
+ # @return [Google::Apis::AiplatformV1::LearningServingLlmLanguageFilterResult]
29250
+ attr_accessor :language_filter_result
29251
+
29252
+ # This is per harm.
29253
+ # Corresponds to the JSON property `raiOutput`
29254
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput]
29255
+ attr_accessor :rai_output
29256
+
29257
+ # The RAI results for a given text.
29258
+ # Corresponds to the JSON property `raiResult`
29259
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult]
29260
+ attr_accessor :rai_result
29261
+
29262
+ # An RAI signal for a single category.
29263
+ # Corresponds to the JSON property `raiSignal`
29264
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal]
29265
+ attr_accessor :rai_signal
29266
+
29267
+ # The recitation result for one stream input
29268
+ # Corresponds to the JSON property `streamRecitationResult`
29269
+ # @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoStreamRecitationResult]
29270
+ attr_accessor :stream_recitation_result
29271
+
29272
+ #
29273
+ # Corresponds to the JSON property `takedownResult`
29274
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootTakedownResult]
29275
+ attr_accessor :takedown_result
29276
+
29277
+ # A model can generate multiple signals and this captures all the generated
29278
+ # signals for a single message.
29279
+ # Corresponds to the JSON property `toxicityResult`
29280
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootToxicityResult]
29281
+ attr_accessor :toxicity_result
29282
+
29283
+ def initialize(**args)
29284
+ update!(**args)
29285
+ end
29286
+
29287
+ # Update properties of this object
29288
+ def update!(**args)
29289
+ @classifier_output = args[:classifier_output] if args.key?(:classifier_output)
29290
+ @default_metadata = args[:default_metadata] if args.key?(:default_metadata)
29291
+ @language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
29292
+ @rai_output = args[:rai_output] if args.key?(:rai_output)
29293
+ @rai_result = args[:rai_result] if args.key?(:rai_result)
29294
+ @rai_signal = args[:rai_signal] if args.key?(:rai_signal)
29295
+ @stream_recitation_result = args[:stream_recitation_result] if args.key?(:stream_recitation_result)
29296
+ @takedown_result = args[:takedown_result] if args.key?(:takedown_result)
29297
+ @toxicity_result = args[:toxicity_result] if args.key?(:toxicity_result)
29298
+ end
29299
+ end
29300
+
29301
+ #
29302
+ class LearningGenaiRootHarm
29303
+ include Google::Apis::Core::Hashable
29304
+
29305
+ # Please do not use, this is still under development.
29306
+ # Corresponds to the JSON property `contextualDangerous`
29307
+ # @return [Boolean]
29308
+ attr_accessor :contextual_dangerous
29309
+ alias_method :contextual_dangerous?, :contextual_dangerous
29310
+
29311
+ #
29312
+ # Corresponds to the JSON property `csam`
29313
+ # @return [Boolean]
29314
+ attr_accessor :csam
29315
+ alias_method :csam?, :csam
29316
+
29317
+ #
29318
+ # Corresponds to the JSON property `fringe`
29319
+ # @return [Boolean]
29320
+ attr_accessor :fringe
29321
+ alias_method :fringe?, :fringe
29322
+
29323
+ # Harm type for images
29324
+ # Corresponds to the JSON property `grailImageHarmType`
29325
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmGrailImageHarmType]
29326
+ attr_accessor :grail_image_harm_type
29327
+
29328
+ # Harm type for text
29329
+ # Corresponds to the JSON property `grailTextHarmType`
29330
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmGrailTextHarmType]
29331
+ attr_accessor :grail_text_harm_type
29332
+
29333
+ #
29334
+ # Corresponds to the JSON property `imageCsam`
29335
+ # @return [Boolean]
29336
+ attr_accessor :image_csam
29337
+ alias_method :image_csam?, :image_csam
29338
+
29339
+ #
29340
+ # Corresponds to the JSON property `imagePedo`
29341
+ # @return [Boolean]
29342
+ attr_accessor :image_pedo
29343
+ alias_method :image_pedo?, :image_pedo
29344
+
29345
+ # Image signals
29346
+ # Corresponds to the JSON property `imagePorn`
29347
+ # @return [Boolean]
29348
+ attr_accessor :image_porn
29349
+ alias_method :image_porn?, :image_porn
29350
+
29351
+ #
29352
+ # Corresponds to the JSON property `imageViolence`
29353
+ # @return [Boolean]
29354
+ attr_accessor :image_violence
29355
+ alias_method :image_violence?, :image_violence
29356
+
29357
+ #
29358
+ # Corresponds to the JSON property `pqc`
29359
+ # @return [Boolean]
29360
+ attr_accessor :pqc
29361
+ alias_method :pqc?, :pqc
29362
+
29363
+ #
29364
+ # Corresponds to the JSON property `safetycat`
29365
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmSafetyCatCategories]
29366
+ attr_accessor :safetycat
29367
+
29368
+ #
29369
+ # Corresponds to the JSON property `spii`
29370
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmSpiiFilter]
29371
+ attr_accessor :spii
29372
+
29373
+ #
29374
+ # Corresponds to the JSON property `threshold`
29375
+ # @return [Float]
29376
+ attr_accessor :threshold
29377
+
29378
+ #
29379
+ # Corresponds to the JSON property `videoFrameCsam`
29380
+ # @return [Boolean]
29381
+ attr_accessor :video_frame_csam
29382
+ alias_method :video_frame_csam?, :video_frame_csam
29383
+
29384
+ #
29385
+ # Corresponds to the JSON property `videoFramePedo`
29386
+ # @return [Boolean]
29387
+ attr_accessor :video_frame_pedo
29388
+ alias_method :video_frame_pedo?, :video_frame_pedo
29389
+
29390
+ # Video frame signals
29391
+ # Corresponds to the JSON property `videoFramePorn`
29392
+ # @return [Boolean]
29393
+ attr_accessor :video_frame_porn
29394
+ alias_method :video_frame_porn?, :video_frame_porn
29395
+
29396
+ #
29397
+ # Corresponds to the JSON property `videoFrameViolence`
29398
+ # @return [Boolean]
29399
+ attr_accessor :video_frame_violence
29400
+ alias_method :video_frame_violence?, :video_frame_violence
29401
+
29402
+ def initialize(**args)
29403
+ update!(**args)
29404
+ end
29405
+
29406
+ # Update properties of this object
29407
+ def update!(**args)
29408
+ @contextual_dangerous = args[:contextual_dangerous] if args.key?(:contextual_dangerous)
29409
+ @csam = args[:csam] if args.key?(:csam)
29410
+ @fringe = args[:fringe] if args.key?(:fringe)
29411
+ @grail_image_harm_type = args[:grail_image_harm_type] if args.key?(:grail_image_harm_type)
29412
+ @grail_text_harm_type = args[:grail_text_harm_type] if args.key?(:grail_text_harm_type)
29413
+ @image_csam = args[:image_csam] if args.key?(:image_csam)
29414
+ @image_pedo = args[:image_pedo] if args.key?(:image_pedo)
29415
+ @image_porn = args[:image_porn] if args.key?(:image_porn)
29416
+ @image_violence = args[:image_violence] if args.key?(:image_violence)
29417
+ @pqc = args[:pqc] if args.key?(:pqc)
29418
+ @safetycat = args[:safetycat] if args.key?(:safetycat)
29419
+ @spii = args[:spii] if args.key?(:spii)
29420
+ @threshold = args[:threshold] if args.key?(:threshold)
29421
+ @video_frame_csam = args[:video_frame_csam] if args.key?(:video_frame_csam)
29422
+ @video_frame_pedo = args[:video_frame_pedo] if args.key?(:video_frame_pedo)
29423
+ @video_frame_porn = args[:video_frame_porn] if args.key?(:video_frame_porn)
29424
+ @video_frame_violence = args[:video_frame_violence] if args.key?(:video_frame_violence)
29425
+ end
29426
+ end
29427
+
29428
+ # Harm type for images
29429
+ class LearningGenaiRootHarmGrailImageHarmType
29430
+ include Google::Apis::Core::Hashable
29431
+
29432
+ #
29433
+ # Corresponds to the JSON property `imageHarmType`
29434
+ # @return [Array<String>]
29435
+ attr_accessor :image_harm_type
29436
+
29437
+ def initialize(**args)
29438
+ update!(**args)
29439
+ end
29440
+
29441
+ # Update properties of this object
29442
+ def update!(**args)
29443
+ @image_harm_type = args[:image_harm_type] if args.key?(:image_harm_type)
29444
+ end
29445
+ end
29446
+
29447
+ # Harm type for text
29448
+ class LearningGenaiRootHarmGrailTextHarmType
29449
+ include Google::Apis::Core::Hashable
29450
+
29451
+ #
29452
+ # Corresponds to the JSON property `harmType`
29453
+ # @return [Array<String>]
29454
+ attr_accessor :harm_type
29455
+
29456
+ def initialize(**args)
29457
+ update!(**args)
29458
+ end
29459
+
29460
+ # Update properties of this object
29461
+ def update!(**args)
29462
+ @harm_type = args[:harm_type] if args.key?(:harm_type)
29463
+ end
29464
+ end
29465
+
29466
+ #
29467
+ class LearningGenaiRootHarmSafetyCatCategories
29468
+ include Google::Apis::Core::Hashable
29469
+
29470
+ #
29471
+ # Corresponds to the JSON property `categories`
29472
+ # @return [Array<String>]
29473
+ attr_accessor :categories
29474
+
29475
+ def initialize(**args)
29476
+ update!(**args)
29477
+ end
29478
+
29479
+ # Update properties of this object
29480
+ def update!(**args)
29481
+ @categories = args[:categories] if args.key?(:categories)
29482
+ end
29483
+ end
29484
+
29485
+ #
29486
+ class LearningGenaiRootHarmSpiiFilter
29487
+ include Google::Apis::Core::Hashable
29488
+
29489
+ #
29490
+ # Corresponds to the JSON property `usBankRoutingMicr`
29491
+ # @return [Boolean]
29492
+ attr_accessor :us_bank_routing_micr
29493
+ alias_method :us_bank_routing_micr?, :us_bank_routing_micr
29494
+
29495
+ #
29496
+ # Corresponds to the JSON property `usEmployerIdentificationNumber`
29497
+ # @return [Boolean]
29498
+ attr_accessor :us_employer_identification_number
29499
+ alias_method :us_employer_identification_number?, :us_employer_identification_number
29500
+
29501
+ #
29502
+ # Corresponds to the JSON property `usSocialSecurityNumber`
29503
+ # @return [Boolean]
29504
+ attr_accessor :us_social_security_number
29505
+ alias_method :us_social_security_number?, :us_social_security_number
29506
+
29507
+ def initialize(**args)
29508
+ update!(**args)
29509
+ end
29510
+
29511
+ # Update properties of this object
29512
+ def update!(**args)
29513
+ @us_bank_routing_micr = args[:us_bank_routing_micr] if args.key?(:us_bank_routing_micr)
29514
+ @us_employer_identification_number = args[:us_employer_identification_number] if args.key?(:us_employer_identification_number)
29515
+ @us_social_security_number = args[:us_social_security_number] if args.key?(:us_social_security_number)
29516
+ end
29517
+ end
29518
+
29519
+ #
29520
+ class LearningGenaiRootInternalMetadata
29521
+ include Google::Apis::Core::Hashable
29522
+
29523
+ #
29524
+ # Corresponds to the JSON property `scoredTokens`
29525
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScoredToken>]
29526
+ attr_accessor :scored_tokens
29527
+
29528
+ def initialize(**args)
29529
+ update!(**args)
29530
+ end
29531
+
29532
+ # Update properties of this object
29533
+ def update!(**args)
29534
+ @scored_tokens = args[:scored_tokens] if args.key?(:scored_tokens)
29535
+ end
29536
+ end
29537
+
29538
+ #
29539
+ class LearningGenaiRootMetricOutput
29540
+ include Google::Apis::Core::Hashable
29541
+
29542
+ #
29543
+ # Corresponds to the JSON property `debug`
29544
+ # @return [String]
29545
+ attr_accessor :debug
29546
+
29547
+ # Name of the metric.
29548
+ # Corresponds to the JSON property `name`
29549
+ # @return [String]
29550
+ attr_accessor :name
29551
+
29552
+ #
29553
+ # Corresponds to the JSON property `numericValue`
29554
+ # @return [Float]
29555
+ attr_accessor :numeric_value
29556
+
29557
+ # Wire-format for a Status object
29558
+ # Corresponds to the JSON property `status`
29559
+ # @return [Google::Apis::AiplatformV1::UtilStatusProto]
29560
+ attr_accessor :status
29561
+
29562
+ #
29563
+ # Corresponds to the JSON property `stringValue`
29564
+ # @return [String]
29565
+ attr_accessor :string_value
29566
+
29567
+ def initialize(**args)
29568
+ update!(**args)
29569
+ end
29570
+
29571
+ # Update properties of this object
29572
+ def update!(**args)
29573
+ @debug = args[:debug] if args.key?(:debug)
29574
+ @name = args[:name] if args.key?(:name)
29575
+ @numeric_value = args[:numeric_value] if args.key?(:numeric_value)
29576
+ @status = args[:status] if args.key?(:status)
29577
+ @string_value = args[:string_value] if args.key?(:string_value)
29578
+ end
29579
+ end
29580
+
29581
+ # This is per harm.
29582
+ class LearningGenaiRootRaiOutput
29583
+ include Google::Apis::Core::Hashable
29584
+
29585
+ #
29586
+ # Corresponds to the JSON property `allowed`
29587
+ # @return [Boolean]
29588
+ attr_accessor :allowed
29589
+ alias_method :allowed?, :allowed
29590
+
29591
+ #
29592
+ # Corresponds to the JSON property `harm`
29593
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarm]
29594
+ attr_accessor :harm
29595
+
29596
+ #
29597
+ # Corresponds to the JSON property `name`
29598
+ # @return [String]
29599
+ attr_accessor :name
29600
+
29601
+ #
29602
+ # Corresponds to the JSON property `score`
29603
+ # @return [Float]
29604
+ attr_accessor :score
29605
+
29606
+ def initialize(**args)
29607
+ update!(**args)
29608
+ end
29609
+
29610
+ # Update properties of this object
29611
+ def update!(**args)
29612
+ @allowed = args[:allowed] if args.key?(:allowed)
29613
+ @harm = args[:harm] if args.key?(:harm)
29614
+ @name = args[:name] if args.key?(:name)
29615
+ @score = args[:score] if args.key?(:score)
29616
+ end
29617
+ end
29618
+
29619
+ #
29620
+ class LearningGenaiRootRegexTakedownResult
29621
+ include Google::Apis::Core::Hashable
29622
+
29623
+ # False when query or response should be taken down due to match with a blocked
29624
+ # regex, true otherwise.
29625
+ # Corresponds to the JSON property `allowed`
29626
+ # @return [Boolean]
29627
+ attr_accessor :allowed
29628
+ alias_method :allowed?, :allowed
29629
+
29630
+ # Regex used to decide that query or response should be taken down. Empty when
29631
+ # query or response is kept.
29632
+ # Corresponds to the JSON property `takedownRegex`
29633
+ # @return [String]
29634
+ attr_accessor :takedown_regex
29635
+
29636
+ def initialize(**args)
29637
+ update!(**args)
29638
+ end
29639
+
29640
+ # Update properties of this object
29641
+ def update!(**args)
29642
+ @allowed = args[:allowed] if args.key?(:allowed)
29643
+ @takedown_regex = args[:takedown_regex] if args.key?(:takedown_regex)
29644
+ end
29645
+ end
29646
+
29647
+ #
29648
+ class LearningGenaiRootRequestResponseTakedownResult
29649
+ include Google::Apis::Core::Hashable
29650
+
29651
+ # False when response has to be taken down per above config.
29652
+ # Corresponds to the JSON property `allowed`
29653
+ # @return [Boolean]
29654
+ attr_accessor :allowed
29655
+ alias_method :allowed?, :allowed
29656
+
29657
+ # Regex used to match the request.
29658
+ # Corresponds to the JSON property `requestTakedownRegex`
29659
+ # @return [String]
29660
+ attr_accessor :request_takedown_regex
29661
+
29662
+ # Regex used to decide that response should be taken down. Empty when response
29663
+ # is kept.
29664
+ # Corresponds to the JSON property `responseTakedownRegex`
29665
+ # @return [String]
29666
+ attr_accessor :response_takedown_regex
29667
+
29668
+ def initialize(**args)
29669
+ update!(**args)
29670
+ end
29671
+
29672
+ # Update properties of this object
29673
+ def update!(**args)
29674
+ @allowed = args[:allowed] if args.key?(:allowed)
29675
+ @request_takedown_regex = args[:request_takedown_regex] if args.key?(:request_takedown_regex)
29676
+ @response_takedown_regex = args[:response_takedown_regex] if args.key?(:response_takedown_regex)
29677
+ end
29678
+ end
29679
+
29680
+ # Holds the final routing decision, by storing the model_config_id. And
29681
+ # individual scores each model got.
29682
+ class LearningGenaiRootRoutingDecision
29683
+ include Google::Apis::Core::Hashable
29684
+
29685
+ # Debug metadata about the routing decision.
29686
+ # Corresponds to the JSON property `metadata`
29687
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadata]
29688
+ attr_accessor :metadata
29689
+
29690
+ # The selected model to route traffic to.
29691
+ # Corresponds to the JSON property `modelConfigId`
29692
+ # @return [String]
29693
+ attr_accessor :model_config_id
29694
+
29695
+ def initialize(**args)
29696
+ update!(**args)
29697
+ end
29698
+
29699
+ # Update properties of this object
29700
+ def update!(**args)
29701
+ @metadata = args[:metadata] if args.key?(:metadata)
29702
+ @model_config_id = args[:model_config_id] if args.key?(:model_config_id)
29703
+ end
29704
+ end
29705
+
29706
+ # Debug metadata about the routing decision.
29707
+ class LearningGenaiRootRoutingDecisionMetadata
29708
+ include Google::Apis::Core::Hashable
29709
+
29710
+ # If we are routing using scored based configuration, then the metadata about
29711
+ # that is available in this proto.
29712
+ # Corresponds to the JSON property `scoreBasedRoutingMetadata`
29713
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataScoreBased]
29714
+ attr_accessor :score_based_routing_metadata
29715
+
29716
+ #
29717
+ # Corresponds to the JSON property `tokenLengthBasedRoutingMetadata`
29718
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBased]
29719
+ attr_accessor :token_length_based_routing_metadata
29720
+
29721
+ def initialize(**args)
29722
+ update!(**args)
29723
+ end
29724
+
29725
+ # Update properties of this object
29726
+ def update!(**args)
29727
+ @score_based_routing_metadata = args[:score_based_routing_metadata] if args.key?(:score_based_routing_metadata)
29728
+ @token_length_based_routing_metadata = args[:token_length_based_routing_metadata] if args.key?(:token_length_based_routing_metadata)
29729
+ end
29730
+ end
29731
+
29732
+ # If we are routing using scored based configuration, then the metadata about
29733
+ # that is available in this proto.
29734
+ class LearningGenaiRootRoutingDecisionMetadataScoreBased
29735
+ include Google::Apis::Core::Hashable
29736
+
29737
+ # The rule that was matched.
29738
+ # Corresponds to the JSON property `matchedRule`
29739
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScoreBasedRoutingConfigRule]
29740
+ attr_accessor :matched_rule
29741
+
29742
+ # The score that was generated by the router i.e. the model.
29743
+ # Corresponds to the JSON property `score`
29744
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
29745
+ attr_accessor :score
29746
+
29747
+ # No rules were matched & therefore used the default fallback.
29748
+ # Corresponds to the JSON property `usedDefaultFallback`
29749
+ # @return [Boolean]
29750
+ attr_accessor :used_default_fallback
29751
+ alias_method :used_default_fallback?, :used_default_fallback
29752
+
29753
+ def initialize(**args)
29754
+ update!(**args)
29755
+ end
29756
+
29757
+ # Update properties of this object
29758
+ def update!(**args)
29759
+ @matched_rule = args[:matched_rule] if args.key?(:matched_rule)
29760
+ @score = args[:score] if args.key?(:score)
29761
+ @used_default_fallback = args[:used_default_fallback] if args.key?(:used_default_fallback)
29762
+ end
29763
+ end
29764
+
29765
+ #
29766
+ class LearningGenaiRootRoutingDecisionMetadataTokenLengthBased
29767
+ include Google::Apis::Core::Hashable
29768
+
29769
+ #
29770
+ # Corresponds to the JSON property `modelInputTokenMetadata`
29771
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata>]
29772
+ attr_accessor :model_input_token_metadata
29773
+
29774
+ #
29775
+ # Corresponds to the JSON property `modelMaxTokenMetadata`
29776
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata>]
29777
+ attr_accessor :model_max_token_metadata
29778
+
29779
+ def initialize(**args)
29780
+ update!(**args)
29781
+ end
29782
+
29783
+ # Update properties of this object
29784
+ def update!(**args)
29785
+ @model_input_token_metadata = args[:model_input_token_metadata] if args.key?(:model_input_token_metadata)
29786
+ @model_max_token_metadata = args[:model_max_token_metadata] if args.key?(:model_max_token_metadata)
29787
+ end
29788
+ end
29789
+
29790
+ #
29791
+ class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata
29792
+ include Google::Apis::Core::Hashable
29793
+
29794
+ # The length computed by backends using the formatter & tokenizer specific to
29795
+ # the model
29796
+ # Corresponds to the JSON property `computedInputTokenLength`
29797
+ # @return [Fixnum]
29798
+ attr_accessor :computed_input_token_length
29799
+
29800
+ #
29801
+ # Corresponds to the JSON property `modelId`
29802
+ # @return [String]
29803
+ attr_accessor :model_id
29804
+
29805
+ def initialize(**args)
29806
+ update!(**args)
29807
+ end
29808
+
29809
+ # Update properties of this object
29810
+ def update!(**args)
29811
+ @computed_input_token_length = args[:computed_input_token_length] if args.key?(:computed_input_token_length)
29812
+ @model_id = args[:model_id] if args.key?(:model_id)
29813
+ end
29814
+ end
29815
+
29816
+ #
29817
+ class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata
29818
+ include Google::Apis::Core::Hashable
29819
+
29820
+ #
29821
+ # Corresponds to the JSON property `maxNumInputTokens`
29822
+ # @return [Fixnum]
29823
+ attr_accessor :max_num_input_tokens
29824
+
29825
+ #
29826
+ # Corresponds to the JSON property `maxNumOutputTokens`
29827
+ # @return [Fixnum]
29828
+ attr_accessor :max_num_output_tokens
29829
+
29830
+ #
29831
+ # Corresponds to the JSON property `modelId`
29832
+ # @return [String]
29833
+ attr_accessor :model_id
29834
+
29835
+ def initialize(**args)
29836
+ update!(**args)
29837
+ end
29838
+
29839
+ # Update properties of this object
29840
+ def update!(**args)
29841
+ @max_num_input_tokens = args[:max_num_input_tokens] if args.key?(:max_num_input_tokens)
29842
+ @max_num_output_tokens = args[:max_num_output_tokens] if args.key?(:max_num_output_tokens)
29843
+ @model_id = args[:model_id] if args.key?(:model_id)
29844
+ end
29845
+ end
29846
+
29847
+ #
29848
+ class LearningGenaiRootRuleOutput
29849
+ include Google::Apis::Core::Hashable
29850
+
29851
+ #
29852
+ # Corresponds to the JSON property `decision`
29853
+ # @return [String]
29854
+ attr_accessor :decision
29855
+
29856
+ #
29857
+ # Corresponds to the JSON property `name`
29858
+ # @return [String]
29859
+ attr_accessor :name
29860
+
29861
+ def initialize(**args)
29862
+ update!(**args)
29863
+ end
29864
+
29865
+ # Update properties of this object
29866
+ def update!(**args)
29867
+ @decision = args[:decision] if args.key?(:decision)
29868
+ @name = args[:name] if args.key?(:name)
29869
+ end
29870
+ end
29871
+
29872
+ #
29873
+ class LearningGenaiRootScore
29874
+ include Google::Apis::Core::Hashable
29875
+
29876
+ # The type used for final weights calculation.
29877
+ # Corresponds to the JSON property `calculationType`
29878
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootCalculationType]
29879
+ attr_accessor :calculation_type
29880
+
29881
+ # The internal_metadata is intended to be used by internal processors and will
29882
+ # be cleared before returns.
29883
+ # Corresponds to the JSON property `internalMetadata`
29884
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootInternalMetadata]
29885
+ attr_accessor :internal_metadata
29886
+
29887
+ # The type of score that bundled with a threshold, and will not be attending the
29888
+ # final score calculation. How each score type uses the threshold can be
29889
+ # implementation details.
29890
+ # Corresponds to the JSON property `thresholdType`
29891
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootThresholdType]
29892
+ attr_accessor :threshold_type
29893
+
29894
+ # Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
29895
+ # Corresponds to the JSON property `tokensAndLogprobPerDecodingStep`
29896
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStep]
29897
+ attr_accessor :tokens_and_logprob_per_decoding_step
29898
+
29899
+ #
29900
+ # Corresponds to the JSON property `value`
29901
+ # @return [Float]
29902
+ attr_accessor :value
29903
+
29904
+ def initialize(**args)
29905
+ update!(**args)
29906
+ end
29907
+
29908
+ # Update properties of this object
29909
+ def update!(**args)
29910
+ @calculation_type = args[:calculation_type] if args.key?(:calculation_type)
29911
+ @internal_metadata = args[:internal_metadata] if args.key?(:internal_metadata)
29912
+ @threshold_type = args[:threshold_type] if args.key?(:threshold_type)
29913
+ @tokens_and_logprob_per_decoding_step = args[:tokens_and_logprob_per_decoding_step] if args.key?(:tokens_and_logprob_per_decoding_step)
29914
+ @value = args[:value] if args.key?(:value)
29915
+ end
29916
+ end
29917
+
29918
+ #
29919
+ class LearningGenaiRootScoreBasedRoutingConfigRule
29920
+ include Google::Apis::Core::Hashable
29921
+
29922
+ # NOTE: Hardest examples have smaller values in their routing scores.
29923
+ # Corresponds to the JSON property `equalOrGreaterThan`
29924
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
29925
+ attr_accessor :equal_or_greater_than
29926
+
29927
+ #
29928
+ # Corresponds to the JSON property `lessThan`
29929
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
29930
+ attr_accessor :less_than
29931
+
29932
+ # This model_config_id points to ModelConfig::id which allows us to find the
29933
+ # ModelConfig to route to. This is part of the banks specified in the
29934
+ # ModelBankConfig.
29935
+ # Corresponds to the JSON property `modelConfigId`
29936
+ # @return [String]
29937
+ attr_accessor :model_config_id
29938
+
29939
+ def initialize(**args)
29940
+ update!(**args)
29941
+ end
29942
+
29943
+ # Update properties of this object
29944
+ def update!(**args)
29945
+ @equal_or_greater_than = args[:equal_or_greater_than] if args.key?(:equal_or_greater_than)
29946
+ @less_than = args[:less_than] if args.key?(:less_than)
29947
+ @model_config_id = args[:model_config_id] if args.key?(:model_config_id)
29948
+ end
29949
+ end
29950
+
29951
+ # Proto containing the results from the Universal Sentence Encoder / Other
29952
+ # models
29953
+ class LearningGenaiRootScoredSimilarityTakedownPhrase
29954
+ include Google::Apis::Core::Hashable
29955
+
29956
+ # Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
29957
+ # phrases together along with a corresponding punt If the closest matching
29958
+ # response is of the allowed type, we allow the response If the closest matching
29959
+ # response is of the blocked type, we block the response. eg: Blocked phrase - "
29960
+ # All lives matter"
29961
+ # Corresponds to the JSON property `phrase`
29962
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownPhrase]
29963
+ attr_accessor :phrase
29964
+
29965
+ #
29966
+ # Corresponds to the JSON property `similarityScore`
29967
+ # @return [Float]
29968
+ attr_accessor :similarity_score
29969
+
29970
+ def initialize(**args)
29971
+ update!(**args)
29972
+ end
29973
+
29974
+ # Update properties of this object
29975
+ def update!(**args)
29976
+ @phrase = args[:phrase] if args.key?(:phrase)
29977
+ @similarity_score = args[:similarity_score] if args.key?(:similarity_score)
29978
+ end
29979
+ end
29980
+
29981
+ # A token with its own score.
29982
+ class LearningGenaiRootScoredToken
29983
+ include Google::Apis::Core::Hashable
29984
+
29985
+ # Each end_token_score is a logprob for how well the completion would end at a
29986
+ # particular token. See http://google3/labs/language/aida/config/proto/
29987
+ # model_config.proto;l=376;rcl=573039459
29988
+ # Corresponds to the JSON property `endTokenScore`
29989
+ # @return [Float]
29990
+ attr_accessor :end_token_score
29991
+
29992
+ # Each score is the logprob for the token in model response.
29993
+ # Corresponds to the JSON property `score`
29994
+ # @return [Float]
29995
+ attr_accessor :score
29996
+
29997
+ #
29998
+ # Corresponds to the JSON property `token`
29999
+ # @return [String]
30000
+ attr_accessor :token
30001
+
30002
+ def initialize(**args)
30003
+ update!(**args)
30004
+ end
30005
+
30006
+ # Update properties of this object
30007
+ def update!(**args)
30008
+ @end_token_score = args[:end_token_score] if args.key?(:end_token_score)
30009
+ @score = args[:score] if args.key?(:score)
30010
+ @token = args[:token] if args.key?(:token)
30011
+ end
30012
+ end
30013
+
30014
+ # Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
30015
+ # phrases together along with a corresponding punt If the closest matching
30016
+ # response is of the allowed type, we allow the response If the closest matching
30017
+ # response is of the blocked type, we block the response. eg: Blocked phrase - "
30018
+ # All lives matter"
30019
+ class LearningGenaiRootSimilarityTakedownPhrase
30020
+ include Google::Apis::Core::Hashable
30021
+
30022
+ #
30023
+ # Corresponds to the JSON property `blockedPhrase`
30024
+ # @return [String]
30025
+ attr_accessor :blocked_phrase
30026
+
30027
+ def initialize(**args)
30028
+ update!(**args)
30029
+ end
30030
+
30031
+ # Update properties of this object
30032
+ def update!(**args)
30033
+ @blocked_phrase = args[:blocked_phrase] if args.key?(:blocked_phrase)
30034
+ end
30035
+ end
30036
+
30037
+ #
30038
+ class LearningGenaiRootSimilarityTakedownResult
30039
+ include Google::Apis::Core::Hashable
30040
+
30041
+ # False when query or response should be taken down by any of the takedown rules,
30042
+ # true otherwise.
30043
+ # Corresponds to the JSON property `allowed`
30044
+ # @return [Boolean]
30045
+ attr_accessor :allowed
30046
+ alias_method :allowed?, :allowed
30047
+
30048
+ # List of similar phrases with score. Set only if allowed=false.
30049
+ # Corresponds to the JSON property `scoredPhrases`
30050
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScoredSimilarityTakedownPhrase>]
30051
+ attr_accessor :scored_phrases
30052
+
30053
+ def initialize(**args)
30054
+ update!(**args)
30055
+ end
30056
+
30057
+ # Update properties of this object
30058
+ def update!(**args)
30059
+ @allowed = args[:allowed] if args.key?(:allowed)
30060
+ @scored_phrases = args[:scored_phrases] if args.key?(:scored_phrases)
30061
+ end
30062
+ end
30063
+
30064
+ #
30065
+ class LearningGenaiRootTakedownResult
30066
+ include Google::Apis::Core::Hashable
30067
+
30068
+ # False when query or response should be taken down by any of the takedown rules,
30069
+ # true otherwise.
30070
+ # Corresponds to the JSON property `allowed`
30071
+ # @return [Boolean]
30072
+ attr_accessor :allowed
30073
+ alias_method :allowed?, :allowed
30074
+
30075
+ #
30076
+ # Corresponds to the JSON property `regexTakedownResult`
30077
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRegexTakedownResult]
30078
+ attr_accessor :regex_takedown_result
30079
+
30080
+ #
30081
+ # Corresponds to the JSON property `requestResponseTakedownResult`
30082
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRequestResponseTakedownResult]
30083
+ attr_accessor :request_response_takedown_result
30084
+
30085
+ #
30086
+ # Corresponds to the JSON property `similarityTakedownResult`
30087
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownResult]
30088
+ attr_accessor :similarity_takedown_result
30089
+
30090
+ def initialize(**args)
30091
+ update!(**args)
30092
+ end
30093
+
30094
+ # Update properties of this object
30095
+ def update!(**args)
30096
+ @allowed = args[:allowed] if args.key?(:allowed)
30097
+ @regex_takedown_result = args[:regex_takedown_result] if args.key?(:regex_takedown_result)
30098
+ @request_response_takedown_result = args[:request_response_takedown_result] if args.key?(:request_response_takedown_result)
30099
+ @similarity_takedown_result = args[:similarity_takedown_result] if args.key?(:similarity_takedown_result)
30100
+ end
30101
+ end
30102
+
30103
+ # The type of score that bundled with a threshold, and will not be attending the
30104
+ # final score calculation. How each score type uses the threshold can be
30105
+ # implementation details.
30106
+ class LearningGenaiRootThresholdType
30107
+ include Google::Apis::Core::Hashable
30108
+
30109
+ #
30110
+ # Corresponds to the JSON property `scoreType`
30111
+ # @return [String]
30112
+ attr_accessor :score_type
30113
+
30114
+ #
30115
+ # Corresponds to the JSON property `threshold`
30116
+ # @return [Float]
30117
+ attr_accessor :threshold
30118
+
30119
+ def initialize(**args)
30120
+ update!(**args)
30121
+ end
30122
+
30123
+ # Update properties of this object
30124
+ def update!(**args)
30125
+ @score_type = args[:score_type] if args.key?(:score_type)
30126
+ @threshold = args[:threshold] if args.key?(:threshold)
30127
+ end
30128
+ end
30129
+
30130
+ # Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
30131
+ class LearningGenaiRootTokensAndLogProbPerDecodingStep
30132
+ include Google::Apis::Core::Hashable
30133
+
30134
+ # Length = total number of decoding steps. The chosen candidates may or may not
30135
+ # be in top_candidates.
30136
+ # Corresponds to the JSON property `chosenCandidates`
30137
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
30138
+ attr_accessor :chosen_candidates
30139
+
30140
+ # Length = total number of decoding steps.
30141
+ # Corresponds to the JSON property `topCandidates`
30142
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates>]
30143
+ attr_accessor :top_candidates
30144
+
30145
+ def initialize(**args)
30146
+ update!(**args)
30147
+ end
30148
+
30149
+ # Update properties of this object
30150
+ def update!(**args)
30151
+ @chosen_candidates = args[:chosen_candidates] if args.key?(:chosen_candidates)
30152
+ @top_candidates = args[:top_candidates] if args.key?(:top_candidates)
30153
+ end
30154
+ end
30155
+
30156
+ # A candidate at a decoding step.
30157
+ class LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate
30158
+ include Google::Apis::Core::Hashable
30159
+
30160
+ # The candidate's log probability.
30161
+ # Corresponds to the JSON property `logProbability`
30162
+ # @return [Float]
30163
+ attr_accessor :log_probability
30164
+
30165
+ # The candidate’s token value.
30166
+ # Corresponds to the JSON property `token`
30167
+ # @return [String]
30168
+ attr_accessor :token
30169
+
30170
+ def initialize(**args)
30171
+ update!(**args)
30172
+ end
30173
+
30174
+ # Update properties of this object
30175
+ def update!(**args)
30176
+ @log_probability = args[:log_probability] if args.key?(:log_probability)
30177
+ @token = args[:token] if args.key?(:token)
30178
+ end
30179
+ end
30180
+
30181
+ # Candidates with top log probabilities at each decoding step.
30182
+ class LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates
30183
+ include Google::Apis::Core::Hashable
30184
+
30185
+ # Sorted by log probability in descending order.
30186
+ # Corresponds to the JSON property `candidates`
30187
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
30188
+ attr_accessor :candidates
30189
+
30190
+ def initialize(**args)
30191
+ update!(**args)
30192
+ end
30193
+
30194
+ # Update properties of this object
30195
+ def update!(**args)
30196
+ @candidates = args[:candidates] if args.key?(:candidates)
30197
+ end
30198
+ end
30199
+
30200
+ # A model can generate multiple signals and this captures all the generated
30201
+ # signals for a single message.
30202
+ class LearningGenaiRootToxicityResult
30203
+ include Google::Apis::Core::Hashable
30204
+
30205
+ #
30206
+ # Corresponds to the JSON property `signals`
30207
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootToxicitySignal>]
30208
+ attr_accessor :signals
30209
+
30210
+ def initialize(**args)
30211
+ update!(**args)
30212
+ end
30213
+
30214
+ # Update properties of this object
30215
+ def update!(**args)
30216
+ @signals = args[:signals] if args.key?(:signals)
30217
+ end
30218
+ end
30219
+
30220
+ # Proto to capture a signal generated by the toxicity model.
30221
+ class LearningGenaiRootToxicitySignal
30222
+ include Google::Apis::Core::Hashable
30223
+
30224
+ #
30225
+ # Corresponds to the JSON property `allowed`
30226
+ # @return [Boolean]
30227
+ attr_accessor :allowed
30228
+ alias_method :allowed?, :allowed
30229
+
30230
+ #
30231
+ # Corresponds to the JSON property `label`
30232
+ # @return [String]
30233
+ attr_accessor :label
30234
+
30235
+ #
30236
+ # Corresponds to the JSON property `score`
30237
+ # @return [Float]
30238
+ attr_accessor :score
30239
+
30240
+ def initialize(**args)
30241
+ update!(**args)
30242
+ end
30243
+
30244
+ # Update properties of this object
30245
+ def update!(**args)
30246
+ @allowed = args[:allowed] if args.key?(:allowed)
30247
+ @label = args[:label] if args.key?(:label)
30248
+ @score = args[:score] if args.key?(:score)
30249
+ end
30250
+ end
30251
+
30252
+ #
30253
+ class LearningServingLlmLanguageFilterResult
30254
+ include Google::Apis::Core::Hashable
30255
+
30256
+ # False when query or response should be filtered out due to unsupported
30257
+ # language.
30258
+ # Corresponds to the JSON property `allowed`
30259
+ # @return [Boolean]
30260
+ attr_accessor :allowed
30261
+ alias_method :allowed?, :allowed
30262
+
30263
+ # Language of the query or response.
30264
+ # Corresponds to the JSON property `detectedLanguage`
30265
+ # @return [String]
30266
+ attr_accessor :detected_language
30267
+
30268
+ # Probability of the language predicted as returned by LangID.
30269
+ # Corresponds to the JSON property `detectedLanguageProbability`
30270
+ # @return [Float]
30271
+ attr_accessor :detected_language_probability
30272
+
30273
+ def initialize(**args)
30274
+ update!(**args)
30275
+ end
30276
+
30277
+ # Update properties of this object
30278
+ def update!(**args)
30279
+ @allowed = args[:allowed] if args.key?(:allowed)
30280
+ @detected_language = args[:detected_language] if args.key?(:detected_language)
30281
+ @detected_language_probability = args[:detected_language_probability] if args.key?(:detected_language_probability)
30282
+ end
30283
+ end
30284
+
30285
+ # LINT.IfChange This metadata contains additional information required for
30286
+ # debugging.
30287
+ class LearningServingLlmMessageMetadata
30288
+ include Google::Apis::Core::Hashable
30289
+
30290
+ # Summary of classifier output. We attach this to all messages regardless of
30291
+ # whether classification rules triggered or not.
30292
+ # Corresponds to the JSON property `classifierSummary`
30293
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierOutputSummary]
30294
+ attr_accessor :classifier_summary
30295
+
30296
+ #
30297
+ # Corresponds to the JSON property `currentStreamTextLength`
30298
+ # @return [Fixnum]
30299
+ attr_accessor :current_stream_text_length
30300
+
30301
+ # Whether the corresponding message has been deleted.
30302
+ # Corresponds to the JSON property `deleted`
30303
+ # @return [Boolean]
30304
+ attr_accessor :deleted
30305
+ alias_method :deleted?, :deleted
30306
+
30307
+ # Metadata for filters that triggered.
30308
+ # Corresponds to the JSON property `filterMeta`
30309
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadata>]
30310
+ attr_accessor :filter_meta
30311
+
30312
+ # This score is finally used for ranking the message. This will be same as the
30313
+ # score present in `Message.score` field.
30314
+ # Corresponds to the JSON property `finalMessageScore`
30315
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
30316
+ attr_accessor :final_message_score
30317
+
30318
+ # NOT YET IMPLEMENTED.
30319
+ # Corresponds to the JSON property `finishReason`
30320
+ # @return [String]
30321
+ attr_accessor :finish_reason
30322
+
30323
+ # Applies to Response message only. Indicates whether the message is a fallback
30324
+ # and the response would have otherwise been empty.
30325
+ # Corresponds to the JSON property `isFallback`
30326
+ # @return [Boolean]
30327
+ attr_accessor :is_fallback
30328
+ alias_method :is_fallback?, :is_fallback
30329
+
30330
+ # Result from nlp_saft DetectLanguage method. Currently the predicted language
30331
+ # code and language probability is used.
30332
+ # Corresponds to the JSON property `langidResult`
30333
+ # @return [Google::Apis::AiplatformV1::NlpSaftLangIdResult]
30334
+ attr_accessor :langid_result
30335
+
30336
+ # Detected language.
30337
+ # Corresponds to the JSON property `language`
30338
+ # @return [String]
30339
+ attr_accessor :language
30340
+
30341
+ # The LM prefix used to generate this response.
30342
+ # Corresponds to the JSON property `lmPrefix`
30343
+ # @return [String]
30344
+ attr_accessor :lm_prefix
30345
+
30346
+ # The original text generated by LLM. This is the raw output for debugging
30347
+ # purposes.
30348
+ # Corresponds to the JSON property `originalText`
30349
+ # @return [String]
30350
+ attr_accessor :original_text
30351
+
30352
+ # NOT YET IMPLEMENTED. Applies to streaming only. Number of tokens decoded /
30353
+ # emitted by the model as part of this stream. This may be different from
30354
+ # token_count, which contains number of tokens returned in this response after
30355
+ # any response rewriting / truncation.
30356
+ # Corresponds to the JSON property `perStreamDecodedTokenCount`
30357
+ # @return [Fixnum]
30358
+ attr_accessor :per_stream_decoded_token_count
30359
+
30360
+ # Results of running RAI on the query or this response candidate. One output per
30361
+ # rai_config. It will be populated regardless of whether the threshold is
30362
+ # exceeded or not.
30363
+ # Corresponds to the JSON property `raiOutputs`
30364
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput>]
30365
+ attr_accessor :rai_outputs
30366
+
30367
+ # The recitation result for one input
30368
+ # Corresponds to the JSON property `recitationResult`
30369
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRecitationRecitationResult]
30370
+ attr_accessor :recitation_result
30371
+
30372
+ # NOT YET IMPLEMENTED. Number of tokens returned as part of this candidate.
30373
+ # Corresponds to the JSON property `returnTokenCount`
30374
+ # @return [Fixnum]
30375
+ attr_accessor :return_token_count
30376
+
30377
+ # All the different scores for a message are logged here.
30378
+ # Corresponds to the JSON property `scores`
30379
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScore>]
30380
+ attr_accessor :scores
30381
+
30382
+ # Whether the response is terminated during streaming return. Only used for
30383
+ # streaming requests.
30384
+ # Corresponds to the JSON property `streamTerminated`
30385
+ # @return [Boolean]
30386
+ attr_accessor :stream_terminated
30387
+ alias_method :stream_terminated?, :stream_terminated
30388
+
30389
+ # NOT YET IMPLEMENTED. Aggregated number of total tokens decoded so far. For
30390
+ # streaming, this is sum of all the tokens decoded so far i.e. aggregated count.
30391
+ # Corresponds to the JSON property `totalDecodedTokenCount`
30392
+ # @return [Fixnum]
30393
+ attr_accessor :total_decoded_token_count
30394
+
30395
+ # Translated user-prompt used for RAI post processing. This is for internal
30396
+ # processing only. We will translate in pre-processor and pass the translated
30397
+ # text to the post processor using this field. It will be empty if non of the
30398
+ # signals requested need translation.
30399
+ # Corresponds to the JSON property `translatedUserPrompts`
30400
+ # @return [Array<String>]
30401
+ attr_accessor :translated_user_prompts
30402
+
30403
+ # The RAI results for a given text.
30404
+ # Corresponds to the JSON property `vertexRaiResult`
30405
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult]
30406
+ attr_accessor :vertex_rai_result
30407
+
30408
+ def initialize(**args)
30409
+ update!(**args)
30410
+ end
30411
+
30412
+ # Update properties of this object
30413
+ def update!(**args)
30414
+ @classifier_summary = args[:classifier_summary] if args.key?(:classifier_summary)
30415
+ @current_stream_text_length = args[:current_stream_text_length] if args.key?(:current_stream_text_length)
30416
+ @deleted = args[:deleted] if args.key?(:deleted)
30417
+ @filter_meta = args[:filter_meta] if args.key?(:filter_meta)
30418
+ @final_message_score = args[:final_message_score] if args.key?(:final_message_score)
30419
+ @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
30420
+ @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
30421
+ @langid_result = args[:langid_result] if args.key?(:langid_result)
30422
+ @language = args[:language] if args.key?(:language)
30423
+ @lm_prefix = args[:lm_prefix] if args.key?(:lm_prefix)
30424
+ @original_text = args[:original_text] if args.key?(:original_text)
30425
+ @per_stream_decoded_token_count = args[:per_stream_decoded_token_count] if args.key?(:per_stream_decoded_token_count)
30426
+ @rai_outputs = args[:rai_outputs] if args.key?(:rai_outputs)
30427
+ @recitation_result = args[:recitation_result] if args.key?(:recitation_result)
30428
+ @return_token_count = args[:return_token_count] if args.key?(:return_token_count)
30429
+ @scores = args[:scores] if args.key?(:scores)
30430
+ @stream_terminated = args[:stream_terminated] if args.key?(:stream_terminated)
30431
+ @total_decoded_token_count = args[:total_decoded_token_count] if args.key?(:total_decoded_token_count)
30432
+ @translated_user_prompts = args[:translated_user_prompts] if args.key?(:translated_user_prompts)
30433
+ @vertex_rai_result = args[:vertex_rai_result] if args.key?(:vertex_rai_result)
30434
+ end
30435
+ end
30436
+
30437
+ #
30438
+ class NlpSaftLangIdLocalesResult
30439
+ include Google::Apis::Core::Hashable
30440
+
30441
+ # List of locales in which the text would be considered acceptable. Sorted in
30442
+ # descending order according to each locale's respective likelihood. For example,
30443
+ # if a Portuguese text is acceptable in both Brazil and Portugal, but is more
30444
+ # strongly associated with Brazil, then the predictions would be ["pt-BR", "pt-
30445
+ # PT"], in that order. May be empty, indicating that the model did not predict
30446
+ # any acceptable locales.
30447
+ # Corresponds to the JSON property `predictions`
30448
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLangIdLocalesResultLocale>]
30449
+ attr_accessor :predictions
30450
+
30451
+ def initialize(**args)
30452
+ update!(**args)
30453
+ end
30454
+
30455
+ # Update properties of this object
30456
+ def update!(**args)
30457
+ @predictions = args[:predictions] if args.key?(:predictions)
30458
+ end
30459
+ end
30460
+
30461
+ #
30462
+ class NlpSaftLangIdLocalesResultLocale
30463
+ include Google::Apis::Core::Hashable
30464
+
30465
+ # A BCP 47 language code that includes region information. For example, "pt-BR"
30466
+ # or "pt-PT". This field will always be populated.
30467
+ # Corresponds to the JSON property `languageCode`
30468
+ # @return [String]
30469
+ attr_accessor :language_code
30470
+
30471
+ def initialize(**args)
30472
+ update!(**args)
30473
+ end
30474
+
30475
+ # Update properties of this object
30476
+ def update!(**args)
30477
+ @language_code = args[:language_code] if args.key?(:language_code)
30478
+ end
30479
+ end
30480
+
30481
+ #
30482
+ class NlpSaftLangIdResult
30483
+ include Google::Apis::Core::Hashable
30484
+
30485
+ # The version of the model used to create these annotations.
30486
+ # Corresponds to the JSON property `modelVersion`
30487
+ # @return [String]
30488
+ attr_accessor :model_version
30489
+
30490
+ # This field stores the n-best list of possible BCP 47 language code strings for
30491
+ # a given input sorted in descending order according to each code's respective
30492
+ # probability.
30493
+ # Corresponds to the JSON property `predictions`
30494
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpan>]
30495
+ attr_accessor :predictions
30496
+
30497
+ # This field stores language predictions of subspans of the input, when
30498
+ # available. Each LanguageSpanSequence is a sequence of LanguageSpans. A
30499
+ # particular sequence of LanguageSpans has an associated probability, and need
30500
+ # not necessarily cover the entire input. If no language could be predicted for
30501
+ # any span, then this field may be empty.
30502
+ # Corresponds to the JSON property `spanPredictions`
30503
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpanSequence>]
30504
+ attr_accessor :span_predictions
30505
+
30506
+ def initialize(**args)
30507
+ update!(**args)
30508
+ end
30509
+
30510
+ # Update properties of this object
30511
+ def update!(**args)
30512
+ @model_version = args[:model_version] if args.key?(:model_version)
30513
+ @predictions = args[:predictions] if args.key?(:predictions)
30514
+ @span_predictions = args[:span_predictions] if args.key?(:span_predictions)
30515
+ end
30516
+ end
30517
+
30518
+ #
30519
+ class NlpSaftLanguageSpan
30520
+ include Google::Apis::Core::Hashable
30521
+
30522
+ #
30523
+ # Corresponds to the JSON property `end`
30524
+ # @return [Fixnum]
30525
+ attr_accessor :end
30526
+
30527
+ # A BCP 47 language code for this span.
30528
+ # Corresponds to the JSON property `languageCode`
30529
+ # @return [String]
30530
+ attr_accessor :language_code
30531
+
30532
+ # Optional field containing any information that was predicted about the
30533
+ # specific locale(s) of the span.
30534
+ # Corresponds to the JSON property `locales`
30535
+ # @return [Google::Apis::AiplatformV1::NlpSaftLangIdLocalesResult]
30536
+ attr_accessor :locales
30537
+
30538
+ # A probability associated with this prediction.
30539
+ # Corresponds to the JSON property `probability`
30540
+ # @return [Float]
30541
+ attr_accessor :probability
30542
+
30543
+ # Start and end byte offsets, inclusive, within the given input string. A value
30544
+ # of -1 implies that this field is not set. Both fields must either be set with
30545
+ # a nonnegative value or both are unset. If both are unset then this
30546
+ # LanguageSpan applies to the entire input.
30547
+ # Corresponds to the JSON property `start`
30548
+ # @return [Fixnum]
30549
+ attr_accessor :start
30550
+
30551
+ def initialize(**args)
30552
+ update!(**args)
30553
+ end
30554
+
30555
+ # Update properties of this object
30556
+ def update!(**args)
30557
+ @end = args[:end] if args.key?(:end)
30558
+ @language_code = args[:language_code] if args.key?(:language_code)
30559
+ @locales = args[:locales] if args.key?(:locales)
30560
+ @probability = args[:probability] if args.key?(:probability)
30561
+ @start = args[:start] if args.key?(:start)
30562
+ end
30563
+ end
30564
+
30565
+ #
30566
+ class NlpSaftLanguageSpanSequence
30567
+ include Google::Apis::Core::Hashable
30568
+
30569
+ # A sequence of LanguageSpan objects, each assigning a language to a subspan of
30570
+ # the input.
30571
+ # Corresponds to the JSON property `languageSpans`
30572
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpan>]
30573
+ attr_accessor :language_spans
30574
+
30575
+ # The probability of this sequence of LanguageSpans.
30576
+ # Corresponds to the JSON property `probability`
30577
+ # @return [Float]
30578
+ attr_accessor :probability
30579
+
30580
+ def initialize(**args)
30581
+ update!(**args)
30582
+ end
30583
+
30584
+ # Update properties of this object
30585
+ def update!(**args)
30586
+ @language_spans = args[:language_spans] if args.key?(:language_spans)
30587
+ @probability = args[:probability] if args.key?(:probability)
30588
+ end
30589
+ end
30590
+
30591
+ # This is proto2's version of MessageSet.
30592
+ class Proto2BridgeMessageSet
30593
+ include Google::Apis::Core::Hashable
30594
+
30595
+ def initialize(**args)
30596
+ update!(**args)
30597
+ end
30598
+
30599
+ # Update properties of this object
30600
+ def update!(**args)
30601
+ end
30602
+ end
30603
+
30604
+ # Wire-format for a Status object
30605
+ class UtilStatusProto
30606
+ include Google::Apis::Core::Hashable
30607
+
30608
+ # The canonical error code (see codes.proto) that most closely corresponds to
30609
+ # this status. This may be missing, and in the common case of the generic space,
30610
+ # it definitely will be.
30611
+ # Corresponds to the JSON property `canonicalCode`
30612
+ # @return [Fixnum]
30613
+ attr_accessor :canonical_code
30614
+
30615
+ # Numeric code drawn from the space specified below. Often, this is the
30616
+ # canonical error space, and code is drawn from google3/util/task/codes.proto
30617
+ # Corresponds to the JSON property `code`
30618
+ # @return [Fixnum]
30619
+ attr_accessor :code
30620
+
30621
+ # Detail message
30622
+ # Corresponds to the JSON property `message`
30623
+ # @return [String]
30624
+ attr_accessor :message
30625
+
30626
+ # This is proto2's version of MessageSet.
30627
+ # Corresponds to the JSON property `messageSet`
30628
+ # @return [Google::Apis::AiplatformV1::Proto2BridgeMessageSet]
30629
+ attr_accessor :message_set
30630
+
30631
+ # The following are usually only present when code != 0 Space to which this
30632
+ # status belongs
30633
+ # Corresponds to the JSON property `space`
30634
+ # @return [String]
30635
+ attr_accessor :space
30636
+
30637
+ def initialize(**args)
30638
+ update!(**args)
30639
+ end
30640
+
30641
+ # Update properties of this object
30642
+ def update!(**args)
30643
+ @canonical_code = args[:canonical_code] if args.key?(:canonical_code)
30644
+ @code = args[:code] if args.key?(:code)
30645
+ @message = args[:message] if args.key?(:message)
30646
+ @message_set = args[:message_set] if args.key?(:message_set)
30647
+ @space = args[:space] if args.key?(:space)
30648
+ end
30649
+ end
27438
30650
  end
27439
30651
  end
27440
30652
  end