google-apis-aiplatform_v1 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -463,6 +463,12 @@ module Google
463
463
  # @return [String]
464
464
  attr_accessor :finish_reason
465
465
 
466
+ # Grounding metadata. Combine with the facts list from response to generate
467
+ # grounding citations for this choice.
468
+ # Corresponds to the JSON property `groundingMetadata`
469
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootGroundingMetadata]
470
+ attr_accessor :grounding_metadata
471
+
466
472
  # Index of the candidate.
467
473
  # Corresponds to the JSON property `index`
468
474
  # @return [Fixnum]
@@ -483,6 +489,7 @@ module Google
483
489
  @content = args[:content] if args.key?(:content)
484
490
  @finish_message = args[:finish_message] if args.key?(:finish_message)
485
491
  @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
492
+ @grounding_metadata = args[:grounding_metadata] if args.key?(:grounding_metadata)
486
493
  @index = args[:index] if args.key?(:index)
487
494
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
488
495
  end
@@ -588,6 +595,45 @@ module Google
588
595
  end
589
596
  end
590
597
 
598
+ # A condense version of WorldFact (assistant/boq/lamda/factuality/proto/
599
+ # factuality.proto) to propagate the essential information about the fact used
600
+ # in factuality to the upstream caller.
601
+ class CloudAiNlLlmProtoServiceFact
602
+ include Google::Apis::Core::Hashable
603
+
604
+ # Query that is used to retrieve this fact.
605
+ # Corresponds to the JSON property `query`
606
+ # @return [String]
607
+ attr_accessor :query
608
+
609
+ # If present, the summary/snippet of the fact.
610
+ # Corresponds to the JSON property `summary`
611
+ # @return [String]
612
+ attr_accessor :summary
613
+
614
+ # If present, it refers to the title of this fact.
615
+ # Corresponds to the JSON property `title`
616
+ # @return [String]
617
+ attr_accessor :title
618
+
619
+ # If present, this URL links to the webpage of the fact.
620
+ # Corresponds to the JSON property `url`
621
+ # @return [String]
622
+ attr_accessor :url
623
+
624
+ def initialize(**args)
625
+ update!(**args)
626
+ end
627
+
628
+ # Update properties of this object
629
+ def update!(**args)
630
+ @query = args[:query] if args.key?(:query)
631
+ @summary = args[:summary] if args.key?(:summary)
632
+ @title = args[:title] if args.key?(:title)
633
+ @url = args[:url] if args.key?(:url)
634
+ end
635
+ end
636
+
591
637
  # Function call details.
592
638
  class CloudAiNlLlmProtoServiceFunctionCall
593
639
  include Google::Apis::Core::Hashable
@@ -647,6 +693,17 @@ module Google
647
693
  # @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceCandidate>]
648
694
  attr_accessor :candidates
649
695
 
696
+ # Debug information containing message metadata. Clients should not consume this
697
+ # field, and this is only populated for Flow Runner path.
698
+ # Corresponds to the JSON property `debugMetadata`
699
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceMessageMetadata]
700
+ attr_accessor :debug_metadata
701
+
702
+ # External facts retrieved for factuality/grounding.
703
+ # Corresponds to the JSON property `facts`
704
+ # @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceFact>]
705
+ attr_accessor :facts
706
+
650
707
  # Content filter results for a prompt sent in the request.
651
708
  # Corresponds to the JSON property `promptFeedback`
652
709
  # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServicePromptFeedback]
@@ -669,12 +726,47 @@ module Google
669
726
  # Update properties of this object
670
727
  def update!(**args)
671
728
  @candidates = args[:candidates] if args.key?(:candidates)
729
+ @debug_metadata = args[:debug_metadata] if args.key?(:debug_metadata)
730
+ @facts = args[:facts] if args.key?(:facts)
672
731
  @prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
673
732
  @reporting_metrics = args[:reporting_metrics] if args.key?(:reporting_metrics)
674
733
  @usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
675
734
  end
676
735
  end
677
736
 
737
+ #
738
+ class CloudAiNlLlmProtoServiceMessageMetadata
739
+ include Google::Apis::Core::Hashable
740
+
741
+ # LINT.IfChange This metadata contains additional information required for
742
+ # debugging.
743
+ # Corresponds to the JSON property `inputFilterInfo`
744
+ # @return [Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata]
745
+ attr_accessor :input_filter_info
746
+
747
+ # Holds the final routing decision, by storing the model_config_id. And
748
+ # individual scores each model got.
749
+ # Corresponds to the JSON property `modelRoutingDecision`
750
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecision]
751
+ attr_accessor :model_routing_decision
752
+
753
+ # Filter metadata of the output messages.
754
+ # Corresponds to the JSON property `outputFilterInfo`
755
+ # @return [Array<Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata>]
756
+ attr_accessor :output_filter_info
757
+
758
+ def initialize(**args)
759
+ update!(**args)
760
+ end
761
+
762
+ # Update properties of this object
763
+ def update!(**args)
764
+ @input_filter_info = args[:input_filter_info] if args.key?(:input_filter_info)
765
+ @model_routing_decision = args[:model_routing_decision] if args.key?(:model_routing_decision)
766
+ @output_filter_info = args[:output_filter_info] if args.key?(:output_filter_info)
767
+ end
768
+ end
769
+
678
770
  # A single part of a message.
679
771
  class CloudAiNlLlmProtoServicePart
680
772
  include Google::Apis::Core::Hashable
@@ -790,6 +882,11 @@ module Google
790
882
  # @return [String]
791
883
  attr_accessor :end_offset
792
884
 
885
+ # Internal only fields
886
+ # Corresponds to the JSON property `modelLevelMetaData`
887
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServicePartVideoMetadataModelLevelMetadata]
888
+ attr_accessor :model_level_meta_data
889
+
793
890
  # The start offset of the video.
794
891
  # Corresponds to the JSON property `startOffset`
795
892
  # @return [String]
@@ -802,10 +899,36 @@ module Google
802
899
  # Update properties of this object
803
900
  def update!(**args)
804
901
  @end_offset = args[:end_offset] if args.key?(:end_offset)
902
+ @model_level_meta_data = args[:model_level_meta_data] if args.key?(:model_level_meta_data)
805
903
  @start_offset = args[:start_offset] if args.key?(:start_offset)
806
904
  end
807
905
  end
808
906
 
907
+ # Internal only fields
908
+ class CloudAiNlLlmProtoServicePartVideoMetadataModelLevelMetadata
909
+ include Google::Apis::Core::Hashable
910
+
911
+ # Frame rate to decode from this video.
912
+ # Corresponds to the JSON property `fps`
913
+ # @return [Float]
914
+ attr_accessor :fps
915
+
916
+ # Number of frames to decode from this video.
917
+ # Corresponds to the JSON property `numFrames`
918
+ # @return [Fixnum]
919
+ attr_accessor :num_frames
920
+
921
+ def initialize(**args)
922
+ update!(**args)
923
+ end
924
+
925
+ # Update properties of this object
926
+ def update!(**args)
927
+ @fps = args[:fps] if args.key?(:fps)
928
+ @num_frames = args[:num_frames] if args.key?(:num_frames)
929
+ end
930
+ end
931
+
809
932
  # Content filter results for a prompt sent in the request.
810
933
  class CloudAiNlLlmProtoServicePromptFeedback
811
934
  include Google::Apis::Core::Hashable
@@ -837,6 +960,122 @@ module Google
837
960
  end
838
961
  end
839
962
 
963
+ # The RAI results for a given text.
964
+ class CloudAiNlLlmProtoServiceRaiResult
965
+ include Google::Apis::Core::Hashable
966
+
967
+ # The recitation result for one input
968
+ # Corresponds to the JSON property `aidaRecitationResult`
969
+ # @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoRecitationResult]
970
+ attr_accessor :aida_recitation_result
971
+
972
+ # Use `triggered_blocklist`.
973
+ # Corresponds to the JSON property `blocked`
974
+ # @return [Boolean]
975
+ attr_accessor :blocked
976
+ alias_method :blocked?, :blocked
977
+
978
+ # The error codes indicate which RAI filters block the response.
979
+ # Corresponds to the JSON property `errorCodes`
980
+ # @return [Array<Fixnum>]
981
+ attr_accessor :error_codes
982
+
983
+ # Whether the text should be filtered and not shown to the end user. This is
984
+ # determined based on a combination of `triggered_recitation`, `
985
+ # triggered_blocklist`, `language_filter_result`, and `triggered_safety_filter`.
986
+ # Corresponds to the JSON property `filtered`
987
+ # @return [Boolean]
988
+ attr_accessor :filtered
989
+ alias_method :filtered?, :filtered
990
+
991
+ # Language filter result from SAFT LangId.
992
+ # Corresponds to the JSON property `languageFilterResult`
993
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootLanguageFilterResult]
994
+ attr_accessor :language_filter_result
995
+
996
+ # The RAI signals for the text.
997
+ # Corresponds to the JSON property `raiSignals`
998
+ # @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal>]
999
+ attr_accessor :rai_signals
1000
+
1001
+ # Whether the text triggered the blocklist.
1002
+ # Corresponds to the JSON property `triggeredBlocklist`
1003
+ # @return [Boolean]
1004
+ attr_accessor :triggered_blocklist
1005
+ alias_method :triggered_blocklist?, :triggered_blocklist
1006
+
1007
+ # Whether the text should be blocked by the recitation result from Aida
1008
+ # recitation checker. It is determined from aida_recitation_result.
1009
+ # Corresponds to the JSON property `triggeredRecitation`
1010
+ # @return [Boolean]
1011
+ attr_accessor :triggered_recitation
1012
+ alias_method :triggered_recitation?, :triggered_recitation
1013
+
1014
+ # Whether the text triggered the safety filter. Currently, this is due to CSAI
1015
+ # triggering or one of four categories (derogatory, sexual, toxic, violent)
1016
+ # having a score over the filter threshold.
1017
+ # Corresponds to the JSON property `triggeredSafetyFilter`
1018
+ # @return [Boolean]
1019
+ attr_accessor :triggered_safety_filter
1020
+ alias_method :triggered_safety_filter?, :triggered_safety_filter
1021
+
1022
+ def initialize(**args)
1023
+ update!(**args)
1024
+ end
1025
+
1026
+ # Update properties of this object
1027
+ def update!(**args)
1028
+ @aida_recitation_result = args[:aida_recitation_result] if args.key?(:aida_recitation_result)
1029
+ @blocked = args[:blocked] if args.key?(:blocked)
1030
+ @error_codes = args[:error_codes] if args.key?(:error_codes)
1031
+ @filtered = args[:filtered] if args.key?(:filtered)
1032
+ @language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
1033
+ @rai_signals = args[:rai_signals] if args.key?(:rai_signals)
1034
+ @triggered_blocklist = args[:triggered_blocklist] if args.key?(:triggered_blocklist)
1035
+ @triggered_recitation = args[:triggered_recitation] if args.key?(:triggered_recitation)
1036
+ @triggered_safety_filter = args[:triggered_safety_filter] if args.key?(:triggered_safety_filter)
1037
+ end
1038
+ end
1039
+
1040
+ # An RAI signal for a single category.
1041
+ class CloudAiNlLlmProtoServiceRaiSignal
1042
+ include Google::Apis::Core::Hashable
1043
+
1044
+ # The confidence level for the RAI category.
1045
+ # Corresponds to the JSON property `confidence`
1046
+ # @return [String]
1047
+ attr_accessor :confidence
1048
+
1049
+ # Whether the category is flagged as being present. Currently, this is set to
1050
+ # true if score >= 0.5.
1051
+ # Corresponds to the JSON property `flagged`
1052
+ # @return [Boolean]
1053
+ attr_accessor :flagged
1054
+ alias_method :flagged?, :flagged
1055
+
1056
+ # The RAI category.
1057
+ # Corresponds to the JSON property `raiCategory`
1058
+ # @return [String]
1059
+ attr_accessor :rai_category
1060
+
1061
+ # The score for the category, in the range [0.0, 1.0].
1062
+ # Corresponds to the JSON property `score`
1063
+ # @return [Float]
1064
+ attr_accessor :score
1065
+
1066
+ def initialize(**args)
1067
+ update!(**args)
1068
+ end
1069
+
1070
+ # Update properties of this object
1071
+ def update!(**args)
1072
+ @confidence = args[:confidence] if args.key?(:confidence)
1073
+ @flagged = args[:flagged] if args.key?(:flagged)
1074
+ @rai_category = args[:rai_category] if args.key?(:rai_category)
1075
+ @score = args[:score] if args.key?(:score)
1076
+ end
1077
+ end
1078
+
840
1079
  # Safety rating corresponding to the generated content.
841
1080
  class CloudAiNlLlmProtoServiceSafetyRating
842
1081
  include Google::Apis::Core::Hashable
@@ -3722,6 +3961,13 @@ module Google
3722
3961
  # @return [String]
3723
3962
  attr_accessor :pipeline_job_id
3724
3963
 
3964
+ # Optional. Whether to do component level validations before job creation.
3965
+ # Currently we only support Google First Party Component/Pipelines.
3966
+ # Corresponds to the JSON property `preflightValidations`
3967
+ # @return [Boolean]
3968
+ attr_accessor :preflight_validations
3969
+ alias_method :preflight_validations?, :preflight_validations
3970
+
3725
3971
  def initialize(**args)
3726
3972
  update!(**args)
3727
3973
  end
@@ -3731,6 +3977,7 @@ module Google
3731
3977
  @parent = args[:parent] if args.key?(:parent)
3732
3978
  @pipeline_job = args[:pipeline_job] if args.key?(:pipeline_job)
3733
3979
  @pipeline_job_id = args[:pipeline_job_id] if args.key?(:pipeline_job_id)
3980
+ @preflight_validations = args[:preflight_validations] if args.key?(:preflight_validations)
3734
3981
  end
3735
3982
  end
3736
3983
 
@@ -6366,8 +6613,15 @@ module Google
6366
6613
  # Models that predict multiple outputs, such as multiclass Models that predict
6367
6614
  # multiple classes, each element explains one specific item. Attribution.
6368
6615
  # output_index can be used to identify which output this attribution is
6369
- # explaining. If users set ExplanationParameters.top_k, the attributions are
6370
- # sorted by instance_output_value in descending order. If ExplanationParameters.
6616
+ # explaining. By default, we provide Shapley values for the predicted class.
6617
+ # However, you can configure the explanation request to generate Shapley values
6618
+ # for any other classes too. For example, if a model predicts a probability of `
6619
+ # 0.4` for approving a loan application, the model's decision is to reject the
6620
+ # application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default
6621
+ # Shapley values would be computed for rejection decision and not approval, even
6622
+ # though the latter might be the positive class. If users set
6623
+ # ExplanationParameters.top_k, the attributions are sorted by
6624
+ # instance_output_value in descending order. If ExplanationParameters.
6371
6625
  # output_indices is specified, the attributions are stored by Attribution.
6372
6626
  # output_index in the same order as they appear in the output_indices.
6373
6627
  # Corresponds to the JSON property `attributions`
@@ -9141,12 +9395,6 @@ module Google
9141
9395
  # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
9142
9396
  attr_accessor :contents
9143
9397
 
9144
- # Required. The name of the Endpoint requested to serve the prediction. Format: `
9145
- # projects/`project`/locations/`location`/endpoints/`endpoint``
9146
- # Corresponds to the JSON property `endpoint`
9147
- # @return [String]
9148
- attr_accessor :endpoint
9149
-
9150
9398
  # Generation config.
9151
9399
  # Corresponds to the JSON property `generationConfig`
9152
9400
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
@@ -9173,7 +9421,6 @@ module Google
9173
9421
  # Update properties of this object
9174
9422
  def update!(**args)
9175
9423
  @contents = args[:contents] if args.key?(:contents)
9176
- @endpoint = args[:endpoint] if args.key?(:endpoint)
9177
9424
  @generation_config = args[:generation_config] if args.key?(:generation_config)
9178
9425
  @safety_settings = args[:safety_settings] if args.key?(:safety_settings)
9179
9426
  @tools = args[:tools] if args.key?(:tools)
@@ -10241,6 +10488,12 @@ module Google
10241
10488
  # @return [String]
10242
10489
  attr_accessor :match_grpc_address
10243
10490
 
10491
+ # Output only. PscAutomatedEndpoints is populated if private service connect is
10492
+ # enabled if PscAutomatedConfig is set.
10493
+ # Corresponds to the JSON property `pscAutomatedEndpoints`
10494
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PscAutomatedEndpoints>]
10495
+ attr_accessor :psc_automated_endpoints
10496
+
10244
10497
  # Output only. The name of the service attachment resource. Populated if private
10245
10498
  # service connect is enabled.
10246
10499
  # Corresponds to the JSON property `serviceAttachment`
@@ -10254,6 +10507,7 @@ module Google
10254
10507
  # Update properties of this object
10255
10508
  def update!(**args)
10256
10509
  @match_grpc_address = args[:match_grpc_address] if args.key?(:match_grpc_address)
10510
+ @psc_automated_endpoints = args[:psc_automated_endpoints] if args.key?(:psc_automated_endpoints)
10257
10511
  @service_attachment = args[:service_attachment] if args.key?(:service_attachment)
10258
10512
  end
10259
10513
  end
@@ -15506,6 +15760,11 @@ module Google
15506
15760
  class GoogleCloudAiplatformV1PipelineJobRuntimeConfig
15507
15761
  include Google::Apis::Core::Hashable
15508
15762
 
15763
+ # The default runtime for the PipelineJob.
15764
+ # Corresponds to the JSON property `defaultRuntime`
15765
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime]
15766
+ attr_accessor :default_runtime
15767
+
15509
15768
  # Represents the failure policy of a pipeline. Currently, the default of a
15510
15769
  # pipeline is that the pipeline will continue to run until no more tasks can be
15511
15770
  # executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a
@@ -15556,6 +15815,7 @@ module Google
15556
15815
 
15557
15816
  # Update properties of this object
15558
15817
  def update!(**args)
15818
+ @default_runtime = args[:default_runtime] if args.key?(:default_runtime)
15559
15819
  @failure_policy = args[:failure_policy] if args.key?(:failure_policy)
15560
15820
  @gcs_output_directory = args[:gcs_output_directory] if args.key?(:gcs_output_directory)
15561
15821
  @input_artifacts = args[:input_artifacts] if args.key?(:input_artifacts)
@@ -15564,6 +15824,26 @@ module Google
15564
15824
  end
15565
15825
  end
15566
15826
 
15827
+ # The default runtime for the PipelineJob.
15828
+ class GoogleCloudAiplatformV1PipelineJobRuntimeConfigDefaultRuntime
15829
+ include Google::Apis::Core::Hashable
15830
+
15831
+ # Persistent resource based runtime detail. For more information, refer to https:
15832
+ # //cloud.google.com/vertex-ai/docs/training/persistent-resource-overview
15833
+ # Corresponds to the JSON property `persistentResourceRuntimeDetail`
15834
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail]
15835
+ attr_accessor :persistent_resource_runtime_detail
15836
+
15837
+ def initialize(**args)
15838
+ update!(**args)
15839
+ end
15840
+
15841
+ # Update properties of this object
15842
+ def update!(**args)
15843
+ @persistent_resource_runtime_detail = args[:persistent_resource_runtime_detail] if args.key?(:persistent_resource_runtime_detail)
15844
+ end
15845
+ end
15846
+
15567
15847
  # The type of an input artifact.
15568
15848
  class GoogleCloudAiplatformV1PipelineJobRuntimeConfigInputArtifact
15569
15849
  include Google::Apis::Core::Hashable
@@ -15586,6 +15866,27 @@ module Google
15586
15866
  end
15587
15867
  end
15588
15868
 
15869
+ # Persistent resource based runtime detail. For more information, refer to https:
15870
+ # //cloud.google.com/vertex-ai/docs/training/persistent-resource-overview
15871
+ class GoogleCloudAiplatformV1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail
15872
+ include Google::Apis::Core::Hashable
15873
+
15874
+ # Persistent resource name. Format: `projects/`project`/locations/`location`/
15875
+ # persistentResources/`persistent_resource``
15876
+ # Corresponds to the JSON property `persistentResourceName`
15877
+ # @return [String]
15878
+ attr_accessor :persistent_resource_name
15879
+
15880
+ def initialize(**args)
15881
+ update!(**args)
15882
+ end
15883
+
15884
+ # Update properties of this object
15885
+ def update!(**args)
15886
+ @persistent_resource_name = args[:persistent_resource_name] if args.key?(:persistent_resource_name)
15887
+ end
15888
+ end
15889
+
15589
15890
  # The runtime detail of a task execution.
15590
15891
  class GoogleCloudAiplatformV1PipelineTaskDetail
15591
15892
  include Google::Apis::Core::Hashable
@@ -16235,6 +16536,38 @@ module Google
16235
16536
  end
16236
16537
  end
16237
16538
 
16539
+ # PscAutomatedEndpoints defines the output of the forwarding rule automatically
16540
+ # created by each PscAutomationConfig.
16541
+ class GoogleCloudAiplatformV1PscAutomatedEndpoints
16542
+ include Google::Apis::Core::Hashable
16543
+
16544
+ # Ip Address created by the automated forwarding rule.
16545
+ # Corresponds to the JSON property `matchAddress`
16546
+ # @return [String]
16547
+ attr_accessor :match_address
16548
+
16549
+ # Corresponding network in pscAutomationConfigs.
16550
+ # Corresponds to the JSON property `network`
16551
+ # @return [String]
16552
+ attr_accessor :network
16553
+
16554
+ # Corresponding project_id in pscAutomationConfigs
16555
+ # Corresponds to the JSON property `projectId`
16556
+ # @return [String]
16557
+ attr_accessor :project_id
16558
+
16559
+ def initialize(**args)
16560
+ update!(**args)
16561
+ end
16562
+
16563
+ # Update properties of this object
16564
+ def update!(**args)
16565
+ @match_address = args[:match_address] if args.key?(:match_address)
16566
+ @network = args[:network] if args.key?(:network)
16567
+ @project_id = args[:project_id] if args.key?(:project_id)
16568
+ end
16569
+ end
16570
+
16238
16571
  # A Model Garden Publisher Model.
16239
16572
  class GoogleCloudAiplatformV1PublisherModel
16240
16573
  include Google::Apis::Core::Hashable
@@ -16334,6 +16667,11 @@ module Google
16334
16667
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences]
16335
16668
  attr_accessor :open_fine_tuning_pipeline
16336
16669
 
16670
+ # Open fine tuning pipelines.
16671
+ # Corresponds to the JSON property `openFineTuningPipelines`
16672
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines]
16673
+ attr_accessor :open_fine_tuning_pipelines
16674
+
16337
16675
  # The regional resource name or the URI. Key is region, e.g., us-central1,
16338
16676
  # europe-west2, global, etc..
16339
16677
  # Corresponds to the JSON property `openGenerationAiStudio`
@@ -16352,6 +16690,11 @@ module Google
16352
16690
  # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences]
16353
16691
  attr_accessor :open_notebook
16354
16692
 
16693
+ # Open notebooks.
16694
+ # Corresponds to the JSON property `openNotebooks`
16695
+ # @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks]
16696
+ attr_accessor :open_notebooks
16697
+
16355
16698
  # The regional resource name or the URI. Key is region, e.g., us-central1,
16356
16699
  # europe-west2, global, etc..
16357
16700
  # Corresponds to the JSON property `openPromptTuningPipeline`
@@ -16379,9 +16722,11 @@ module Google
16379
16722
  @deploy = args[:deploy] if args.key?(:deploy)
16380
16723
  @open_evaluation_pipeline = args[:open_evaluation_pipeline] if args.key?(:open_evaluation_pipeline)
16381
16724
  @open_fine_tuning_pipeline = args[:open_fine_tuning_pipeline] if args.key?(:open_fine_tuning_pipeline)
16725
+ @open_fine_tuning_pipelines = args[:open_fine_tuning_pipelines] if args.key?(:open_fine_tuning_pipelines)
16382
16726
  @open_generation_ai_studio = args[:open_generation_ai_studio] if args.key?(:open_generation_ai_studio)
16383
16727
  @open_genie = args[:open_genie] if args.key?(:open_genie)
16384
16728
  @open_notebook = args[:open_notebook] if args.key?(:open_notebook)
16729
+ @open_notebooks = args[:open_notebooks] if args.key?(:open_notebooks)
16385
16730
  @open_prompt_tuning_pipeline = args[:open_prompt_tuning_pipeline] if args.key?(:open_prompt_tuning_pipeline)
16386
16731
  @request_access = args[:request_access] if args.key?(:request_access)
16387
16732
  @view_rest_api = args[:view_rest_api] if args.key?(:view_rest_api)
@@ -16465,6 +16810,44 @@ module Google
16465
16810
  end
16466
16811
  end
16467
16812
 
16813
+ # Open fine tuning pipelines.
16814
+ class GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines
16815
+ include Google::Apis::Core::Hashable
16816
+
16817
+ # Required. Regional resource references to fine tuning pipelines.
16818
+ # Corresponds to the JSON property `fineTuningPipelines`
16819
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences>]
16820
+ attr_accessor :fine_tuning_pipelines
16821
+
16822
+ def initialize(**args)
16823
+ update!(**args)
16824
+ end
16825
+
16826
+ # Update properties of this object
16827
+ def update!(**args)
16828
+ @fine_tuning_pipelines = args[:fine_tuning_pipelines] if args.key?(:fine_tuning_pipelines)
16829
+ end
16830
+ end
16831
+
16832
+ # Open notebooks.
16833
+ class GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks
16834
+ include Google::Apis::Core::Hashable
16835
+
16836
+ # Required. Regional resource references to notebooks.
16837
+ # Corresponds to the JSON property `notebooks`
16838
+ # @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences>]
16839
+ attr_accessor :notebooks
16840
+
16841
+ def initialize(**args)
16842
+ update!(**args)
16843
+ end
16844
+
16845
+ # Update properties of this object
16846
+ def update!(**args)
16847
+ @notebooks = args[:notebooks] if args.key?(:notebooks)
16848
+ end
16849
+ end
16850
+
16468
16851
  # The regional resource name or the URI. Key is region, e.g., us-central1,
16469
16852
  # europe-west2, global, etc..
16470
16853
  class GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences
@@ -16475,7 +16858,22 @@ module Google
16475
16858
  # @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelResourceReference>]
16476
16859
  attr_accessor :references
16477
16860
 
16478
- # Required. The title of the regional resource reference.
16861
+ # Optional. Description of the resource.
16862
+ # Corresponds to the JSON property `resourceDescription`
16863
+ # @return [String]
16864
+ attr_accessor :resource_description
16865
+
16866
+ # Optional. Title of the resource.
16867
+ # Corresponds to the JSON property `resourceTitle`
16868
+ # @return [String]
16869
+ attr_accessor :resource_title
16870
+
16871
+ # Optional. Use case (CUJ) of the resource.
16872
+ # Corresponds to the JSON property `resourceUseCase`
16873
+ # @return [String]
16874
+ attr_accessor :resource_use_case
16875
+
16876
+ # Required.
16479
16877
  # Corresponds to the JSON property `title`
16480
16878
  # @return [String]
16481
16879
  attr_accessor :title
@@ -16487,6 +16885,9 @@ module Google
16487
16885
  # Update properties of this object
16488
16886
  def update!(**args)
16489
16887
  @references = args[:references] if args.key?(:references)
16888
+ @resource_description = args[:resource_description] if args.key?(:resource_description)
16889
+ @resource_title = args[:resource_title] if args.key?(:resource_title)
16890
+ @resource_use_case = args[:resource_use_case] if args.key?(:resource_use_case)
16490
16891
  @title = args[:title] if args.key?(:title)
16491
16892
  end
16492
16893
  end
@@ -19633,7 +20034,7 @@ module Google
19633
20034
  attr_accessor :enterprise_datastore
19634
20035
 
19635
20036
  # The grounding text passed inline with the Predict API. It can support up to 1
19636
- # million token context.
20037
+ # million bytes.
19637
20038
  # Corresponds to the JSON property `inlineContext`
19638
20039
  # @return [String]
19639
20040
  attr_accessor :inline_context
@@ -24426,6 +24827,40 @@ module Google
24426
24827
  end
24427
24828
  end
24428
24829
 
24830
+ # Request message for PredictionService.StreamRawPredict.
24831
+ class GoogleCloudAiplatformV1StreamRawPredictRequest
24832
+ include Google::Apis::Core::Hashable
24833
+
24834
+ # Message that represents an arbitrary HTTP body. It should only be used for
24835
+ # payload formats that can't be represented as JSON, such as raw binary or an
24836
+ # HTML page. This message can be used both in streaming and non-streaming API
24837
+ # methods in the request as well as the response. It can be used as a top-level
24838
+ # request field, which is convenient if one wants to extract parameters from
24839
+ # either the URL or HTTP template into the request fields and also want access
24840
+ # to the raw HTTP body. Example: message GetResourceRequest ` // A unique
24841
+ # request id. string request_id = 1; // The raw HTTP body is bound to this field.
24842
+ # google.api.HttpBody http_body = 2; ` service ResourceService ` rpc
24843
+ # GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc
24844
+ # UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); ` Example
24845
+ # with streaming methods: service CaldavService ` rpc GetCalendar(stream google.
24846
+ # api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream
24847
+ # google.api.HttpBody) returns (stream google.api.HttpBody); ` Use of this type
24848
+ # only changes how the request and response bodies are handled, all other
24849
+ # features will continue to work unchanged.
24850
+ # Corresponds to the JSON property `httpBody`
24851
+ # @return [Google::Apis::AiplatformV1::GoogleApiHttpBody]
24852
+ attr_accessor :http_body
24853
+
24854
+ def initialize(**args)
24855
+ update!(**args)
24856
+ end
24857
+
24858
+ # Update properties of this object
24859
+ def update!(**args)
24860
+ @http_body = args[:http_body] if args.key?(:http_body)
24861
+ end
24862
+ end
24863
+
24429
24864
  # Request message for PredictionService.StreamingPredict. The first message must
24430
24865
  # contain endpoint field and optionally input. The subsequent messages must
24431
24866
  # contain input.
@@ -27508,7 +27943,10 @@ module Google
27508
27943
  attr_accessor :members
27509
27944
 
27510
27945
  # Role that is assigned to the list of `members`, or principals. For example, `
27511
- # roles/viewer`, `roles/editor`, or `roles/owner`.
27946
+ # roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM
27947
+ # roles and permissions, see the [IAM documentation](https://cloud.google.com/
27948
+ # iam/docs/roles-overview). For a list of the available pre-defined roles, see [
27949
+ # here](https://cloud.google.com/iam/docs/understanding-roles).
27512
27950
  # Corresponds to the JSON property `role`
27513
27951
  # @return [String]
27514
27952
  attr_accessor :role
@@ -28164,6 +28602,2377 @@ module Google
28164
28602
  @metric_entries = args[:metric_entries] if args.key?(:metric_entries)
28165
28603
  end
28166
28604
  end
28605
+
28606
+ # The proto defines the attribution information for a document using whatever
28607
+ # fields are most applicable for that document's datasource. For example, a
28608
+ # Wikipedia article's attribution is in the form of its article title, a website
28609
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28610
+ # id: 30
28611
+ class LanguageLabsAidaTrustRecitationProtoDocAttribution
28612
+ include Google::Apis::Core::Hashable
28613
+
28614
+ #
28615
+ # Corresponds to the JSON property `amarnaId`
28616
+ # @return [String]
28617
+ attr_accessor :amarna_id
28618
+
28619
+ #
28620
+ # Corresponds to the JSON property `arxivId`
28621
+ # @return [String]
28622
+ attr_accessor :arxiv_id
28623
+
28624
+ #
28625
+ # Corresponds to the JSON property `author`
28626
+ # @return [String]
28627
+ attr_accessor :author
28628
+
28629
+ #
28630
+ # Corresponds to the JSON property `bibkey`
28631
+ # @return [String]
28632
+ attr_accessor :bibkey
28633
+
28634
+ # ID of the paper in bioarxiv like ddoi.org/`biorxiv_id` eg: https://doi.org/10.
28635
+ # 1101/343517
28636
+ # Corresponds to the JSON property `biorxivId`
28637
+ # @return [String]
28638
+ attr_accessor :biorxiv_id
28639
+
28640
+ #
28641
+ # Corresponds to the JSON property `bookTitle`
28642
+ # @return [String]
28643
+ attr_accessor :book_title
28644
+
28645
+ # The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
28646
+ # of a book. There is a deterministic function from a volume id to a URL under
28647
+ # the books.google.com domain. Marked as 'optional' since a volume ID of zero is
28648
+ # potentially possible and we want to distinguish that from the volume ID not
28649
+ # being set.
28650
+ # Corresponds to the JSON property `bookVolumeId`
28651
+ # @return [Fixnum]
28652
+ attr_accessor :book_volume_id
28653
+
28654
+ #
28655
+ # Corresponds to the JSON property `category`
28656
+ # @return [String]
28657
+ attr_accessor :category
28658
+
28659
+ #
28660
+ # Corresponds to the JSON property `conversationId`
28661
+ # @return [String]
28662
+ attr_accessor :conversation_id
28663
+
28664
+ # The dataset this document comes from.
28665
+ # Corresponds to the JSON property `dataset`
28666
+ # @return [String]
28667
+ attr_accessor :dataset
28668
+
28669
+ #
28670
+ # Corresponds to the JSON property `filepath`
28671
+ # @return [String]
28672
+ attr_accessor :filepath
28673
+
28674
+ #
28675
+ # Corresponds to the JSON property `geminiId`
28676
+ # @return [String]
28677
+ attr_accessor :gemini_id
28678
+
28679
+ #
28680
+ # Corresponds to the JSON property `gnewsArticleTitle`
28681
+ # @return [String]
28682
+ attr_accessor :gnews_article_title
28683
+
28684
+ #
28685
+ # Corresponds to the JSON property `goodallExampleId`
28686
+ # @return [String]
28687
+ attr_accessor :goodall_example_id
28688
+
28689
+ # Whether the document is opted out.
28690
+ # Corresponds to the JSON property `isOptOut`
28691
+ # @return [Boolean]
28692
+ attr_accessor :is_opt_out
28693
+ alias_method :is_opt_out?, :is_opt_out
28694
+
28695
+ #
28696
+ # Corresponds to the JSON property `isPrompt`
28697
+ # @return [Boolean]
28698
+ attr_accessor :is_prompt
28699
+ alias_method :is_prompt?, :is_prompt
28700
+
28701
+ #
28702
+ # Corresponds to the JSON property `lamdaExampleId`
28703
+ # @return [String]
28704
+ attr_accessor :lamda_example_id
28705
+
28706
+ #
28707
+ # Corresponds to the JSON property `license`
28708
+ # @return [String]
28709
+ attr_accessor :license
28710
+
28711
+ #
28712
+ # Corresponds to the JSON property `meenaConversationId`
28713
+ # @return [String]
28714
+ attr_accessor :meena_conversation_id
28715
+
28716
+ # Natural (not programming) language of the document. Language code as defined
28717
+ # by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
28718
+ # html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
28719
+ # & read language fields. See go/iii.
28720
+ # Corresponds to the JSON property `naturalLanguageCode`
28721
+ # @return [String]
28722
+ attr_accessor :natural_language_code
28723
+
28724
+ # True if this doc has no attribution information available. We use an explicit
28725
+ # field for this instead of just implicitly leaving all the DocAttribution
28726
+ # fields blank to distinguish a case where a bug/oversight has left the
28727
+ # attribution information empty vs when we really have no attribution
28728
+ # information available.
28729
+ # Corresponds to the JSON property `noAttribution`
28730
+ # @return [Boolean]
28731
+ attr_accessor :no_attribution
28732
+ alias_method :no_attribution?, :no_attribution
28733
+
28734
+ #
28735
+ # Corresponds to the JSON property `podcastUtteranceId`
28736
+ # @return [String]
28737
+ attr_accessor :podcast_utterance_id
28738
+
28739
+ # Represents a whole or partial calendar date, such as a birthday. The time of
28740
+ # day and time zone are either specified elsewhere or are insignificant. The
28741
+ # date is relative to the Gregorian Calendar. This can represent one of the
28742
+ # following: * A full date, with non-zero year, month, and day values. * A month
28743
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
28744
+ # with a zero month and a zero day. * A year and month, with a zero day (for
28745
+ # example, a credit card expiration date). Related types: * google.type.
28746
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
28747
+ # Corresponds to the JSON property `publicationDate`
28748
+ # @return [Google::Apis::AiplatformV1::GoogleTypeDate]
28749
+ attr_accessor :publication_date
28750
+
28751
+ # This field is for opt-out experiment only, MUST never be used during actual
28752
+ # production/serving.
28753
+ # Corresponds to the JSON property `qualityScoreExperimentOnly`
28754
+ # @return [Float]
28755
+ attr_accessor :quality_score_experiment_only
28756
+
28757
+ # Github repository
28758
+ # Corresponds to the JSON property `repo`
28759
+ # @return [String]
28760
+ attr_accessor :repo
28761
+
28762
+ # URL of a webdoc
28763
+ # Corresponds to the JSON property `url`
28764
+ # @return [String]
28765
+ attr_accessor :url
28766
+
28767
+ #
28768
+ # Corresponds to the JSON property `volumeId`
28769
+ # @return [String]
28770
+ attr_accessor :volume_id
28771
+
28772
+ # Wikipedia article title. The Wikipedia TFDS dataset includes article titles
28773
+ # but not URLs. While a URL is to the best of our knowledge a deterministic
28774
+ # function of the title, we store the original title to reflect the information
28775
+ # in the original dataset.
28776
+ # Corresponds to the JSON property `wikipediaArticleTitle`
28777
+ # @return [String]
28778
+ attr_accessor :wikipedia_article_title
28779
+
28780
+ # The unique video id from Youtube. Example: AkoGsW52Ir0
28781
+ # Corresponds to the JSON property `youtubeVideoId`
28782
+ # @return [String]
28783
+ attr_accessor :youtube_video_id
28784
+
28785
+ def initialize(**args)
28786
+ update!(**args)
28787
+ end
28788
+
28789
+ # Update properties of this object
28790
+ def update!(**args)
28791
+ @amarna_id = args[:amarna_id] if args.key?(:amarna_id)
28792
+ @arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
28793
+ @author = args[:author] if args.key?(:author)
28794
+ @bibkey = args[:bibkey] if args.key?(:bibkey)
28795
+ @biorxiv_id = args[:biorxiv_id] if args.key?(:biorxiv_id)
28796
+ @book_title = args[:book_title] if args.key?(:book_title)
28797
+ @book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
28798
+ @category = args[:category] if args.key?(:category)
28799
+ @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
28800
+ @dataset = args[:dataset] if args.key?(:dataset)
28801
+ @filepath = args[:filepath] if args.key?(:filepath)
28802
+ @gemini_id = args[:gemini_id] if args.key?(:gemini_id)
28803
+ @gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
28804
+ @goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
28805
+ @is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
28806
+ @is_prompt = args[:is_prompt] if args.key?(:is_prompt)
28807
+ @lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
28808
+ @license = args[:license] if args.key?(:license)
28809
+ @meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
28810
+ @natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
28811
+ @no_attribution = args[:no_attribution] if args.key?(:no_attribution)
28812
+ @podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
28813
+ @publication_date = args[:publication_date] if args.key?(:publication_date)
28814
+ @quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
28815
+ @repo = args[:repo] if args.key?(:repo)
28816
+ @url = args[:url] if args.key?(:url)
28817
+ @volume_id = args[:volume_id] if args.key?(:volume_id)
28818
+ @wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
28819
+ @youtube_video_id = args[:youtube_video_id] if args.key?(:youtube_video_id)
28820
+ end
28821
+ end
28822
+
28823
+ # The recitation result for one input
28824
+ class LanguageLabsAidaTrustRecitationProtoRecitationResult
28825
+ include Google::Apis::Core::Hashable
28826
+
28827
+ #
28828
+ # Corresponds to the JSON property `dynamicSegmentResults`
28829
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28830
+ attr_accessor :dynamic_segment_results
28831
+
28832
+ # The recitation action for one given input. When its segments contain different
28833
+ # actions, the overall action will be returned in the precedence of BLOCK > CITE
28834
+ # > NO_ACTION.
28835
+ # Corresponds to the JSON property `recitationAction`
28836
+ # @return [String]
28837
+ attr_accessor :recitation_action
28838
+
28839
+ #
28840
+ # Corresponds to the JSON property `trainingSegmentResults`
28841
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28842
+ attr_accessor :training_segment_results
28843
+
28844
+ def initialize(**args)
28845
+ update!(**args)
28846
+ end
28847
+
28848
+ # Update properties of this object
28849
+ def update!(**args)
28850
+ @dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
28851
+ @recitation_action = args[:recitation_action] if args.key?(:recitation_action)
28852
+ @training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
28853
+ end
28854
+ end
28855
+
28856
+ # The recitation result for each segment in a given input.
28857
+ class LanguageLabsAidaTrustRecitationProtoSegmentResult
28858
+ include Google::Apis::Core::Hashable
28859
+
28860
+ # The dataset the segment came from.
28861
+ # Corresponds to the JSON property `attributionDataset`
28862
+ # @return [String]
28863
+ attr_accessor :attribution_dataset
28864
+
28865
+ # human-friendly string that contains information from doc_attribution which
28866
+ # could be shown by clients
28867
+ # Corresponds to the JSON property `displayAttributionMessage`
28868
+ # @return [String]
28869
+ attr_accessor :display_attribution_message
28870
+
28871
+ # The proto defines the attribution information for a document using whatever
28872
+ # fields are most applicable for that document's datasource. For example, a
28873
+ # Wikipedia article's attribution is in the form of its article title, a website
28874
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28875
+ # id: 30
28876
+ # Corresponds to the JSON property `docAttribution`
28877
+ # @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoDocAttribution]
28878
+ attr_accessor :doc_attribution
28879
+
28880
+ # number of documents that contained this segment
28881
+ # Corresponds to the JSON property `docOccurrences`
28882
+ # @return [Fixnum]
28883
+ attr_accessor :doc_occurrences
28884
+
28885
+ #
28886
+ # Corresponds to the JSON property `endIndex`
28887
+ # @return [Fixnum]
28888
+ attr_accessor :end_index
28889
+
28890
+ # The raw text in the given input that is corresponding to the segment. It will
28891
+ # be available only when 'return_segment_raw_text' is enabled in the request
28892
+ # options.
28893
+ # Corresponds to the JSON property `rawText`
28894
+ # @return [String]
28895
+ attr_accessor :raw_text
28896
+
28897
+ #
28898
+ # Corresponds to the JSON property `segmentRecitationAction`
28899
+ # @return [String]
28900
+ attr_accessor :segment_recitation_action
28901
+
28902
+ # The segment boundary start (inclusive) and end index (exclusive) in the given
28903
+ # text. In the streaming RPC, the indexes always start from the beginning of the
28904
+ # first text in the entire stream. The indexes are measured in UTF-16 code units.
28905
+ # Corresponds to the JSON property `startIndex`
28906
+ # @return [Fixnum]
28907
+ attr_accessor :start_index
28908
+
28909
+ def initialize(**args)
28910
+ update!(**args)
28911
+ end
28912
+
28913
+ # Update properties of this object
28914
+ def update!(**args)
28915
+ @attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
28916
+ @display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
28917
+ @doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
28918
+ @doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
28919
+ @end_index = args[:end_index] if args.key?(:end_index)
28920
+ @raw_text = args[:raw_text] if args.key?(:raw_text)
28921
+ @segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
28922
+ @start_index = args[:start_index] if args.key?(:start_index)
28923
+ end
28924
+ end
28925
+
28926
+ # The recitation result for one stream input
28927
+ class LanguageLabsAidaTrustRecitationProtoStreamRecitationResult
28928
+ include Google::Apis::Core::Hashable
28929
+
28930
+ # The recitation result against the given dynamic data source.
28931
+ # Corresponds to the JSON property `dynamicSegmentResults`
28932
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28933
+ attr_accessor :dynamic_segment_results
28934
+
28935
+ # Last index of input text fully checked for recitation in the entire streaming
28936
+ # context. Would return `-1` if no Input was checked for recitation.
28937
+ # Corresponds to the JSON property `fullyCheckedTextIndex`
28938
+ # @return [Fixnum]
28939
+ attr_accessor :fully_checked_text_index
28940
+
28941
+ # The recitation action for one given input. When its segments contain different
28942
+ # actions, the overall action will be returned in the precedence of BLOCK > CITE
28943
+ # > NO_ACTION.
28944
+ # Corresponds to the JSON property `recitationAction`
28945
+ # @return [String]
28946
+ attr_accessor :recitation_action
28947
+
28948
+ # The recitation result against model training data.
28949
+ # Corresponds to the JSON property `trainingSegmentResults`
28950
+ # @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
28951
+ attr_accessor :training_segment_results
28952
+
28953
+ def initialize(**args)
28954
+ update!(**args)
28955
+ end
28956
+
28957
+ # Update properties of this object
28958
+ def update!(**args)
28959
+ @dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
28960
+ @fully_checked_text_index = args[:fully_checked_text_index] if args.key?(:fully_checked_text_index)
28961
+ @recitation_action = args[:recitation_action] if args.key?(:recitation_action)
28962
+ @training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
28963
+ end
28964
+ end
28965
+
28966
+ # The proto defines the attribution information for a document using whatever
28967
+ # fields are most applicable for that document's datasource. For example, a
28968
+ # Wikipedia article's attribution is in the form of its article title, a website
28969
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
28970
+ # id: 30
28971
+ class LearningGenaiRecitationDocAttribution
28972
+ include Google::Apis::Core::Hashable
28973
+
28974
+ #
28975
+ # Corresponds to the JSON property `amarnaId`
28976
+ # @return [String]
28977
+ attr_accessor :amarna_id
28978
+
28979
+ #
28980
+ # Corresponds to the JSON property `arxivId`
28981
+ # @return [String]
28982
+ attr_accessor :arxiv_id
28983
+
28984
+ #
28985
+ # Corresponds to the JSON property `author`
28986
+ # @return [String]
28987
+ attr_accessor :author
28988
+
28989
+ #
28990
+ # Corresponds to the JSON property `bibkey`
28991
+ # @return [String]
28992
+ attr_accessor :bibkey
28993
+
28994
+ # ID of the paper in bioarxiv like ddoi.org/`biorxiv_id` eg: https://doi.org/10.
28995
+ # 1101/343517
28996
+ # Corresponds to the JSON property `biorxivId`
28997
+ # @return [String]
28998
+ attr_accessor :biorxiv_id
28999
+
29000
+ #
29001
+ # Corresponds to the JSON property `bookTitle`
29002
+ # @return [String]
29003
+ attr_accessor :book_title
29004
+
29005
+ # The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
29006
+ # of a book. There is a deterministic function from a volume id to a URL under
29007
+ # the books.google.com domain. Marked as 'optional' since a volume ID of zero is
29008
+ # potentially possible and we want to distinguish that from the volume ID not
29009
+ # being set.
29010
+ # Corresponds to the JSON property `bookVolumeId`
29011
+ # @return [Fixnum]
29012
+ attr_accessor :book_volume_id
29013
+
29014
+ #
29015
+ # Corresponds to the JSON property `conversationId`
29016
+ # @return [String]
29017
+ attr_accessor :conversation_id
29018
+
29019
+ # The dataset this document comes from.
29020
+ # Corresponds to the JSON property `dataset`
29021
+ # @return [String]
29022
+ attr_accessor :dataset
29023
+
29024
+ #
29025
+ # Corresponds to the JSON property `filepath`
29026
+ # @return [String]
29027
+ attr_accessor :filepath
29028
+
29029
+ #
29030
+ # Corresponds to the JSON property `geminiId`
29031
+ # @return [String]
29032
+ attr_accessor :gemini_id
29033
+
29034
+ #
29035
+ # Corresponds to the JSON property `gnewsArticleTitle`
29036
+ # @return [String]
29037
+ attr_accessor :gnews_article_title
29038
+
29039
+ #
29040
+ # Corresponds to the JSON property `goodallExampleId`
29041
+ # @return [String]
29042
+ attr_accessor :goodall_example_id
29043
+
29044
+ # Whether the document is opted out.
29045
+ # Corresponds to the JSON property `isOptOut`
29046
+ # @return [Boolean]
29047
+ attr_accessor :is_opt_out
29048
+ alias_method :is_opt_out?, :is_opt_out
29049
+
29050
+ # When true, this attribution came from the user's prompt.
29051
+ # Corresponds to the JSON property `isPrompt`
29052
+ # @return [Boolean]
29053
+ attr_accessor :is_prompt
29054
+ alias_method :is_prompt?, :is_prompt
29055
+
29056
+ #
29057
+ # Corresponds to the JSON property `lamdaExampleId`
29058
+ # @return [String]
29059
+ attr_accessor :lamda_example_id
29060
+
29061
+ #
29062
+ # Corresponds to the JSON property `license`
29063
+ # @return [String]
29064
+ attr_accessor :license
29065
+
29066
+ #
29067
+ # Corresponds to the JSON property `meenaConversationId`
29068
+ # @return [String]
29069
+ attr_accessor :meena_conversation_id
29070
+
29071
+ # Natural (not programming) language of the document. Language code as defined
29072
+ # by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
29073
+ # html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
29074
+ # & read language fields. See go/iii.
29075
+ # Corresponds to the JSON property `naturalLanguageCode`
29076
+ # @return [String]
29077
+ attr_accessor :natural_language_code
29078
+
29079
+ # True if this doc has no attribution information available. We use an explicit
29080
+ # field for this instead of just implicitly leaving all the DocAttribution
29081
+ # fields blank to distinguish a case where a bug/oversight has left the
29082
+ # attribution information empty vs when we really have no attribution
29083
+ # information available.
29084
+ # Corresponds to the JSON property `noAttribution`
29085
+ # @return [Boolean]
29086
+ attr_accessor :no_attribution
29087
+ alias_method :no_attribution?, :no_attribution
29088
+
29089
+ #
29090
+ # Corresponds to the JSON property `podcastUtteranceId`
29091
+ # @return [String]
29092
+ attr_accessor :podcast_utterance_id
29093
+
29094
+ # Represents a whole or partial calendar date, such as a birthday. The time of
29095
+ # day and time zone are either specified elsewhere or are insignificant. The
29096
+ # date is relative to the Gregorian Calendar. This can represent one of the
29097
+ # following: * A full date, with non-zero year, month, and day values. * A month
29098
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
29099
+ # with a zero month and a zero day. * A year and month, with a zero day (for
29100
+ # example, a credit card expiration date). Related types: * google.type.
29101
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
29102
+ # Corresponds to the JSON property `publicationDate`
29103
+ # @return [Google::Apis::AiplatformV1::GoogleTypeDate]
29104
+ attr_accessor :publication_date
29105
+
29106
+ # This field is for opt-out experiment only, MUST never be used during actual
29107
+ # production/serving.
29108
+ # Corresponds to the JSON property `qualityScoreExperimentOnly`
29109
+ # @return [Float]
29110
+ attr_accessor :quality_score_experiment_only
29111
+
29112
+ # Github repository
29113
+ # Corresponds to the JSON property `repo`
29114
+ # @return [String]
29115
+ attr_accessor :repo
29116
+
29117
+ # URL of a webdoc
29118
+ # Corresponds to the JSON property `url`
29119
+ # @return [String]
29120
+ attr_accessor :url
29121
+
29122
+ #
29123
+ # Corresponds to the JSON property `volumeId`
29124
+ # @return [String]
29125
+ attr_accessor :volume_id
29126
+
29127
+ # Wikipedia article title. The Wikipedia TFDS dataset includes article titles
29128
+ # but not URLs. While a URL is to the best of our knowledge a deterministic
29129
+ # function of the title, we store the original title to reflect the information
29130
+ # in the original dataset.
29131
+ # Corresponds to the JSON property `wikipediaArticleTitle`
29132
+ # @return [String]
29133
+ attr_accessor :wikipedia_article_title
29134
+
29135
+ #
29136
+ # Corresponds to the JSON property `youtubeVideoId`
29137
+ # @return [String]
29138
+ attr_accessor :youtube_video_id
29139
+
29140
+ def initialize(**args)
29141
+ update!(**args)
29142
+ end
29143
+
29144
+ # Update properties of this object
29145
+ def update!(**args)
29146
+ @amarna_id = args[:amarna_id] if args.key?(:amarna_id)
29147
+ @arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
29148
+ @author = args[:author] if args.key?(:author)
29149
+ @bibkey = args[:bibkey] if args.key?(:bibkey)
29150
+ @biorxiv_id = args[:biorxiv_id] if args.key?(:biorxiv_id)
29151
+ @book_title = args[:book_title] if args.key?(:book_title)
29152
+ @book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
29153
+ @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
29154
+ @dataset = args[:dataset] if args.key?(:dataset)
29155
+ @filepath = args[:filepath] if args.key?(:filepath)
29156
+ @gemini_id = args[:gemini_id] if args.key?(:gemini_id)
29157
+ @gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
29158
+ @goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
29159
+ @is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
29160
+ @is_prompt = args[:is_prompt] if args.key?(:is_prompt)
29161
+ @lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
29162
+ @license = args[:license] if args.key?(:license)
29163
+ @meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
29164
+ @natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
29165
+ @no_attribution = args[:no_attribution] if args.key?(:no_attribution)
29166
+ @podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
29167
+ @publication_date = args[:publication_date] if args.key?(:publication_date)
29168
+ @quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
29169
+ @repo = args[:repo] if args.key?(:repo)
29170
+ @url = args[:url] if args.key?(:url)
29171
+ @volume_id = args[:volume_id] if args.key?(:volume_id)
29172
+ @wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
29173
+ @youtube_video_id = args[:youtube_video_id] if args.key?(:youtube_video_id)
29174
+ end
29175
+ end
29176
+
29177
+ # The recitation result for one input
29178
+ class LearningGenaiRecitationRecitationResult
29179
+ include Google::Apis::Core::Hashable
29180
+
29181
+ #
29182
+ # Corresponds to the JSON property `dynamicSegmentResults`
29183
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRecitationSegmentResult>]
29184
+ attr_accessor :dynamic_segment_results
29185
+
29186
+ # The recitation action for one given input. When its segments contain different
29187
+ # actions, the overall action will be returned in the precedence of BLOCK > CITE
29188
+ # > NO_ACTION.
29189
+ # Corresponds to the JSON property `recitationAction`
29190
+ # @return [String]
29191
+ attr_accessor :recitation_action
29192
+
29193
+ #
29194
+ # Corresponds to the JSON property `trainingSegmentResults`
29195
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRecitationSegmentResult>]
29196
+ attr_accessor :training_segment_results
29197
+
29198
+ def initialize(**args)
29199
+ update!(**args)
29200
+ end
29201
+
29202
+ # Update properties of this object
29203
+ def update!(**args)
29204
+ @dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
29205
+ @recitation_action = args[:recitation_action] if args.key?(:recitation_action)
29206
+ @training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
29207
+ end
29208
+ end
29209
+
29210
+ # The recitation result for each segment in a given input.
29211
+ class LearningGenaiRecitationSegmentResult
29212
+ include Google::Apis::Core::Hashable
29213
+
29214
+ # The dataset the segment came from.
29215
+ # Corresponds to the JSON property `attributionDataset`
29216
+ # @return [String]
29217
+ attr_accessor :attribution_dataset
29218
+
29219
+ # human-friendly string that contains information from doc_attribution which
29220
+ # could be shown by clients
29221
+ # Corresponds to the JSON property `displayAttributionMessage`
29222
+ # @return [String]
29223
+ attr_accessor :display_attribution_message
29224
+
29225
+ # The proto defines the attribution information for a document using whatever
29226
+ # fields are most applicable for that document's datasource. For example, a
29227
+ # Wikipedia article's attribution is in the form of its article title, a website
29228
+ # is in the form of a URL, and a Github repo is in the form of a repo name. Next
29229
+ # id: 30
29230
+ # Corresponds to the JSON property `docAttribution`
29231
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRecitationDocAttribution]
29232
+ attr_accessor :doc_attribution
29233
+
29234
+ # number of documents that contained this segment
29235
+ # Corresponds to the JSON property `docOccurrences`
29236
+ # @return [Fixnum]
29237
+ attr_accessor :doc_occurrences
29238
+
29239
+ #
29240
+ # Corresponds to the JSON property `endIndex`
29241
+ # @return [Fixnum]
29242
+ attr_accessor :end_index
29243
+
29244
+ # The raw text in the given input that is corresponding to the segment. It will
29245
+ # be available only when 'return_segment_raw_text' is enabled in the request
29246
+ # options.
29247
+ # Corresponds to the JSON property `rawText`
29248
+ # @return [String]
29249
+ attr_accessor :raw_text
29250
+
29251
+ #
29252
+ # Corresponds to the JSON property `segmentRecitationAction`
29253
+ # @return [String]
29254
+ attr_accessor :segment_recitation_action
29255
+
29256
+ # The segment boundary start (inclusive) and end index (exclusive) in the given
29257
+ # text. In the streaming RPC, the indexes always start from the beginning of the
29258
+ # first text in the entire stream. The indexes are measured in UTF-16 code units.
29259
+ # Corresponds to the JSON property `startIndex`
29260
+ # @return [Fixnum]
29261
+ attr_accessor :start_index
29262
+
29263
+ def initialize(**args)
29264
+ update!(**args)
29265
+ end
29266
+
29267
+ # Update properties of this object
29268
+ def update!(**args)
29269
+ @attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
29270
+ @display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
29271
+ @doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
29272
+ @doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
29273
+ @end_index = args[:end_index] if args.key?(:end_index)
29274
+ @raw_text = args[:raw_text] if args.key?(:raw_text)
29275
+ @segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
29276
+ @start_index = args[:start_index] if args.key?(:start_index)
29277
+ end
29278
+ end
29279
+
29280
+ # The type used for final weights calculation.
29281
+ class LearningGenaiRootCalculationType
29282
+ include Google::Apis::Core::Hashable
29283
+
29284
+ #
29285
+ # Corresponds to the JSON property `scoreType`
29286
+ # @return [String]
29287
+ attr_accessor :score_type
29288
+
29289
+ #
29290
+ # Corresponds to the JSON property `weights`
29291
+ # @return [Float]
29292
+ attr_accessor :weights
29293
+
29294
+ def initialize(**args)
29295
+ update!(**args)
29296
+ end
29297
+
29298
+ # Update properties of this object
29299
+ def update!(**args)
29300
+ @score_type = args[:score_type] if args.key?(:score_type)
29301
+ @weights = args[:weights] if args.key?(:weights)
29302
+ end
29303
+ end
29304
+
29305
+ #
29306
+ class LearningGenaiRootClassifierOutput
29307
+ include Google::Apis::Core::Hashable
29308
+
29309
+ # If set, this is the output of the first matching rule.
29310
+ # Corresponds to the JSON property `ruleOutput`
29311
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput]
29312
+ attr_accessor :rule_output
29313
+
29314
+ # outputs of all matching rule.
29315
+ # Corresponds to the JSON property `ruleOutputs`
29316
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput>]
29317
+ attr_accessor :rule_outputs
29318
+
29319
+ # DataProviderOutput and MetricOutput can be saved between calls to the
29320
+ # Classifier framework. For instance, you can run the query classifier, get
29321
+ # outputs from those metrics, then use them in a result classifier as well.
29322
+ # Example rule based on this idea: and_rules ` rule ` metric_name: '
29323
+ # query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
29324
+ # Corresponds to the JSON property `state`
29325
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierState]
29326
+ attr_accessor :state
29327
+
29328
+ def initialize(**args)
29329
+ update!(**args)
29330
+ end
29331
+
29332
+ # Update properties of this object
29333
+ def update!(**args)
29334
+ @rule_output = args[:rule_output] if args.key?(:rule_output)
29335
+ @rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
29336
+ @state = args[:state] if args.key?(:state)
29337
+ end
29338
+ end
29339
+
29340
+ #
29341
+ class LearningGenaiRootClassifierOutputSummary
29342
+ include Google::Apis::Core::Hashable
29343
+
29344
+ #
29345
+ # Corresponds to the JSON property `metrics`
29346
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootMetricOutput>]
29347
+ attr_accessor :metrics
29348
+
29349
+ # Output of the first matching rule.
29350
+ # Corresponds to the JSON property `ruleOutput`
29351
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput]
29352
+ attr_accessor :rule_output
29353
+
29354
+ # outputs of all matching rule.
29355
+ # Corresponds to the JSON property `ruleOutputs`
29356
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput>]
29357
+ attr_accessor :rule_outputs
29358
+
29359
+ def initialize(**args)
29360
+ update!(**args)
29361
+ end
29362
+
29363
+ # Update properties of this object
29364
+ def update!(**args)
29365
+ @metrics = args[:metrics] if args.key?(:metrics)
29366
+ @rule_output = args[:rule_output] if args.key?(:rule_output)
29367
+ @rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
29368
+ end
29369
+ end
29370
+
29371
+ # DataProviderOutput and MetricOutput can be saved between calls to the
29372
+ # Classifier framework. For instance, you can run the query classifier, get
29373
+ # outputs from those metrics, then use them in a result classifier as well.
29374
+ # Example rule based on this idea: and_rules ` rule ` metric_name: '
29375
+ # query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
29376
+ class LearningGenaiRootClassifierState
29377
+ include Google::Apis::Core::Hashable
29378
+
29379
+ #
29380
+ # Corresponds to the JSON property `dataProviderOutput`
29381
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootDataProviderOutput>]
29382
+ attr_accessor :data_provider_output
29383
+
29384
+ #
29385
+ # Corresponds to the JSON property `metricOutput`
29386
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootMetricOutput>]
29387
+ attr_accessor :metric_output
29388
+
29389
+ def initialize(**args)
29390
+ update!(**args)
29391
+ end
29392
+
29393
+ # Update properties of this object
29394
+ def update!(**args)
29395
+ @data_provider_output = args[:data_provider_output] if args.key?(:data_provider_output)
29396
+ @metric_output = args[:metric_output] if args.key?(:metric_output)
29397
+ end
29398
+ end
29399
+
29400
+ #
29401
+ class LearningGenaiRootDataProviderOutput
29402
+ include Google::Apis::Core::Hashable
29403
+
29404
+ #
29405
+ # Corresponds to the JSON property `name`
29406
+ # @return [String]
29407
+ attr_accessor :name
29408
+
29409
+ # Wire-format for a Status object
29410
+ # Corresponds to the JSON property `status`
29411
+ # @return [Google::Apis::AiplatformV1::UtilStatusProto]
29412
+ attr_accessor :status
29413
+
29414
+ def initialize(**args)
29415
+ update!(**args)
29416
+ end
29417
+
29418
+ # Update properties of this object
29419
+ def update!(**args)
29420
+ @name = args[:name] if args.key?(:name)
29421
+ @status = args[:status] if args.key?(:status)
29422
+ end
29423
+ end
29424
+
29425
+ #
29426
+ class LearningGenaiRootFilterMetadata
29427
+ include Google::Apis::Core::Hashable
29428
+
29429
+ # Filter confidence.
29430
+ # Corresponds to the JSON property `confidence`
29431
+ # @return [String]
29432
+ attr_accessor :confidence
29433
+
29434
+ # Debug info for the message.
29435
+ # Corresponds to the JSON property `debugInfo`
29436
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadataFilterDebugInfo]
29437
+ attr_accessor :debug_info
29438
+
29439
+ # A fallback message chosen by the applied filter.
29440
+ # Corresponds to the JSON property `fallback`
29441
+ # @return [String]
29442
+ attr_accessor :fallback
29443
+
29444
+ # Additional info for the filter.
29445
+ # Corresponds to the JSON property `info`
29446
+ # @return [String]
29447
+ attr_accessor :info
29448
+
29449
+ # Name of the filter that triggered.
29450
+ # Corresponds to the JSON property `name`
29451
+ # @return [String]
29452
+ attr_accessor :name
29453
+
29454
+ # Filter reason.
29455
+ # Corresponds to the JSON property `reason`
29456
+ # @return [String]
29457
+ attr_accessor :reason
29458
+
29459
+ # The input query or generated response that is getting filtered.
29460
+ # Corresponds to the JSON property `text`
29461
+ # @return [String]
29462
+ attr_accessor :text
29463
+
29464
+ def initialize(**args)
29465
+ update!(**args)
29466
+ end
29467
+
29468
+ # Update properties of this object
29469
+ def update!(**args)
29470
+ @confidence = args[:confidence] if args.key?(:confidence)
29471
+ @debug_info = args[:debug_info] if args.key?(:debug_info)
29472
+ @fallback = args[:fallback] if args.key?(:fallback)
29473
+ @info = args[:info] if args.key?(:info)
29474
+ @name = args[:name] if args.key?(:name)
29475
+ @reason = args[:reason] if args.key?(:reason)
29476
+ @text = args[:text] if args.key?(:text)
29477
+ end
29478
+ end
29479
+
29480
+ #
29481
+ class LearningGenaiRootFilterMetadataFilterDebugInfo
29482
+ include Google::Apis::Core::Hashable
29483
+
29484
+ #
29485
+ # Corresponds to the JSON property `classifierOutput`
29486
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierOutput]
29487
+ attr_accessor :classifier_output
29488
+
29489
+ #
29490
+ # Corresponds to the JSON property `defaultMetadata`
29491
+ # @return [String]
29492
+ attr_accessor :default_metadata
29493
+
29494
+ #
29495
+ # Corresponds to the JSON property `languageFilterResult`
29496
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootLanguageFilterResult]
29497
+ attr_accessor :language_filter_result
29498
+
29499
+ # This is per harm.
29500
+ # Corresponds to the JSON property `raiOutput`
29501
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput]
29502
+ attr_accessor :rai_output
29503
+
29504
+ # The RAI results for a given text.
29505
+ # Corresponds to the JSON property `raiResult`
29506
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult]
29507
+ attr_accessor :rai_result
29508
+
29509
+ # An RAI signal for a single category.
29510
+ # Corresponds to the JSON property `raiSignal`
29511
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal]
29512
+ attr_accessor :rai_signal
29513
+
29514
+ # The recitation result for one stream input
29515
+ # Corresponds to the JSON property `streamRecitationResult`
29516
+ # @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoStreamRecitationResult]
29517
+ attr_accessor :stream_recitation_result
29518
+
29519
+ #
29520
+ # Corresponds to the JSON property `takedownResult`
29521
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootTakedownResult]
29522
+ attr_accessor :takedown_result
29523
+
29524
+ # A model can generate multiple signals and this captures all the generated
29525
+ # signals for a single message.
29526
+ # Corresponds to the JSON property `toxicityResult`
29527
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootToxicityResult]
29528
+ attr_accessor :toxicity_result
29529
+
29530
+ def initialize(**args)
29531
+ update!(**args)
29532
+ end
29533
+
29534
+ # Update properties of this object
29535
+ def update!(**args)
29536
+ @classifier_output = args[:classifier_output] if args.key?(:classifier_output)
29537
+ @default_metadata = args[:default_metadata] if args.key?(:default_metadata)
29538
+ @language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
29539
+ @rai_output = args[:rai_output] if args.key?(:rai_output)
29540
+ @rai_result = args[:rai_result] if args.key?(:rai_result)
29541
+ @rai_signal = args[:rai_signal] if args.key?(:rai_signal)
29542
+ @stream_recitation_result = args[:stream_recitation_result] if args.key?(:stream_recitation_result)
29543
+ @takedown_result = args[:takedown_result] if args.key?(:takedown_result)
29544
+ @toxicity_result = args[:toxicity_result] if args.key?(:toxicity_result)
29545
+ end
29546
+ end
29547
+
29548
+ #
29549
+ class LearningGenaiRootGroundingMetadata
29550
+ include Google::Apis::Core::Hashable
29551
+
29552
+ #
29553
+ # Corresponds to the JSON property `citations`
29554
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootGroundingMetadataCitation>]
29555
+ attr_accessor :citations
29556
+
29557
+ # True if grounding is cancelled, for example, no facts being retrieved.
29558
+ # Corresponds to the JSON property `groundingCancelled`
29559
+ # @return [Boolean]
29560
+ attr_accessor :grounding_cancelled
29561
+ alias_method :grounding_cancelled?, :grounding_cancelled
29562
+
29563
+ #
29564
+ # Corresponds to the JSON property `searchQueries`
29565
+ # @return [Array<String>]
29566
+ attr_accessor :search_queries
29567
+
29568
+ def initialize(**args)
29569
+ update!(**args)
29570
+ end
29571
+
29572
+ # Update properties of this object
29573
+ def update!(**args)
29574
+ @citations = args[:citations] if args.key?(:citations)
29575
+ @grounding_cancelled = args[:grounding_cancelled] if args.key?(:grounding_cancelled)
29576
+ @search_queries = args[:search_queries] if args.key?(:search_queries)
29577
+ end
29578
+ end
29579
+
29580
+ #
29581
+ class LearningGenaiRootGroundingMetadataCitation
29582
+ include Google::Apis::Core::Hashable
29583
+
29584
+ # Index in the prediction output where the citation ends (exclusive). Must be >
29585
+ # start_index and < len(output).
29586
+ # Corresponds to the JSON property `endIndex`
29587
+ # @return [Fixnum]
29588
+ attr_accessor :end_index
29589
+
29590
+ # Index of the fact supporting this claim. Should be within the range of the `
29591
+ # world_facts` in the GenerateResponse.
29592
+ # Corresponds to the JSON property `factIndex`
29593
+ # @return [Fixnum]
29594
+ attr_accessor :fact_index
29595
+
29596
+ # Confidence score of this entailment. Value is [0,1] with 1 is the most
29597
+ # confidence.
29598
+ # Corresponds to the JSON property `score`
29599
+ # @return [Float]
29600
+ attr_accessor :score
29601
+
29602
+ # Index in the prediction output where the citation starts (inclusive). Must be >
29603
+ # = 0 and < end_index.
29604
+ # Corresponds to the JSON property `startIndex`
29605
+ # @return [Fixnum]
29606
+ attr_accessor :start_index
29607
+
29608
+ def initialize(**args)
29609
+ update!(**args)
29610
+ end
29611
+
29612
+ # Update properties of this object
29613
+ def update!(**args)
29614
+ @end_index = args[:end_index] if args.key?(:end_index)
29615
+ @fact_index = args[:fact_index] if args.key?(:fact_index)
29616
+ @score = args[:score] if args.key?(:score)
29617
+ @start_index = args[:start_index] if args.key?(:start_index)
29618
+ end
29619
+ end
29620
+
29621
+ #
29622
+ class LearningGenaiRootHarm
29623
+ include Google::Apis::Core::Hashable
29624
+
29625
+ # Please do not use, this is still under development.
29626
+ # Corresponds to the JSON property `contextualDangerous`
29627
+ # @return [Boolean]
29628
+ attr_accessor :contextual_dangerous
29629
+ alias_method :contextual_dangerous?, :contextual_dangerous
29630
+
29631
+ #
29632
+ # Corresponds to the JSON property `csam`
29633
+ # @return [Boolean]
29634
+ attr_accessor :csam
29635
+ alias_method :csam?, :csam
29636
+
29637
+ #
29638
+ # Corresponds to the JSON property `fringe`
29639
+ # @return [Boolean]
29640
+ attr_accessor :fringe
29641
+ alias_method :fringe?, :fringe
29642
+
29643
+ # Harm type for images
29644
+ # Corresponds to the JSON property `grailImageHarmType`
29645
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmGrailImageHarmType]
29646
+ attr_accessor :grail_image_harm_type
29647
+
29648
+ # Harm type for text
29649
+ # Corresponds to the JSON property `grailTextHarmType`
29650
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmGrailTextHarmType]
29651
+ attr_accessor :grail_text_harm_type
29652
+
29653
+ #
29654
+ # Corresponds to the JSON property `imageCsam`
29655
+ # @return [Boolean]
29656
+ attr_accessor :image_csam
29657
+ alias_method :image_csam?, :image_csam
29658
+
29659
+ #
29660
+ # Corresponds to the JSON property `imagePedo`
29661
+ # @return [Boolean]
29662
+ attr_accessor :image_pedo
29663
+ alias_method :image_pedo?, :image_pedo
29664
+
29665
+ # Image signals
29666
+ # Corresponds to the JSON property `imagePorn`
29667
+ # @return [Boolean]
29668
+ attr_accessor :image_porn
29669
+ alias_method :image_porn?, :image_porn
29670
+
29671
+ #
29672
+ # Corresponds to the JSON property `imageViolence`
29673
+ # @return [Boolean]
29674
+ attr_accessor :image_violence
29675
+ alias_method :image_violence?, :image_violence
29676
+
29677
+ #
29678
+ # Corresponds to the JSON property `pqc`
29679
+ # @return [Boolean]
29680
+ attr_accessor :pqc
29681
+ alias_method :pqc?, :pqc
29682
+
29683
+ #
29684
+ # Corresponds to the JSON property `safetycat`
29685
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmSafetyCatCategories]
29686
+ attr_accessor :safetycat
29687
+
29688
+ #
29689
+ # Corresponds to the JSON property `spii`
29690
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmSpiiFilter]
29691
+ attr_accessor :spii
29692
+
29693
+ #
29694
+ # Corresponds to the JSON property `threshold`
29695
+ # @return [Float]
29696
+ attr_accessor :threshold
29697
+
29698
+ #
29699
+ # Corresponds to the JSON property `videoFrameCsam`
29700
+ # @return [Boolean]
29701
+ attr_accessor :video_frame_csam
29702
+ alias_method :video_frame_csam?, :video_frame_csam
29703
+
29704
+ #
29705
+ # Corresponds to the JSON property `videoFramePedo`
29706
+ # @return [Boolean]
29707
+ attr_accessor :video_frame_pedo
29708
+ alias_method :video_frame_pedo?, :video_frame_pedo
29709
+
29710
+ # Video frame signals
29711
+ # Corresponds to the JSON property `videoFramePorn`
29712
+ # @return [Boolean]
29713
+ attr_accessor :video_frame_porn
29714
+ alias_method :video_frame_porn?, :video_frame_porn
29715
+
29716
+ #
29717
+ # Corresponds to the JSON property `videoFrameViolence`
29718
+ # @return [Boolean]
29719
+ attr_accessor :video_frame_violence
29720
+ alias_method :video_frame_violence?, :video_frame_violence
29721
+
29722
+ def initialize(**args)
29723
+ update!(**args)
29724
+ end
29725
+
29726
+ # Update properties of this object
29727
+ def update!(**args)
29728
+ @contextual_dangerous = args[:contextual_dangerous] if args.key?(:contextual_dangerous)
29729
+ @csam = args[:csam] if args.key?(:csam)
29730
+ @fringe = args[:fringe] if args.key?(:fringe)
29731
+ @grail_image_harm_type = args[:grail_image_harm_type] if args.key?(:grail_image_harm_type)
29732
+ @grail_text_harm_type = args[:grail_text_harm_type] if args.key?(:grail_text_harm_type)
29733
+ @image_csam = args[:image_csam] if args.key?(:image_csam)
29734
+ @image_pedo = args[:image_pedo] if args.key?(:image_pedo)
29735
+ @image_porn = args[:image_porn] if args.key?(:image_porn)
29736
+ @image_violence = args[:image_violence] if args.key?(:image_violence)
29737
+ @pqc = args[:pqc] if args.key?(:pqc)
29738
+ @safetycat = args[:safetycat] if args.key?(:safetycat)
29739
+ @spii = args[:spii] if args.key?(:spii)
29740
+ @threshold = args[:threshold] if args.key?(:threshold)
29741
+ @video_frame_csam = args[:video_frame_csam] if args.key?(:video_frame_csam)
29742
+ @video_frame_pedo = args[:video_frame_pedo] if args.key?(:video_frame_pedo)
29743
+ @video_frame_porn = args[:video_frame_porn] if args.key?(:video_frame_porn)
29744
+ @video_frame_violence = args[:video_frame_violence] if args.key?(:video_frame_violence)
29745
+ end
29746
+ end
29747
+
29748
+ # Harm type for images
29749
+ class LearningGenaiRootHarmGrailImageHarmType
29750
+ include Google::Apis::Core::Hashable
29751
+
29752
+ #
29753
+ # Corresponds to the JSON property `imageHarmType`
29754
+ # @return [Array<String>]
29755
+ attr_accessor :image_harm_type
29756
+
29757
+ def initialize(**args)
29758
+ update!(**args)
29759
+ end
29760
+
29761
+ # Update properties of this object
29762
+ def update!(**args)
29763
+ @image_harm_type = args[:image_harm_type] if args.key?(:image_harm_type)
29764
+ end
29765
+ end
29766
+
29767
+ # Harm type for text
29768
+ class LearningGenaiRootHarmGrailTextHarmType
29769
+ include Google::Apis::Core::Hashable
29770
+
29771
+ #
29772
+ # Corresponds to the JSON property `harmType`
29773
+ # @return [Array<String>]
29774
+ attr_accessor :harm_type
29775
+
29776
+ def initialize(**args)
29777
+ update!(**args)
29778
+ end
29779
+
29780
+ # Update properties of this object
29781
+ def update!(**args)
29782
+ @harm_type = args[:harm_type] if args.key?(:harm_type)
29783
+ end
29784
+ end
29785
+
29786
+ #
29787
+ class LearningGenaiRootHarmSafetyCatCategories
29788
+ include Google::Apis::Core::Hashable
29789
+
29790
+ #
29791
+ # Corresponds to the JSON property `categories`
29792
+ # @return [Array<String>]
29793
+ attr_accessor :categories
29794
+
29795
+ def initialize(**args)
29796
+ update!(**args)
29797
+ end
29798
+
29799
+ # Update properties of this object
29800
+ def update!(**args)
29801
+ @categories = args[:categories] if args.key?(:categories)
29802
+ end
29803
+ end
29804
+
29805
+ #
29806
+ class LearningGenaiRootHarmSpiiFilter
29807
+ include Google::Apis::Core::Hashable
29808
+
29809
+ #
29810
+ # Corresponds to the JSON property `usBankRoutingMicr`
29811
+ # @return [Boolean]
29812
+ attr_accessor :us_bank_routing_micr
29813
+ alias_method :us_bank_routing_micr?, :us_bank_routing_micr
29814
+
29815
+ #
29816
+ # Corresponds to the JSON property `usEmployerIdentificationNumber`
29817
+ # @return [Boolean]
29818
+ attr_accessor :us_employer_identification_number
29819
+ alias_method :us_employer_identification_number?, :us_employer_identification_number
29820
+
29821
+ #
29822
+ # Corresponds to the JSON property `usSocialSecurityNumber`
29823
+ # @return [Boolean]
29824
+ attr_accessor :us_social_security_number
29825
+ alias_method :us_social_security_number?, :us_social_security_number
29826
+
29827
+ def initialize(**args)
29828
+ update!(**args)
29829
+ end
29830
+
29831
+ # Update properties of this object
29832
+ def update!(**args)
29833
+ @us_bank_routing_micr = args[:us_bank_routing_micr] if args.key?(:us_bank_routing_micr)
29834
+ @us_employer_identification_number = args[:us_employer_identification_number] if args.key?(:us_employer_identification_number)
29835
+ @us_social_security_number = args[:us_social_security_number] if args.key?(:us_social_security_number)
29836
+ end
29837
+ end
29838
+
29839
+ #
29840
+ class LearningGenaiRootInternalMetadata
29841
+ include Google::Apis::Core::Hashable
29842
+
29843
+ #
29844
+ # Corresponds to the JSON property `scoredTokens`
29845
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScoredToken>]
29846
+ attr_accessor :scored_tokens
29847
+
29848
+ def initialize(**args)
29849
+ update!(**args)
29850
+ end
29851
+
29852
+ # Update properties of this object
29853
+ def update!(**args)
29854
+ @scored_tokens = args[:scored_tokens] if args.key?(:scored_tokens)
29855
+ end
29856
+ end
29857
+
29858
+ #
29859
+ class LearningGenaiRootLanguageFilterResult
29860
+ include Google::Apis::Core::Hashable
29861
+
29862
+ # False when query or response should be filtered out due to unsupported
29863
+ # language.
29864
+ # Corresponds to the JSON property `allowed`
29865
+ # @return [Boolean]
29866
+ attr_accessor :allowed
29867
+ alias_method :allowed?, :allowed
29868
+
29869
+ # Language of the query or response.
29870
+ # Corresponds to the JSON property `detectedLanguage`
29871
+ # @return [String]
29872
+ attr_accessor :detected_language
29873
+
29874
+ # Probability of the language predicted as returned by LangID.
29875
+ # Corresponds to the JSON property `detectedLanguageProbability`
29876
+ # @return [Float]
29877
+ attr_accessor :detected_language_probability
29878
+
29879
+ def initialize(**args)
29880
+ update!(**args)
29881
+ end
29882
+
29883
+ # Update properties of this object
29884
+ def update!(**args)
29885
+ @allowed = args[:allowed] if args.key?(:allowed)
29886
+ @detected_language = args[:detected_language] if args.key?(:detected_language)
29887
+ @detected_language_probability = args[:detected_language_probability] if args.key?(:detected_language_probability)
29888
+ end
29889
+ end
29890
+
29891
+ #
29892
+ class LearningGenaiRootMetricOutput
29893
+ include Google::Apis::Core::Hashable
29894
+
29895
+ #
29896
+ # Corresponds to the JSON property `debug`
29897
+ # @return [String]
29898
+ attr_accessor :debug
29899
+
29900
+ # Name of the metric.
29901
+ # Corresponds to the JSON property `name`
29902
+ # @return [String]
29903
+ attr_accessor :name
29904
+
29905
+ #
29906
+ # Corresponds to the JSON property `numericValue`
29907
+ # @return [Float]
29908
+ attr_accessor :numeric_value
29909
+
29910
+ # Wire-format for a Status object
29911
+ # Corresponds to the JSON property `status`
29912
+ # @return [Google::Apis::AiplatformV1::UtilStatusProto]
29913
+ attr_accessor :status
29914
+
29915
+ #
29916
+ # Corresponds to the JSON property `stringValue`
29917
+ # @return [String]
29918
+ attr_accessor :string_value
29919
+
29920
+ def initialize(**args)
29921
+ update!(**args)
29922
+ end
29923
+
29924
+ # Update properties of this object
29925
+ def update!(**args)
29926
+ @debug = args[:debug] if args.key?(:debug)
29927
+ @name = args[:name] if args.key?(:name)
29928
+ @numeric_value = args[:numeric_value] if args.key?(:numeric_value)
29929
+ @status = args[:status] if args.key?(:status)
29930
+ @string_value = args[:string_value] if args.key?(:string_value)
29931
+ end
29932
+ end
29933
+
29934
+ # This is per harm.
29935
+ class LearningGenaiRootRaiOutput
29936
+ include Google::Apis::Core::Hashable
29937
+
29938
+ #
29939
+ # Corresponds to the JSON property `allowed`
29940
+ # @return [Boolean]
29941
+ attr_accessor :allowed
29942
+ alias_method :allowed?, :allowed
29943
+
29944
+ #
29945
+ # Corresponds to the JSON property `harm`
29946
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootHarm]
29947
+ attr_accessor :harm
29948
+
29949
+ #
29950
+ # Corresponds to the JSON property `name`
29951
+ # @return [String]
29952
+ attr_accessor :name
29953
+
29954
+ #
29955
+ # Corresponds to the JSON property `score`
29956
+ # @return [Float]
29957
+ attr_accessor :score
29958
+
29959
+ def initialize(**args)
29960
+ update!(**args)
29961
+ end
29962
+
29963
+ # Update properties of this object
29964
+ def update!(**args)
29965
+ @allowed = args[:allowed] if args.key?(:allowed)
29966
+ @harm = args[:harm] if args.key?(:harm)
29967
+ @name = args[:name] if args.key?(:name)
29968
+ @score = args[:score] if args.key?(:score)
29969
+ end
29970
+ end
29971
+
29972
+ #
29973
+ class LearningGenaiRootRegexTakedownResult
29974
+ include Google::Apis::Core::Hashable
29975
+
29976
+ # False when query or response should be taken down due to match with a blocked
29977
+ # regex, true otherwise.
29978
+ # Corresponds to the JSON property `allowed`
29979
+ # @return [Boolean]
29980
+ attr_accessor :allowed
29981
+ alias_method :allowed?, :allowed
29982
+
29983
+ # Regex used to decide that query or response should be taken down. Empty when
29984
+ # query or response is kept.
29985
+ # Corresponds to the JSON property `takedownRegex`
29986
+ # @return [String]
29987
+ attr_accessor :takedown_regex
29988
+
29989
+ def initialize(**args)
29990
+ update!(**args)
29991
+ end
29992
+
29993
+ # Update properties of this object
29994
+ def update!(**args)
29995
+ @allowed = args[:allowed] if args.key?(:allowed)
29996
+ @takedown_regex = args[:takedown_regex] if args.key?(:takedown_regex)
29997
+ end
29998
+ end
29999
+
30000
+ #
30001
+ class LearningGenaiRootRequestResponseTakedownResult
30002
+ include Google::Apis::Core::Hashable
30003
+
30004
+ # False when response has to be taken down per above config.
30005
+ # Corresponds to the JSON property `allowed`
30006
+ # @return [Boolean]
30007
+ attr_accessor :allowed
30008
+ alias_method :allowed?, :allowed
30009
+
30010
+ # Regex used to match the request.
30011
+ # Corresponds to the JSON property `requestTakedownRegex`
30012
+ # @return [String]
30013
+ attr_accessor :request_takedown_regex
30014
+
30015
+ # Regex used to decide that response should be taken down. Empty when response
30016
+ # is kept.
30017
+ # Corresponds to the JSON property `responseTakedownRegex`
30018
+ # @return [String]
30019
+ attr_accessor :response_takedown_regex
30020
+
30021
+ def initialize(**args)
30022
+ update!(**args)
30023
+ end
30024
+
30025
+ # Update properties of this object
30026
+ def update!(**args)
30027
+ @allowed = args[:allowed] if args.key?(:allowed)
30028
+ @request_takedown_regex = args[:request_takedown_regex] if args.key?(:request_takedown_regex)
30029
+ @response_takedown_regex = args[:response_takedown_regex] if args.key?(:response_takedown_regex)
30030
+ end
30031
+ end
30032
+
30033
+ # Holds the final routing decision, by storing the model_config_id. And
30034
+ # individual scores each model got.
30035
+ class LearningGenaiRootRoutingDecision
30036
+ include Google::Apis::Core::Hashable
30037
+
30038
+ # Debug metadata about the routing decision.
30039
+ # Corresponds to the JSON property `metadata`
30040
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadata]
30041
+ attr_accessor :metadata
30042
+
30043
+ # The selected model to route traffic to.
30044
+ # Corresponds to the JSON property `modelConfigId`
30045
+ # @return [String]
30046
+ attr_accessor :model_config_id
30047
+
30048
+ def initialize(**args)
30049
+ update!(**args)
30050
+ end
30051
+
30052
+ # Update properties of this object
30053
+ def update!(**args)
30054
+ @metadata = args[:metadata] if args.key?(:metadata)
30055
+ @model_config_id = args[:model_config_id] if args.key?(:model_config_id)
30056
+ end
30057
+ end
30058
+
30059
+ # Debug metadata about the routing decision.
30060
+ class LearningGenaiRootRoutingDecisionMetadata
30061
+ include Google::Apis::Core::Hashable
30062
+
30063
+ # If we are routing using scored based configuration, then the metadata about
30064
+ # that is available in this proto.
30065
+ # Corresponds to the JSON property `scoreBasedRoutingMetadata`
30066
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataScoreBased]
30067
+ attr_accessor :score_based_routing_metadata
30068
+
30069
+ #
30070
+ # Corresponds to the JSON property `tokenLengthBasedRoutingMetadata`
30071
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBased]
30072
+ attr_accessor :token_length_based_routing_metadata
30073
+
30074
+ def initialize(**args)
30075
+ update!(**args)
30076
+ end
30077
+
30078
+ # Update properties of this object
30079
+ def update!(**args)
30080
+ @score_based_routing_metadata = args[:score_based_routing_metadata] if args.key?(:score_based_routing_metadata)
30081
+ @token_length_based_routing_metadata = args[:token_length_based_routing_metadata] if args.key?(:token_length_based_routing_metadata)
30082
+ end
30083
+ end
30084
+
30085
+ # If we are routing using scored based configuration, then the metadata about
30086
+ # that is available in this proto.
30087
+ class LearningGenaiRootRoutingDecisionMetadataScoreBased
30088
+ include Google::Apis::Core::Hashable
30089
+
30090
+ # The rule that was matched.
30091
+ # Corresponds to the JSON property `matchedRule`
30092
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScoreBasedRoutingConfigRule]
30093
+ attr_accessor :matched_rule
30094
+
30095
+ # The score that was generated by the router i.e. the model.
30096
+ # Corresponds to the JSON property `score`
30097
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
30098
+ attr_accessor :score
30099
+
30100
+ # No rules were matched & therefore used the default fallback.
30101
+ # Corresponds to the JSON property `usedDefaultFallback`
30102
+ # @return [Boolean]
30103
+ attr_accessor :used_default_fallback
30104
+ alias_method :used_default_fallback?, :used_default_fallback
30105
+
30106
+ def initialize(**args)
30107
+ update!(**args)
30108
+ end
30109
+
30110
+ # Update properties of this object
30111
+ def update!(**args)
30112
+ @matched_rule = args[:matched_rule] if args.key?(:matched_rule)
30113
+ @score = args[:score] if args.key?(:score)
30114
+ @used_default_fallback = args[:used_default_fallback] if args.key?(:used_default_fallback)
30115
+ end
30116
+ end
30117
+
30118
+ #
30119
+ class LearningGenaiRootRoutingDecisionMetadataTokenLengthBased
30120
+ include Google::Apis::Core::Hashable
30121
+
30122
+ #
30123
+ # Corresponds to the JSON property `modelInputTokenMetadata`
30124
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata>]
30125
+ attr_accessor :model_input_token_metadata
30126
+
30127
+ #
30128
+ # Corresponds to the JSON property `modelMaxTokenMetadata`
30129
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata>]
30130
+ attr_accessor :model_max_token_metadata
30131
+
30132
+ def initialize(**args)
30133
+ update!(**args)
30134
+ end
30135
+
30136
+ # Update properties of this object
30137
+ def update!(**args)
30138
+ @model_input_token_metadata = args[:model_input_token_metadata] if args.key?(:model_input_token_metadata)
30139
+ @model_max_token_metadata = args[:model_max_token_metadata] if args.key?(:model_max_token_metadata)
30140
+ end
30141
+ end
30142
+
30143
+ #
30144
+ class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata
30145
+ include Google::Apis::Core::Hashable
30146
+
30147
+ # The length computed by backends using the formatter & tokenizer specific to
30148
+ # the model
30149
+ # Corresponds to the JSON property `computedInputTokenLength`
30150
+ # @return [Fixnum]
30151
+ attr_accessor :computed_input_token_length
30152
+
30153
+ #
30154
+ # Corresponds to the JSON property `modelId`
30155
+ # @return [String]
30156
+ attr_accessor :model_id
30157
+
30158
+ def initialize(**args)
30159
+ update!(**args)
30160
+ end
30161
+
30162
+ # Update properties of this object
30163
+ def update!(**args)
30164
+ @computed_input_token_length = args[:computed_input_token_length] if args.key?(:computed_input_token_length)
30165
+ @model_id = args[:model_id] if args.key?(:model_id)
30166
+ end
30167
+ end
30168
+
30169
+ #
30170
+ class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata
30171
+ include Google::Apis::Core::Hashable
30172
+
30173
+ #
30174
+ # Corresponds to the JSON property `maxNumInputTokens`
30175
+ # @return [Fixnum]
30176
+ attr_accessor :max_num_input_tokens
30177
+
30178
+ #
30179
+ # Corresponds to the JSON property `maxNumOutputTokens`
30180
+ # @return [Fixnum]
30181
+ attr_accessor :max_num_output_tokens
30182
+
30183
+ #
30184
+ # Corresponds to the JSON property `modelId`
30185
+ # @return [String]
30186
+ attr_accessor :model_id
30187
+
30188
+ def initialize(**args)
30189
+ update!(**args)
30190
+ end
30191
+
30192
+ # Update properties of this object
30193
+ def update!(**args)
30194
+ @max_num_input_tokens = args[:max_num_input_tokens] if args.key?(:max_num_input_tokens)
30195
+ @max_num_output_tokens = args[:max_num_output_tokens] if args.key?(:max_num_output_tokens)
30196
+ @model_id = args[:model_id] if args.key?(:model_id)
30197
+ end
30198
+ end
30199
+
30200
+ #
30201
+ class LearningGenaiRootRuleOutput
30202
+ include Google::Apis::Core::Hashable
30203
+
30204
+ #
30205
+ # Corresponds to the JSON property `decision`
30206
+ # @return [String]
30207
+ attr_accessor :decision
30208
+
30209
+ #
30210
+ # Corresponds to the JSON property `name`
30211
+ # @return [String]
30212
+ attr_accessor :name
30213
+
30214
+ def initialize(**args)
30215
+ update!(**args)
30216
+ end
30217
+
30218
+ # Update properties of this object
30219
+ def update!(**args)
30220
+ @decision = args[:decision] if args.key?(:decision)
30221
+ @name = args[:name] if args.key?(:name)
30222
+ end
30223
+ end
30224
+
30225
+ #
30226
+ class LearningGenaiRootScore
30227
+ include Google::Apis::Core::Hashable
30228
+
30229
+ # The type used for final weights calculation.
30230
+ # Corresponds to the JSON property `calculationType`
30231
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootCalculationType]
30232
+ attr_accessor :calculation_type
30233
+
30234
+ # The internal_metadata is intended to be used by internal processors and will
30235
+ # be cleared before returns.
30236
+ # Corresponds to the JSON property `internalMetadata`
30237
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootInternalMetadata]
30238
+ attr_accessor :internal_metadata
30239
+
30240
+ # The type of score that bundled with a threshold, and will not be attending the
30241
+ # final score calculation. How each score type uses the threshold can be
30242
+ # implementation details.
30243
+ # Corresponds to the JSON property `thresholdType`
30244
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootThresholdType]
30245
+ attr_accessor :threshold_type
30246
+
30247
+ # Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
30248
+ # Corresponds to the JSON property `tokensAndLogprobPerDecodingStep`
30249
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStep]
30250
+ attr_accessor :tokens_and_logprob_per_decoding_step
30251
+
30252
+ #
30253
+ # Corresponds to the JSON property `value`
30254
+ # @return [Float]
30255
+ attr_accessor :value
30256
+
30257
+ def initialize(**args)
30258
+ update!(**args)
30259
+ end
30260
+
30261
+ # Update properties of this object
30262
+ def update!(**args)
30263
+ @calculation_type = args[:calculation_type] if args.key?(:calculation_type)
30264
+ @internal_metadata = args[:internal_metadata] if args.key?(:internal_metadata)
30265
+ @threshold_type = args[:threshold_type] if args.key?(:threshold_type)
30266
+ @tokens_and_logprob_per_decoding_step = args[:tokens_and_logprob_per_decoding_step] if args.key?(:tokens_and_logprob_per_decoding_step)
30267
+ @value = args[:value] if args.key?(:value)
30268
+ end
30269
+ end
30270
+
30271
+ #
30272
+ class LearningGenaiRootScoreBasedRoutingConfigRule
30273
+ include Google::Apis::Core::Hashable
30274
+
30275
+ # NOTE: Hardest examples have smaller values in their routing scores.
30276
+ # Corresponds to the JSON property `equalOrGreaterThan`
30277
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
30278
+ attr_accessor :equal_or_greater_than
30279
+
30280
+ #
30281
+ # Corresponds to the JSON property `lessThan`
30282
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
30283
+ attr_accessor :less_than
30284
+
30285
+ # This model_config_id points to ModelConfig::id which allows us to find the
30286
+ # ModelConfig to route to. This is part of the banks specified in the
30287
+ # ModelBankConfig.
30288
+ # Corresponds to the JSON property `modelConfigId`
30289
+ # @return [String]
30290
+ attr_accessor :model_config_id
30291
+
30292
+ def initialize(**args)
30293
+ update!(**args)
30294
+ end
30295
+
30296
+ # Update properties of this object
30297
+ def update!(**args)
30298
+ @equal_or_greater_than = args[:equal_or_greater_than] if args.key?(:equal_or_greater_than)
30299
+ @less_than = args[:less_than] if args.key?(:less_than)
30300
+ @model_config_id = args[:model_config_id] if args.key?(:model_config_id)
30301
+ end
30302
+ end
30303
+
30304
+ # Proto containing the results from the Universal Sentence Encoder / Other
30305
+ # models
30306
+ class LearningGenaiRootScoredSimilarityTakedownPhrase
30307
+ include Google::Apis::Core::Hashable
30308
+
30309
+ # Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
30310
+ # phrases together along with a corresponding punt If the closest matching
30311
+ # response is of the allowed type, we allow the response If the closest matching
30312
+ # response is of the blocked type, we block the response. eg: Blocked phrase - "
30313
+ # All lives matter"
30314
+ # Corresponds to the JSON property `phrase`
30315
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownPhrase]
30316
+ attr_accessor :phrase
30317
+
30318
+ #
30319
+ # Corresponds to the JSON property `similarityScore`
30320
+ # @return [Float]
30321
+ attr_accessor :similarity_score
30322
+
30323
+ def initialize(**args)
30324
+ update!(**args)
30325
+ end
30326
+
30327
+ # Update properties of this object
30328
+ def update!(**args)
30329
+ @phrase = args[:phrase] if args.key?(:phrase)
30330
+ @similarity_score = args[:similarity_score] if args.key?(:similarity_score)
30331
+ end
30332
+ end
30333
+
30334
+ # A token with its own score.
30335
+ class LearningGenaiRootScoredToken
30336
+ include Google::Apis::Core::Hashable
30337
+
30338
+ # Each end_token_score is a logprob for how well the completion would end at a
30339
+ # particular token. See http://google3/labs/language/aida/config/proto/
30340
+ # model_config.proto;l=376;rcl=573039459
30341
+ # Corresponds to the JSON property `endTokenScore`
30342
+ # @return [Float]
30343
+ attr_accessor :end_token_score
30344
+
30345
+ # Each score is the logprob for the token in model response.
30346
+ # Corresponds to the JSON property `score`
30347
+ # @return [Float]
30348
+ attr_accessor :score
30349
+
30350
+ #
30351
+ # Corresponds to the JSON property `token`
30352
+ # @return [String]
30353
+ attr_accessor :token
30354
+
30355
+ def initialize(**args)
30356
+ update!(**args)
30357
+ end
30358
+
30359
+ # Update properties of this object
30360
+ def update!(**args)
30361
+ @end_token_score = args[:end_token_score] if args.key?(:end_token_score)
30362
+ @score = args[:score] if args.key?(:score)
30363
+ @token = args[:token] if args.key?(:token)
30364
+ end
30365
+ end
30366
+
30367
+ # Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
30368
+ # phrases together along with a corresponding punt If the closest matching
30369
+ # response is of the allowed type, we allow the response If the closest matching
30370
+ # response is of the blocked type, we block the response. eg: Blocked phrase - "
30371
+ # All lives matter"
30372
+ class LearningGenaiRootSimilarityTakedownPhrase
30373
+ include Google::Apis::Core::Hashable
30374
+
30375
+ #
30376
+ # Corresponds to the JSON property `blockedPhrase`
30377
+ # @return [String]
30378
+ attr_accessor :blocked_phrase
30379
+
30380
+ def initialize(**args)
30381
+ update!(**args)
30382
+ end
30383
+
30384
+ # Update properties of this object
30385
+ def update!(**args)
30386
+ @blocked_phrase = args[:blocked_phrase] if args.key?(:blocked_phrase)
30387
+ end
30388
+ end
30389
+
30390
+ #
30391
+ class LearningGenaiRootSimilarityTakedownResult
30392
+ include Google::Apis::Core::Hashable
30393
+
30394
+ # False when query or response should be taken down by any of the takedown rules,
30395
+ # true otherwise.
30396
+ # Corresponds to the JSON property `allowed`
30397
+ # @return [Boolean]
30398
+ attr_accessor :allowed
30399
+ alias_method :allowed?, :allowed
30400
+
30401
+ # List of similar phrases with score. Set only if allowed=false.
30402
+ # Corresponds to the JSON property `scoredPhrases`
30403
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScoredSimilarityTakedownPhrase>]
30404
+ attr_accessor :scored_phrases
30405
+
30406
+ def initialize(**args)
30407
+ update!(**args)
30408
+ end
30409
+
30410
+ # Update properties of this object
30411
+ def update!(**args)
30412
+ @allowed = args[:allowed] if args.key?(:allowed)
30413
+ @scored_phrases = args[:scored_phrases] if args.key?(:scored_phrases)
30414
+ end
30415
+ end
30416
+
30417
+ #
30418
+ class LearningGenaiRootTakedownResult
30419
+ include Google::Apis::Core::Hashable
30420
+
30421
+ # False when query or response should be taken down by any of the takedown rules,
30422
+ # true otherwise.
30423
+ # Corresponds to the JSON property `allowed`
30424
+ # @return [Boolean]
30425
+ attr_accessor :allowed
30426
+ alias_method :allowed?, :allowed
30427
+
30428
+ #
30429
+ # Corresponds to the JSON property `regexTakedownResult`
30430
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRegexTakedownResult]
30431
+ attr_accessor :regex_takedown_result
30432
+
30433
+ #
30434
+ # Corresponds to the JSON property `requestResponseTakedownResult`
30435
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootRequestResponseTakedownResult]
30436
+ attr_accessor :request_response_takedown_result
30437
+
30438
+ #
30439
+ # Corresponds to the JSON property `similarityTakedownResult`
30440
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownResult]
30441
+ attr_accessor :similarity_takedown_result
30442
+
30443
+ def initialize(**args)
30444
+ update!(**args)
30445
+ end
30446
+
30447
+ # Update properties of this object
30448
+ def update!(**args)
30449
+ @allowed = args[:allowed] if args.key?(:allowed)
30450
+ @regex_takedown_result = args[:regex_takedown_result] if args.key?(:regex_takedown_result)
30451
+ @request_response_takedown_result = args[:request_response_takedown_result] if args.key?(:request_response_takedown_result)
30452
+ @similarity_takedown_result = args[:similarity_takedown_result] if args.key?(:similarity_takedown_result)
30453
+ end
30454
+ end
30455
+
30456
+ # The type of score that bundled with a threshold, and will not be attending the
30457
+ # final score calculation. How each score type uses the threshold can be
30458
+ # implementation details.
30459
+ class LearningGenaiRootThresholdType
30460
+ include Google::Apis::Core::Hashable
30461
+
30462
+ #
30463
+ # Corresponds to the JSON property `scoreType`
30464
+ # @return [String]
30465
+ attr_accessor :score_type
30466
+
30467
+ #
30468
+ # Corresponds to the JSON property `threshold`
30469
+ # @return [Float]
30470
+ attr_accessor :threshold
30471
+
30472
+ def initialize(**args)
30473
+ update!(**args)
30474
+ end
30475
+
30476
+ # Update properties of this object
30477
+ def update!(**args)
30478
+ @score_type = args[:score_type] if args.key?(:score_type)
30479
+ @threshold = args[:threshold] if args.key?(:threshold)
30480
+ end
30481
+ end
30482
+
30483
+ # Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
30484
+ class LearningGenaiRootTokensAndLogProbPerDecodingStep
30485
+ include Google::Apis::Core::Hashable
30486
+
30487
+ # Length = total number of decoding steps. The chosen candidates may or may not
30488
+ # be in top_candidates.
30489
+ # Corresponds to the JSON property `chosenCandidates`
30490
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
30491
+ attr_accessor :chosen_candidates
30492
+
30493
+ # Length = total number of decoding steps.
30494
+ # Corresponds to the JSON property `topCandidates`
30495
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates>]
30496
+ attr_accessor :top_candidates
30497
+
30498
+ def initialize(**args)
30499
+ update!(**args)
30500
+ end
30501
+
30502
+ # Update properties of this object
30503
+ def update!(**args)
30504
+ @chosen_candidates = args[:chosen_candidates] if args.key?(:chosen_candidates)
30505
+ @top_candidates = args[:top_candidates] if args.key?(:top_candidates)
30506
+ end
30507
+ end
30508
+
30509
+ # A candidate at a decoding step.
30510
+ class LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate
30511
+ include Google::Apis::Core::Hashable
30512
+
30513
+ # The candidate's log probability.
30514
+ # Corresponds to the JSON property `logProbability`
30515
+ # @return [Float]
30516
+ attr_accessor :log_probability
30517
+
30518
+ # The candidate’s token value.
30519
+ # Corresponds to the JSON property `token`
30520
+ # @return [String]
30521
+ attr_accessor :token
30522
+
30523
+ def initialize(**args)
30524
+ update!(**args)
30525
+ end
30526
+
30527
+ # Update properties of this object
30528
+ def update!(**args)
30529
+ @log_probability = args[:log_probability] if args.key?(:log_probability)
30530
+ @token = args[:token] if args.key?(:token)
30531
+ end
30532
+ end
30533
+
30534
+ # Candidates with top log probabilities at each decoding step.
30535
+ class LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates
30536
+ include Google::Apis::Core::Hashable
30537
+
30538
+ # Sorted by log probability in descending order.
30539
+ # Corresponds to the JSON property `candidates`
30540
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
30541
+ attr_accessor :candidates
30542
+
30543
+ def initialize(**args)
30544
+ update!(**args)
30545
+ end
30546
+
30547
+ # Update properties of this object
30548
+ def update!(**args)
30549
+ @candidates = args[:candidates] if args.key?(:candidates)
30550
+ end
30551
+ end
30552
+
30553
+ # A model can generate multiple signals and this captures all the generated
30554
+ # signals for a single message.
30555
+ class LearningGenaiRootToxicityResult
30556
+ include Google::Apis::Core::Hashable
30557
+
30558
+ #
30559
+ # Corresponds to the JSON property `signals`
30560
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootToxicitySignal>]
30561
+ attr_accessor :signals
30562
+
30563
+ def initialize(**args)
30564
+ update!(**args)
30565
+ end
30566
+
30567
+ # Update properties of this object
30568
+ def update!(**args)
30569
+ @signals = args[:signals] if args.key?(:signals)
30570
+ end
30571
+ end
30572
+
30573
+ # Proto to capture a signal generated by the toxicity model.
30574
+ class LearningGenaiRootToxicitySignal
30575
+ include Google::Apis::Core::Hashable
30576
+
30577
+ #
30578
+ # Corresponds to the JSON property `allowed`
30579
+ # @return [Boolean]
30580
+ attr_accessor :allowed
30581
+ alias_method :allowed?, :allowed
30582
+
30583
+ #
30584
+ # Corresponds to the JSON property `label`
30585
+ # @return [String]
30586
+ attr_accessor :label
30587
+
30588
+ #
30589
+ # Corresponds to the JSON property `score`
30590
+ # @return [Float]
30591
+ attr_accessor :score
30592
+
30593
+ def initialize(**args)
30594
+ update!(**args)
30595
+ end
30596
+
30597
+ # Update properties of this object
30598
+ def update!(**args)
30599
+ @allowed = args[:allowed] if args.key?(:allowed)
30600
+ @label = args[:label] if args.key?(:label)
30601
+ @score = args[:score] if args.key?(:score)
30602
+ end
30603
+ end
30604
+
30605
+ # LINT.IfChange This metadata contains additional information required for
30606
+ # debugging.
30607
+ class LearningServingLlmMessageMetadata
30608
+ include Google::Apis::Core::Hashable
30609
+
30610
+ # Summary of classifier output. We attach this to all messages regardless of
30611
+ # whether classification rules triggered or not.
30612
+ # Corresponds to the JSON property `classifierSummary`
30613
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierOutputSummary]
30614
+ attr_accessor :classifier_summary
30615
+
30616
+ #
30617
+ # Corresponds to the JSON property `currentStreamTextLength`
30618
+ # @return [Fixnum]
30619
+ attr_accessor :current_stream_text_length
30620
+
30621
+ # Whether the corresponding message has been deleted.
30622
+ # Corresponds to the JSON property `deleted`
30623
+ # @return [Boolean]
30624
+ attr_accessor :deleted
30625
+ alias_method :deleted?, :deleted
30626
+
30627
+ # Metadata for filters that triggered.
30628
+ # Corresponds to the JSON property `filterMeta`
30629
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadata>]
30630
+ attr_accessor :filter_meta
30631
+
30632
+ # This score is finally used for ranking the message. This will be same as the
30633
+ # score present in `Message.score` field.
30634
+ # Corresponds to the JSON property `finalMessageScore`
30635
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
30636
+ attr_accessor :final_message_score
30637
+
30638
+ # NOT YET IMPLEMENTED.
30639
+ # Corresponds to the JSON property `finishReason`
30640
+ # @return [String]
30641
+ attr_accessor :finish_reason
30642
+
30643
+ #
30644
+ # Corresponds to the JSON property `groundingMetadata`
30645
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRootGroundingMetadata]
30646
+ attr_accessor :grounding_metadata
30647
+
30648
+ # Applies to Response message only. Indicates whether the message is a fallback
30649
+ # and the response would have otherwise been empty.
30650
+ # Corresponds to the JSON property `isFallback`
30651
+ # @return [Boolean]
30652
+ attr_accessor :is_fallback
30653
+ alias_method :is_fallback?, :is_fallback
30654
+
30655
+ # Result from nlp_saft DetectLanguage method. Currently the predicted language
30656
+ # code and language probability is used.
30657
+ # Corresponds to the JSON property `langidResult`
30658
+ # @return [Google::Apis::AiplatformV1::NlpSaftLangIdResult]
30659
+ attr_accessor :langid_result
30660
+
30661
+ # Detected language.
30662
+ # Corresponds to the JSON property `language`
30663
+ # @return [String]
30664
+ attr_accessor :language
30665
+
30666
+ # The LM prefix used to generate this response.
30667
+ # Corresponds to the JSON property `lmPrefix`
30668
+ # @return [String]
30669
+ attr_accessor :lm_prefix
30670
+
30671
+ # The original text generated by LLM. This is the raw output for debugging
30672
+ # purposes.
30673
+ # Corresponds to the JSON property `originalText`
30674
+ # @return [String]
30675
+ attr_accessor :original_text
30676
+
30677
+ # NOT YET IMPLEMENTED. Applies to streaming only. Number of tokens decoded /
30678
+ # emitted by the model as part of this stream. This may be different from
30679
+ # token_count, which contains number of tokens returned in this response after
30680
+ # any response rewriting / truncation.
30681
+ # Corresponds to the JSON property `perStreamDecodedTokenCount`
30682
+ # @return [Fixnum]
30683
+ attr_accessor :per_stream_decoded_token_count
30684
+
30685
+ # Results of running RAI on the query or this response candidate. One output per
30686
+ # rai_config. It will be populated regardless of whether the threshold is
30687
+ # exceeded or not.
30688
+ # Corresponds to the JSON property `raiOutputs`
30689
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput>]
30690
+ attr_accessor :rai_outputs
30691
+
30692
+ # The recitation result for one input
30693
+ # Corresponds to the JSON property `recitationResult`
30694
+ # @return [Google::Apis::AiplatformV1::LearningGenaiRecitationRecitationResult]
30695
+ attr_accessor :recitation_result
30696
+
30697
+ # NOT YET IMPLEMENTED. Number of tokens returned as part of this candidate.
30698
+ # Corresponds to the JSON property `returnTokenCount`
30699
+ # @return [Fixnum]
30700
+ attr_accessor :return_token_count
30701
+
30702
+ # All the different scores for a message are logged here.
30703
+ # Corresponds to the JSON property `scores`
30704
+ # @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScore>]
30705
+ attr_accessor :scores
30706
+
30707
+ # Whether the response is terminated during streaming return. Only used for
30708
+ # streaming requests.
30709
+ # Corresponds to the JSON property `streamTerminated`
30710
+ # @return [Boolean]
30711
+ attr_accessor :stream_terminated
30712
+ alias_method :stream_terminated?, :stream_terminated
30713
+
30714
+ # NOT YET IMPLEMENTED. Aggregated number of total tokens decoded so far. For
30715
+ # streaming, this is sum of all the tokens decoded so far i.e. aggregated count.
30716
+ # Corresponds to the JSON property `totalDecodedTokenCount`
30717
+ # @return [Fixnum]
30718
+ attr_accessor :total_decoded_token_count
30719
+
30720
+ # Translated user-prompt used for RAI post processing. This is for internal
30721
+ # processing only. We will translate in pre-processor and pass the translated
30722
+ # text to the post processor using this field. It will be empty if non of the
30723
+ # signals requested need translation.
30724
+ # Corresponds to the JSON property `translatedUserPrompts`
30725
+ # @return [Array<String>]
30726
+ attr_accessor :translated_user_prompts
30727
+
30728
+ # The RAI results for a given text.
30729
+ # Corresponds to the JSON property `vertexRaiResult`
30730
+ # @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult]
30731
+ attr_accessor :vertex_rai_result
30732
+
30733
+ def initialize(**args)
30734
+ update!(**args)
30735
+ end
30736
+
30737
+ # Update properties of this object
30738
+ def update!(**args)
30739
+ @classifier_summary = args[:classifier_summary] if args.key?(:classifier_summary)
30740
+ @current_stream_text_length = args[:current_stream_text_length] if args.key?(:current_stream_text_length)
30741
+ @deleted = args[:deleted] if args.key?(:deleted)
30742
+ @filter_meta = args[:filter_meta] if args.key?(:filter_meta)
30743
+ @final_message_score = args[:final_message_score] if args.key?(:final_message_score)
30744
+ @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
30745
+ @grounding_metadata = args[:grounding_metadata] if args.key?(:grounding_metadata)
30746
+ @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
30747
+ @langid_result = args[:langid_result] if args.key?(:langid_result)
30748
+ @language = args[:language] if args.key?(:language)
30749
+ @lm_prefix = args[:lm_prefix] if args.key?(:lm_prefix)
30750
+ @original_text = args[:original_text] if args.key?(:original_text)
30751
+ @per_stream_decoded_token_count = args[:per_stream_decoded_token_count] if args.key?(:per_stream_decoded_token_count)
30752
+ @rai_outputs = args[:rai_outputs] if args.key?(:rai_outputs)
30753
+ @recitation_result = args[:recitation_result] if args.key?(:recitation_result)
30754
+ @return_token_count = args[:return_token_count] if args.key?(:return_token_count)
30755
+ @scores = args[:scores] if args.key?(:scores)
30756
+ @stream_terminated = args[:stream_terminated] if args.key?(:stream_terminated)
30757
+ @total_decoded_token_count = args[:total_decoded_token_count] if args.key?(:total_decoded_token_count)
30758
+ @translated_user_prompts = args[:translated_user_prompts] if args.key?(:translated_user_prompts)
30759
+ @vertex_rai_result = args[:vertex_rai_result] if args.key?(:vertex_rai_result)
30760
+ end
30761
+ end
30762
+
30763
+ #
30764
+ class NlpSaftLangIdLocalesResult
30765
+ include Google::Apis::Core::Hashable
30766
+
30767
+ # List of locales in which the text would be considered acceptable. Sorted in
30768
+ # descending order according to each locale's respective likelihood. For example,
30769
+ # if a Portuguese text is acceptable in both Brazil and Portugal, but is more
30770
+ # strongly associated with Brazil, then the predictions would be ["pt-BR", "pt-
30771
+ # PT"], in that order. May be empty, indicating that the model did not predict
30772
+ # any acceptable locales.
30773
+ # Corresponds to the JSON property `predictions`
30774
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLangIdLocalesResultLocale>]
30775
+ attr_accessor :predictions
30776
+
30777
+ def initialize(**args)
30778
+ update!(**args)
30779
+ end
30780
+
30781
+ # Update properties of this object
30782
+ def update!(**args)
30783
+ @predictions = args[:predictions] if args.key?(:predictions)
30784
+ end
30785
+ end
30786
+
30787
+ #
30788
+ class NlpSaftLangIdLocalesResultLocale
30789
+ include Google::Apis::Core::Hashable
30790
+
30791
+ # A BCP 47 language code that includes region information. For example, "pt-BR"
30792
+ # or "pt-PT". This field will always be populated.
30793
+ # Corresponds to the JSON property `languageCode`
30794
+ # @return [String]
30795
+ attr_accessor :language_code
30796
+
30797
+ def initialize(**args)
30798
+ update!(**args)
30799
+ end
30800
+
30801
+ # Update properties of this object
30802
+ def update!(**args)
30803
+ @language_code = args[:language_code] if args.key?(:language_code)
30804
+ end
30805
+ end
30806
+
30807
+ #
30808
+ class NlpSaftLangIdResult
30809
+ include Google::Apis::Core::Hashable
30810
+
30811
+ # The version of the model used to create these annotations.
30812
+ # Corresponds to the JSON property `modelVersion`
30813
+ # @return [String]
30814
+ attr_accessor :model_version
30815
+
30816
+ # This field stores the n-best list of possible BCP 47 language code strings for
30817
+ # a given input sorted in descending order according to each code's respective
30818
+ # probability.
30819
+ # Corresponds to the JSON property `predictions`
30820
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpan>]
30821
+ attr_accessor :predictions
30822
+
30823
+ # This field stores language predictions of subspans of the input, when
30824
+ # available. Each LanguageSpanSequence is a sequence of LanguageSpans. A
30825
+ # particular sequence of LanguageSpans has an associated probability, and need
30826
+ # not necessarily cover the entire input. If no language could be predicted for
30827
+ # any span, then this field may be empty.
30828
+ # Corresponds to the JSON property `spanPredictions`
30829
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpanSequence>]
30830
+ attr_accessor :span_predictions
30831
+
30832
+ def initialize(**args)
30833
+ update!(**args)
30834
+ end
30835
+
30836
+ # Update properties of this object
30837
+ def update!(**args)
30838
+ @model_version = args[:model_version] if args.key?(:model_version)
30839
+ @predictions = args[:predictions] if args.key?(:predictions)
30840
+ @span_predictions = args[:span_predictions] if args.key?(:span_predictions)
30841
+ end
30842
+ end
30843
+
30844
+ #
30845
+ class NlpSaftLanguageSpan
30846
+ include Google::Apis::Core::Hashable
30847
+
30848
+ #
30849
+ # Corresponds to the JSON property `end`
30850
+ # @return [Fixnum]
30851
+ attr_accessor :end
30852
+
30853
+ # A BCP 47 language code for this span.
30854
+ # Corresponds to the JSON property `languageCode`
30855
+ # @return [String]
30856
+ attr_accessor :language_code
30857
+
30858
+ # Optional field containing any information that was predicted about the
30859
+ # specific locale(s) of the span.
30860
+ # Corresponds to the JSON property `locales`
30861
+ # @return [Google::Apis::AiplatformV1::NlpSaftLangIdLocalesResult]
30862
+ attr_accessor :locales
30863
+
30864
+ # A probability associated with this prediction.
30865
+ # Corresponds to the JSON property `probability`
30866
+ # @return [Float]
30867
+ attr_accessor :probability
30868
+
30869
+ # Start and end byte offsets, inclusive, within the given input string. A value
30870
+ # of -1 implies that this field is not set. Both fields must either be set with
30871
+ # a nonnegative value or both are unset. If both are unset then this
30872
+ # LanguageSpan applies to the entire input.
30873
+ # Corresponds to the JSON property `start`
30874
+ # @return [Fixnum]
30875
+ attr_accessor :start
30876
+
30877
+ def initialize(**args)
30878
+ update!(**args)
30879
+ end
30880
+
30881
+ # Update properties of this object
30882
+ def update!(**args)
30883
+ @end = args[:end] if args.key?(:end)
30884
+ @language_code = args[:language_code] if args.key?(:language_code)
30885
+ @locales = args[:locales] if args.key?(:locales)
30886
+ @probability = args[:probability] if args.key?(:probability)
30887
+ @start = args[:start] if args.key?(:start)
30888
+ end
30889
+ end
30890
+
30891
+ #
30892
+ class NlpSaftLanguageSpanSequence
30893
+ include Google::Apis::Core::Hashable
30894
+
30895
+ # A sequence of LanguageSpan objects, each assigning a language to a subspan of
30896
+ # the input.
30897
+ # Corresponds to the JSON property `languageSpans`
30898
+ # @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpan>]
30899
+ attr_accessor :language_spans
30900
+
30901
+ # The probability of this sequence of LanguageSpans.
30902
+ # Corresponds to the JSON property `probability`
30903
+ # @return [Float]
30904
+ attr_accessor :probability
30905
+
30906
+ def initialize(**args)
30907
+ update!(**args)
30908
+ end
30909
+
30910
+ # Update properties of this object
30911
+ def update!(**args)
30912
+ @language_spans = args[:language_spans] if args.key?(:language_spans)
30913
+ @probability = args[:probability] if args.key?(:probability)
30914
+ end
30915
+ end
30916
+
30917
+ # This is proto2's version of MessageSet.
30918
+ class Proto2BridgeMessageSet
30919
+ include Google::Apis::Core::Hashable
30920
+
30921
+ def initialize(**args)
30922
+ update!(**args)
30923
+ end
30924
+
30925
+ # Update properties of this object
30926
+ def update!(**args)
30927
+ end
30928
+ end
30929
+
30930
+ # Wire-format for a Status object
30931
+ class UtilStatusProto
30932
+ include Google::Apis::Core::Hashable
30933
+
30934
+ # The canonical error code (see codes.proto) that most closely corresponds to
30935
+ # this status. This may be missing, and in the common case of the generic space,
30936
+ # it definitely will be.
30937
+ # Corresponds to the JSON property `canonicalCode`
30938
+ # @return [Fixnum]
30939
+ attr_accessor :canonical_code
30940
+
30941
+ # Numeric code drawn from the space specified below. Often, this is the
30942
+ # canonical error space, and code is drawn from google3/util/task/codes.proto
30943
+ # Corresponds to the JSON property `code`
30944
+ # @return [Fixnum]
30945
+ attr_accessor :code
30946
+
30947
+ # Detail message
30948
+ # Corresponds to the JSON property `message`
30949
+ # @return [String]
30950
+ attr_accessor :message
30951
+
30952
+ # This is proto2's version of MessageSet.
30953
+ # Corresponds to the JSON property `messageSet`
30954
+ # @return [Google::Apis::AiplatformV1::Proto2BridgeMessageSet]
30955
+ attr_accessor :message_set
30956
+
30957
+ # The following are usually only present when code != 0 Space to which this
30958
+ # status belongs
30959
+ # Corresponds to the JSON property `space`
30960
+ # @return [String]
30961
+ attr_accessor :space
30962
+
30963
+ def initialize(**args)
30964
+ update!(**args)
30965
+ end
30966
+
30967
+ # Update properties of this object
30968
+ def update!(**args)
30969
+ @canonical_code = args[:canonical_code] if args.key?(:canonical_code)
30970
+ @code = args[:code] if args.key?(:code)
30971
+ @message = args[:message] if args.key?(:message)
30972
+ @message_set = args[:message_set] if args.key?(:message_set)
30973
+ @space = args[:space] if args.key?(:space)
30974
+ end
30975
+ end
28167
30976
  end
28168
30977
  end
28169
30978
  end