google-apis-aiplatform_v1beta1 0.14.0 → 0.15.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/google/apis/aiplatform_v1beta1/classes.rb +2495 -29
- data/lib/google/apis/aiplatform_v1beta1/gem_version.rb +3 -3
- data/lib/google/apis/aiplatform_v1beta1/representations.rb +4796 -3777
- data/lib/google/apis/aiplatform_v1beta1/service.rb +1023 -106
- metadata +6 -6
@@ -647,6 +647,12 @@ module Google
|
|
647
647
|
# @return [Array<Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceCandidate>]
|
648
648
|
attr_accessor :candidates
|
649
649
|
|
650
|
+
# Debug information containing message metadata. Clients should not consume this
|
651
|
+
# field, and this is only populated for Flow Runner path.
|
652
|
+
# Corresponds to the JSON property `debugMetadata`
|
653
|
+
# @return [Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceMessageMetadata]
|
654
|
+
attr_accessor :debug_metadata
|
655
|
+
|
650
656
|
# Content filter results for a prompt sent in the request.
|
651
657
|
# Corresponds to the JSON property `promptFeedback`
|
652
658
|
# @return [Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServicePromptFeedback]
|
@@ -669,12 +675,46 @@ module Google
|
|
669
675
|
# Update properties of this object
|
670
676
|
def update!(**args)
|
671
677
|
@candidates = args[:candidates] if args.key?(:candidates)
|
678
|
+
@debug_metadata = args[:debug_metadata] if args.key?(:debug_metadata)
|
672
679
|
@prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
|
673
680
|
@reporting_metrics = args[:reporting_metrics] if args.key?(:reporting_metrics)
|
674
681
|
@usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
|
675
682
|
end
|
676
683
|
end
|
677
684
|
|
685
|
+
#
|
686
|
+
class CloudAiNlLlmProtoServiceMessageMetadata
|
687
|
+
include Google::Apis::Core::Hashable
|
688
|
+
|
689
|
+
# LINT.IfChange This metadata contains additional information required for
|
690
|
+
# debugging.
|
691
|
+
# Corresponds to the JSON property `inputFilterInfo`
|
692
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningServingLlmMessageMetadata]
|
693
|
+
attr_accessor :input_filter_info
|
694
|
+
|
695
|
+
# Holds the final routing decision, by storing the model_config_id. And
|
696
|
+
# individual scores each model got.
|
697
|
+
# Corresponds to the JSON property `modelRoutingDecision`
|
698
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRoutingDecision]
|
699
|
+
attr_accessor :model_routing_decision
|
700
|
+
|
701
|
+
# Filter metadata of the output messages.
|
702
|
+
# Corresponds to the JSON property `outputFilterInfo`
|
703
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningServingLlmMessageMetadata>]
|
704
|
+
attr_accessor :output_filter_info
|
705
|
+
|
706
|
+
def initialize(**args)
|
707
|
+
update!(**args)
|
708
|
+
end
|
709
|
+
|
710
|
+
# Update properties of this object
|
711
|
+
def update!(**args)
|
712
|
+
@input_filter_info = args[:input_filter_info] if args.key?(:input_filter_info)
|
713
|
+
@model_routing_decision = args[:model_routing_decision] if args.key?(:model_routing_decision)
|
714
|
+
@output_filter_info = args[:output_filter_info] if args.key?(:output_filter_info)
|
715
|
+
end
|
716
|
+
end
|
717
|
+
|
678
718
|
# A single part of a message.
|
679
719
|
class CloudAiNlLlmProtoServicePart
|
680
720
|
include Google::Apis::Core::Hashable
|
@@ -837,6 +877,122 @@ module Google
|
|
837
877
|
end
|
838
878
|
end
|
839
879
|
|
880
|
+
# The RAI results for a given text.
|
881
|
+
class CloudAiNlLlmProtoServiceRaiResult
|
882
|
+
include Google::Apis::Core::Hashable
|
883
|
+
|
884
|
+
# The recitation result for one input
|
885
|
+
# Corresponds to the JSON property `aidaRecitationResult`
|
886
|
+
# @return [Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoRecitationResult]
|
887
|
+
attr_accessor :aida_recitation_result
|
888
|
+
|
889
|
+
# Use `triggered_blocklist`.
|
890
|
+
# Corresponds to the JSON property `blocked`
|
891
|
+
# @return [Boolean]
|
892
|
+
attr_accessor :blocked
|
893
|
+
alias_method :blocked?, :blocked
|
894
|
+
|
895
|
+
# The error codes indicate which RAI filters block the response.
|
896
|
+
# Corresponds to the JSON property `errorCodes`
|
897
|
+
# @return [Array<Fixnum>]
|
898
|
+
attr_accessor :error_codes
|
899
|
+
|
900
|
+
# Whether the text should be filtered and not shown to the end user. This is
|
901
|
+
# determined based on a combination of `triggered_recitation`, `
|
902
|
+
# triggered_blocklist`, `language_filter_result`, and `triggered_safety_filter`.
|
903
|
+
# Corresponds to the JSON property `filtered`
|
904
|
+
# @return [Boolean]
|
905
|
+
attr_accessor :filtered
|
906
|
+
alias_method :filtered?, :filtered
|
907
|
+
|
908
|
+
# Language filter result from SAFT LangId.
|
909
|
+
# Corresponds to the JSON property `languageFilterResult`
|
910
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningServingLlmLanguageFilterResult]
|
911
|
+
attr_accessor :language_filter_result
|
912
|
+
|
913
|
+
# The RAI signals for the text.
|
914
|
+
# Corresponds to the JSON property `raiSignals`
|
915
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceRaiSignal>]
|
916
|
+
attr_accessor :rai_signals
|
917
|
+
|
918
|
+
# Whether the text triggered the blocklist.
|
919
|
+
# Corresponds to the JSON property `triggeredBlocklist`
|
920
|
+
# @return [Boolean]
|
921
|
+
attr_accessor :triggered_blocklist
|
922
|
+
alias_method :triggered_blocklist?, :triggered_blocklist
|
923
|
+
|
924
|
+
# Whether the text should be blocked by the recitation result from Aida
|
925
|
+
# recitation checker. It is determined from aida_recitation_result.
|
926
|
+
# Corresponds to the JSON property `triggeredRecitation`
|
927
|
+
# @return [Boolean]
|
928
|
+
attr_accessor :triggered_recitation
|
929
|
+
alias_method :triggered_recitation?, :triggered_recitation
|
930
|
+
|
931
|
+
# Whether the text triggered the safety filter. Currently, this is due to CSAI
|
932
|
+
# triggering or one of four categories (derogatory, sexual, toxic, violent)
|
933
|
+
# having a score over the filter threshold.
|
934
|
+
# Corresponds to the JSON property `triggeredSafetyFilter`
|
935
|
+
# @return [Boolean]
|
936
|
+
attr_accessor :triggered_safety_filter
|
937
|
+
alias_method :triggered_safety_filter?, :triggered_safety_filter
|
938
|
+
|
939
|
+
def initialize(**args)
|
940
|
+
update!(**args)
|
941
|
+
end
|
942
|
+
|
943
|
+
# Update properties of this object
|
944
|
+
def update!(**args)
|
945
|
+
@aida_recitation_result = args[:aida_recitation_result] if args.key?(:aida_recitation_result)
|
946
|
+
@blocked = args[:blocked] if args.key?(:blocked)
|
947
|
+
@error_codes = args[:error_codes] if args.key?(:error_codes)
|
948
|
+
@filtered = args[:filtered] if args.key?(:filtered)
|
949
|
+
@language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
|
950
|
+
@rai_signals = args[:rai_signals] if args.key?(:rai_signals)
|
951
|
+
@triggered_blocklist = args[:triggered_blocklist] if args.key?(:triggered_blocklist)
|
952
|
+
@triggered_recitation = args[:triggered_recitation] if args.key?(:triggered_recitation)
|
953
|
+
@triggered_safety_filter = args[:triggered_safety_filter] if args.key?(:triggered_safety_filter)
|
954
|
+
end
|
955
|
+
end
|
956
|
+
|
957
|
+
# An RAI signal for a single category.
|
958
|
+
class CloudAiNlLlmProtoServiceRaiSignal
|
959
|
+
include Google::Apis::Core::Hashable
|
960
|
+
|
961
|
+
# The confidence level for the RAI category.
|
962
|
+
# Corresponds to the JSON property `confidence`
|
963
|
+
# @return [String]
|
964
|
+
attr_accessor :confidence
|
965
|
+
|
966
|
+
# Whether the category is flagged as being present. Currently, this is set to
|
967
|
+
# true if score >= 0.5.
|
968
|
+
# Corresponds to the JSON property `flagged`
|
969
|
+
# @return [Boolean]
|
970
|
+
attr_accessor :flagged
|
971
|
+
alias_method :flagged?, :flagged
|
972
|
+
|
973
|
+
# The RAI category.
|
974
|
+
# Corresponds to the JSON property `raiCategory`
|
975
|
+
# @return [String]
|
976
|
+
attr_accessor :rai_category
|
977
|
+
|
978
|
+
# The score for the category, in the range [0.0, 1.0].
|
979
|
+
# Corresponds to the JSON property `score`
|
980
|
+
# @return [Float]
|
981
|
+
attr_accessor :score
|
982
|
+
|
983
|
+
def initialize(**args)
|
984
|
+
update!(**args)
|
985
|
+
end
|
986
|
+
|
987
|
+
# Update properties of this object
|
988
|
+
def update!(**args)
|
989
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
990
|
+
@flagged = args[:flagged] if args.key?(:flagged)
|
991
|
+
@rai_category = args[:rai_category] if args.key?(:rai_category)
|
992
|
+
@score = args[:score] if args.key?(:score)
|
993
|
+
end
|
994
|
+
end
|
995
|
+
|
840
996
|
# Safety rating corresponding to the generated content.
|
841
997
|
class CloudAiNlLlmProtoServiceSafetyRating
|
842
998
|
include Google::Apis::Core::Hashable
|
@@ -7964,7 +8120,8 @@ module Google
|
|
7964
8120
|
|
7965
8121
|
# The dedicated serving endpoint for this FeatureOnlineStore. Only need to set
|
7966
8122
|
# when you choose Optimized storage type or enable EmbeddingManagement. Will use
|
7967
|
-
# public endpoint by default.
|
8123
|
+
# public endpoint by default. Note, for EmbeddingManagement use case, only [
|
8124
|
+
# DedicatedServingEndpoint.public_endpoint_domain_name] is available now.
|
7968
8125
|
# Corresponds to the JSON property `dedicatedServingEndpoint`
|
7969
8126
|
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1FeatureOnlineStoreDedicatedServingEndpoint]
|
7970
8127
|
attr_accessor :dedicated_serving_endpoint
|
@@ -8091,7 +8248,8 @@ module Google
|
|
8091
8248
|
|
8092
8249
|
# The dedicated serving endpoint for this FeatureOnlineStore. Only need to set
|
8093
8250
|
# when you choose Optimized storage type or enable EmbeddingManagement. Will use
|
8094
|
-
# public endpoint by default.
|
8251
|
+
# public endpoint by default. Note, for EmbeddingManagement use case, only [
|
8252
|
+
# DedicatedServingEndpoint.public_endpoint_domain_name] is available now.
|
8095
8253
|
class GoogleCloudAiplatformV1beta1FeatureOnlineStoreDedicatedServingEndpoint
|
8096
8254
|
include Google::Apis::Core::Hashable
|
8097
8255
|
|
@@ -9645,12 +9803,6 @@ module Google
|
|
9645
9803
|
# @return [Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content>]
|
9646
9804
|
attr_accessor :contents
|
9647
9805
|
|
9648
|
-
# Required. The name of the Endpoint requested to serve the prediction. Format: `
|
9649
|
-
# projects/`project`/locations/`location`/endpoints/`endpoint``
|
9650
|
-
# Corresponds to the JSON property `endpoint`
|
9651
|
-
# @return [String]
|
9652
|
-
attr_accessor :endpoint
|
9653
|
-
|
9654
9806
|
# Generation config.
|
9655
9807
|
# Corresponds to the JSON property `generationConfig`
|
9656
9808
|
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerationConfig]
|
@@ -9677,7 +9829,6 @@ module Google
|
|
9677
9829
|
# Update properties of this object
|
9678
9830
|
def update!(**args)
|
9679
9831
|
@contents = args[:contents] if args.key?(:contents)
|
9680
|
-
@endpoint = args[:endpoint] if args.key?(:endpoint)
|
9681
9832
|
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
9682
9833
|
@safety_settings = args[:safety_settings] if args.key?(:safety_settings)
|
9683
9834
|
@tools = args[:tools] if args.key?(:tools)
|
@@ -17239,6 +17390,11 @@ module Google
|
|
17239
17390
|
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences]
|
17240
17391
|
attr_accessor :open_fine_tuning_pipeline
|
17241
17392
|
|
17393
|
+
# Open fine tuning pipelines.
|
17394
|
+
# Corresponds to the JSON property `openFineTuningPipelines`
|
17395
|
+
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines]
|
17396
|
+
attr_accessor :open_fine_tuning_pipelines
|
17397
|
+
|
17242
17398
|
# The regional resource name or the URI. Key is region, e.g., us-central1,
|
17243
17399
|
# europe-west2, global, etc..
|
17244
17400
|
# Corresponds to the JSON property `openGenerationAiStudio`
|
@@ -17257,6 +17413,11 @@ module Google
|
|
17257
17413
|
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences]
|
17258
17414
|
attr_accessor :open_notebook
|
17259
17415
|
|
17416
|
+
# Open notebooks.
|
17417
|
+
# Corresponds to the JSON property `openNotebooks`
|
17418
|
+
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenNotebooks]
|
17419
|
+
attr_accessor :open_notebooks
|
17420
|
+
|
17260
17421
|
# The regional resource name or the URI. Key is region, e.g., us-central1,
|
17261
17422
|
# europe-west2, global, etc..
|
17262
17423
|
# Corresponds to the JSON property `openPromptTuningPipeline`
|
@@ -17284,9 +17445,11 @@ module Google
|
|
17284
17445
|
@deploy = args[:deploy] if args.key?(:deploy)
|
17285
17446
|
@open_evaluation_pipeline = args[:open_evaluation_pipeline] if args.key?(:open_evaluation_pipeline)
|
17286
17447
|
@open_fine_tuning_pipeline = args[:open_fine_tuning_pipeline] if args.key?(:open_fine_tuning_pipeline)
|
17448
|
+
@open_fine_tuning_pipelines = args[:open_fine_tuning_pipelines] if args.key?(:open_fine_tuning_pipelines)
|
17287
17449
|
@open_generation_ai_studio = args[:open_generation_ai_studio] if args.key?(:open_generation_ai_studio)
|
17288
17450
|
@open_genie = args[:open_genie] if args.key?(:open_genie)
|
17289
17451
|
@open_notebook = args[:open_notebook] if args.key?(:open_notebook)
|
17452
|
+
@open_notebooks = args[:open_notebooks] if args.key?(:open_notebooks)
|
17290
17453
|
@open_prompt_tuning_pipeline = args[:open_prompt_tuning_pipeline] if args.key?(:open_prompt_tuning_pipeline)
|
17291
17454
|
@request_access = args[:request_access] if args.key?(:request_access)
|
17292
17455
|
@view_rest_api = args[:view_rest_api] if args.key?(:view_rest_api)
|
@@ -17370,6 +17533,44 @@ module Google
|
|
17370
17533
|
end
|
17371
17534
|
end
|
17372
17535
|
|
17536
|
+
# Open fine tuning pipelines.
|
17537
|
+
class GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenFineTuningPipelines
|
17538
|
+
include Google::Apis::Core::Hashable
|
17539
|
+
|
17540
|
+
# Required. Regional resource references to fine tuning pipelines.
|
17541
|
+
# Corresponds to the JSON property `fineTuningPipelines`
|
17542
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences>]
|
17543
|
+
attr_accessor :fine_tuning_pipelines
|
17544
|
+
|
17545
|
+
def initialize(**args)
|
17546
|
+
update!(**args)
|
17547
|
+
end
|
17548
|
+
|
17549
|
+
# Update properties of this object
|
17550
|
+
def update!(**args)
|
17551
|
+
@fine_tuning_pipelines = args[:fine_tuning_pipelines] if args.key?(:fine_tuning_pipelines)
|
17552
|
+
end
|
17553
|
+
end
|
17554
|
+
|
17555
|
+
# Open notebooks.
|
17556
|
+
class GoogleCloudAiplatformV1beta1PublisherModelCallToActionOpenNotebooks
|
17557
|
+
include Google::Apis::Core::Hashable
|
17558
|
+
|
17559
|
+
# Required. Regional resource references to notebooks.
|
17560
|
+
# Corresponds to the JSON property `notebooks`
|
17561
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences>]
|
17562
|
+
attr_accessor :notebooks
|
17563
|
+
|
17564
|
+
def initialize(**args)
|
17565
|
+
update!(**args)
|
17566
|
+
end
|
17567
|
+
|
17568
|
+
# Update properties of this object
|
17569
|
+
def update!(**args)
|
17570
|
+
@notebooks = args[:notebooks] if args.key?(:notebooks)
|
17571
|
+
end
|
17572
|
+
end
|
17573
|
+
|
17373
17574
|
# The regional resource name or the URI. Key is region, e.g., us-central1,
|
17374
17575
|
# europe-west2, global, etc..
|
17375
17576
|
class GoogleCloudAiplatformV1beta1PublisherModelCallToActionRegionalResourceReferences
|
@@ -17380,7 +17581,22 @@ module Google
|
|
17380
17581
|
# @return [Hash<String,Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PublisherModelResourceReference>]
|
17381
17582
|
attr_accessor :references
|
17382
17583
|
|
17383
|
-
#
|
17584
|
+
# Optional. Description of the resource.
|
17585
|
+
# Corresponds to the JSON property `resourceDescription`
|
17586
|
+
# @return [String]
|
17587
|
+
attr_accessor :resource_description
|
17588
|
+
|
17589
|
+
# Optional. Title of the resource.
|
17590
|
+
# Corresponds to the JSON property `resourceTitle`
|
17591
|
+
# @return [String]
|
17592
|
+
attr_accessor :resource_title
|
17593
|
+
|
17594
|
+
# Optional. Use case (CUJ) of the resource.
|
17595
|
+
# Corresponds to the JSON property `resourceUseCase`
|
17596
|
+
# @return [String]
|
17597
|
+
attr_accessor :resource_use_case
|
17598
|
+
|
17599
|
+
# Required.
|
17384
17600
|
# Corresponds to the JSON property `title`
|
17385
17601
|
# @return [String]
|
17386
17602
|
attr_accessor :title
|
@@ -17392,6 +17608,9 @@ module Google
|
|
17392
17608
|
# Update properties of this object
|
17393
17609
|
def update!(**args)
|
17394
17610
|
@references = args[:references] if args.key?(:references)
|
17611
|
+
@resource_description = args[:resource_description] if args.key?(:resource_description)
|
17612
|
+
@resource_title = args[:resource_title] if args.key?(:resource_title)
|
17613
|
+
@resource_use_case = args[:resource_use_case] if args.key?(:resource_use_case)
|
17395
17614
|
@title = args[:title] if args.key?(:title)
|
17396
17615
|
end
|
17397
17616
|
end
|
@@ -18227,25 +18446,6 @@ module Google
|
|
18227
18446
|
end
|
18228
18447
|
end
|
18229
18448
|
|
18230
|
-
# Details of operations that perform reboot PersistentResource.
|
18231
|
-
class GoogleCloudAiplatformV1beta1RebootPersistentResourceOperationMetadata
|
18232
|
-
include Google::Apis::Core::Hashable
|
18233
|
-
|
18234
|
-
# Generic Metadata shared by all operations.
|
18235
|
-
# Corresponds to the JSON property `genericMetadata`
|
18236
|
-
# @return [Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenericOperationMetadata]
|
18237
|
-
attr_accessor :generic_metadata
|
18238
|
-
|
18239
|
-
def initialize(**args)
|
18240
|
-
update!(**args)
|
18241
|
-
end
|
18242
|
-
|
18243
|
-
# Update properties of this object
|
18244
|
-
def update!(**args)
|
18245
|
-
@generic_metadata = args[:generic_metadata] if args.key?(:generic_metadata)
|
18246
|
-
end
|
18247
|
-
end
|
18248
|
-
|
18249
18449
|
# Request message for MetadataService.DeleteContextChildrenRequest.
|
18250
18450
|
class GoogleCloudAiplatformV1beta1RemoveContextChildrenRequest
|
18251
18451
|
include Google::Apis::Core::Hashable
|
@@ -29556,6 +29756,2272 @@ module Google
|
|
29556
29756
|
@metric_entries = args[:metric_entries] if args.key?(:metric_entries)
|
29557
29757
|
end
|
29558
29758
|
end
|
29759
|
+
|
29760
|
+
# The proto defines the attribution information for a document using whatever
|
29761
|
+
# fields are most applicable for that document's datasource. For example, a
|
29762
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
29763
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
29764
|
+
# id:28
|
29765
|
+
class LanguageLabsAidaTrustRecitationProtoDocAttribution
|
29766
|
+
include Google::Apis::Core::Hashable
|
29767
|
+
|
29768
|
+
#
|
29769
|
+
# Corresponds to the JSON property `amarnaId`
|
29770
|
+
# @return [String]
|
29771
|
+
attr_accessor :amarna_id
|
29772
|
+
|
29773
|
+
#
|
29774
|
+
# Corresponds to the JSON property `arxivId`
|
29775
|
+
# @return [String]
|
29776
|
+
attr_accessor :arxiv_id
|
29777
|
+
|
29778
|
+
#
|
29779
|
+
# Corresponds to the JSON property `author`
|
29780
|
+
# @return [String]
|
29781
|
+
attr_accessor :author
|
29782
|
+
|
29783
|
+
#
|
29784
|
+
# Corresponds to the JSON property `bibkey`
|
29785
|
+
# @return [String]
|
29786
|
+
attr_accessor :bibkey
|
29787
|
+
|
29788
|
+
#
|
29789
|
+
# Corresponds to the JSON property `bookTitle`
|
29790
|
+
# @return [String]
|
29791
|
+
attr_accessor :book_title
|
29792
|
+
|
29793
|
+
# The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
|
29794
|
+
# of a book. There is a deterministic function from a volume id to a URL under
|
29795
|
+
# the books.google.com domain. Marked as 'optional' since a volume ID of zero is
|
29796
|
+
# potentially possible and we want to distinguish that from the volume ID not
|
29797
|
+
# being set.
|
29798
|
+
# Corresponds to the JSON property `bookVolumeId`
|
29799
|
+
# @return [Fixnum]
|
29800
|
+
attr_accessor :book_volume_id
|
29801
|
+
|
29802
|
+
#
|
29803
|
+
# Corresponds to the JSON property `category`
|
29804
|
+
# @return [String]
|
29805
|
+
attr_accessor :category
|
29806
|
+
|
29807
|
+
#
|
29808
|
+
# Corresponds to the JSON property `conversationId`
|
29809
|
+
# @return [String]
|
29810
|
+
attr_accessor :conversation_id
|
29811
|
+
|
29812
|
+
# The dataset this document comes from.
|
29813
|
+
# Corresponds to the JSON property `dataset`
|
29814
|
+
# @return [String]
|
29815
|
+
attr_accessor :dataset
|
29816
|
+
|
29817
|
+
#
|
29818
|
+
# Corresponds to the JSON property `filepath`
|
29819
|
+
# @return [String]
|
29820
|
+
attr_accessor :filepath
|
29821
|
+
|
29822
|
+
#
|
29823
|
+
# Corresponds to the JSON property `geminiId`
|
29824
|
+
# @return [String]
|
29825
|
+
attr_accessor :gemini_id
|
29826
|
+
|
29827
|
+
#
|
29828
|
+
# Corresponds to the JSON property `gnewsArticleTitle`
|
29829
|
+
# @return [String]
|
29830
|
+
attr_accessor :gnews_article_title
|
29831
|
+
|
29832
|
+
#
|
29833
|
+
# Corresponds to the JSON property `goodallExampleId`
|
29834
|
+
# @return [String]
|
29835
|
+
attr_accessor :goodall_example_id
|
29836
|
+
|
29837
|
+
# Whether the document is opted out.
|
29838
|
+
# Corresponds to the JSON property `isOptOut`
|
29839
|
+
# @return [Boolean]
|
29840
|
+
attr_accessor :is_opt_out
|
29841
|
+
alias_method :is_opt_out?, :is_opt_out
|
29842
|
+
|
29843
|
+
#
|
29844
|
+
# Corresponds to the JSON property `isPrompt`
|
29845
|
+
# @return [Boolean]
|
29846
|
+
attr_accessor :is_prompt
|
29847
|
+
alias_method :is_prompt?, :is_prompt
|
29848
|
+
|
29849
|
+
#
|
29850
|
+
# Corresponds to the JSON property `lamdaExampleId`
|
29851
|
+
# @return [String]
|
29852
|
+
attr_accessor :lamda_example_id
|
29853
|
+
|
29854
|
+
#
|
29855
|
+
# Corresponds to the JSON property `license`
|
29856
|
+
# @return [String]
|
29857
|
+
attr_accessor :license
|
29858
|
+
|
29859
|
+
#
|
29860
|
+
# Corresponds to the JSON property `meenaConversationId`
|
29861
|
+
# @return [String]
|
29862
|
+
attr_accessor :meena_conversation_id
|
29863
|
+
|
29864
|
+
# Natural (not programming) language of the document. Language code as defined
|
29865
|
+
# by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
|
29866
|
+
# html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
|
29867
|
+
# & read language fields. See go/iii.
|
29868
|
+
# Corresponds to the JSON property `naturalLanguageCode`
|
29869
|
+
# @return [String]
|
29870
|
+
attr_accessor :natural_language_code
|
29871
|
+
|
29872
|
+
# True if this doc has no attribution information available. We use an explicit
|
29873
|
+
# field for this instead of just implicitly leaving all the DocAttribution
|
29874
|
+
# fields blank to distinguish a case where a bug/oversight has left the
|
29875
|
+
# attribution information empty vs when we really have no attribution
|
29876
|
+
# information available.
|
29877
|
+
# Corresponds to the JSON property `noAttribution`
|
29878
|
+
# @return [Boolean]
|
29879
|
+
attr_accessor :no_attribution
|
29880
|
+
alias_method :no_attribution?, :no_attribution
|
29881
|
+
|
29882
|
+
#
|
29883
|
+
# Corresponds to the JSON property `podcastUtteranceId`
|
29884
|
+
# @return [String]
|
29885
|
+
attr_accessor :podcast_utterance_id
|
29886
|
+
|
29887
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
29888
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
29889
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
29890
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
29891
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
29892
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
29893
|
+
# example, a credit card expiration date). Related types: * google.type.
|
29894
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
29895
|
+
# Corresponds to the JSON property `publicationDate`
|
29896
|
+
# @return [Google::Apis::AiplatformV1beta1::GoogleTypeDate]
|
29897
|
+
attr_accessor :publication_date
|
29898
|
+
|
29899
|
+
# This field is for opt-out experiment only, MUST never be used during actual
|
29900
|
+
# production/serving.
|
29901
|
+
# Corresponds to the JSON property `qualityScoreExperimentOnly`
|
29902
|
+
# @return [Float]
|
29903
|
+
attr_accessor :quality_score_experiment_only
|
29904
|
+
|
29905
|
+
# Github repository
|
29906
|
+
# Corresponds to the JSON property `repo`
|
29907
|
+
# @return [String]
|
29908
|
+
attr_accessor :repo
|
29909
|
+
|
29910
|
+
# URL of a webdoc
|
29911
|
+
# Corresponds to the JSON property `url`
|
29912
|
+
# @return [String]
|
29913
|
+
attr_accessor :url
|
29914
|
+
|
29915
|
+
#
|
29916
|
+
# Corresponds to the JSON property `volumeId`
|
29917
|
+
# @return [String]
|
29918
|
+
attr_accessor :volume_id
|
29919
|
+
|
29920
|
+
# Wikipedia article title. The Wikipedia TFDS dataset includes article titles
|
29921
|
+
# but not URLs. While a URL is to the best of our knowledge a deterministic
|
29922
|
+
# function of the title, we store the original title to reflect the information
|
29923
|
+
# in the original dataset.
|
29924
|
+
# Corresponds to the JSON property `wikipediaArticleTitle`
|
29925
|
+
# @return [String]
|
29926
|
+
attr_accessor :wikipedia_article_title
|
29927
|
+
|
29928
|
+
def initialize(**args)
|
29929
|
+
update!(**args)
|
29930
|
+
end
|
29931
|
+
|
29932
|
+
# Update properties of this object
|
29933
|
+
def update!(**args)
|
29934
|
+
@amarna_id = args[:amarna_id] if args.key?(:amarna_id)
|
29935
|
+
@arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
|
29936
|
+
@author = args[:author] if args.key?(:author)
|
29937
|
+
@bibkey = args[:bibkey] if args.key?(:bibkey)
|
29938
|
+
@book_title = args[:book_title] if args.key?(:book_title)
|
29939
|
+
@book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
|
29940
|
+
@category = args[:category] if args.key?(:category)
|
29941
|
+
@conversation_id = args[:conversation_id] if args.key?(:conversation_id)
|
29942
|
+
@dataset = args[:dataset] if args.key?(:dataset)
|
29943
|
+
@filepath = args[:filepath] if args.key?(:filepath)
|
29944
|
+
@gemini_id = args[:gemini_id] if args.key?(:gemini_id)
|
29945
|
+
@gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
|
29946
|
+
@goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
|
29947
|
+
@is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
|
29948
|
+
@is_prompt = args[:is_prompt] if args.key?(:is_prompt)
|
29949
|
+
@lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
|
29950
|
+
@license = args[:license] if args.key?(:license)
|
29951
|
+
@meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
|
29952
|
+
@natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
|
29953
|
+
@no_attribution = args[:no_attribution] if args.key?(:no_attribution)
|
29954
|
+
@podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
|
29955
|
+
@publication_date = args[:publication_date] if args.key?(:publication_date)
|
29956
|
+
@quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
|
29957
|
+
@repo = args[:repo] if args.key?(:repo)
|
29958
|
+
@url = args[:url] if args.key?(:url)
|
29959
|
+
@volume_id = args[:volume_id] if args.key?(:volume_id)
|
29960
|
+
@wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
|
29961
|
+
end
|
29962
|
+
end
|
29963
|
+
|
29964
|
+
# The recitation result for one input
|
29965
|
+
class LanguageLabsAidaTrustRecitationProtoRecitationResult
|
29966
|
+
include Google::Apis::Core::Hashable
|
29967
|
+
|
29968
|
+
#
|
29969
|
+
# Corresponds to the JSON property `dynamicSegmentResults`
|
29970
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
29971
|
+
attr_accessor :dynamic_segment_results
|
29972
|
+
|
29973
|
+
# The recitation action for one given input. When its segments contain different
|
29974
|
+
# actions, the overall action will be returned in the precedence of BLOCK > CITE
|
29975
|
+
# > NO_ACTION.
|
29976
|
+
# Corresponds to the JSON property `recitationAction`
|
29977
|
+
# @return [String]
|
29978
|
+
attr_accessor :recitation_action
|
29979
|
+
|
29980
|
+
#
|
29981
|
+
# Corresponds to the JSON property `trainingSegmentResults`
|
29982
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
29983
|
+
attr_accessor :training_segment_results
|
29984
|
+
|
29985
|
+
def initialize(**args)
|
29986
|
+
update!(**args)
|
29987
|
+
end
|
29988
|
+
|
29989
|
+
# Update properties of this object
|
29990
|
+
def update!(**args)
|
29991
|
+
@dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
|
29992
|
+
@recitation_action = args[:recitation_action] if args.key?(:recitation_action)
|
29993
|
+
@training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
|
29994
|
+
end
|
29995
|
+
end
|
29996
|
+
|
29997
|
+
# The recitation result for each segment in a given input.
|
29998
|
+
class LanguageLabsAidaTrustRecitationProtoSegmentResult
|
29999
|
+
include Google::Apis::Core::Hashable
|
30000
|
+
|
30001
|
+
# The dataset the segment came from.
|
30002
|
+
# Corresponds to the JSON property `attributionDataset`
|
30003
|
+
# @return [String]
|
30004
|
+
attr_accessor :attribution_dataset
|
30005
|
+
|
30006
|
+
# human-friendly string that contains information from doc_attribution which
|
30007
|
+
# could be shown by clients
|
30008
|
+
# Corresponds to the JSON property `displayAttributionMessage`
|
30009
|
+
# @return [String]
|
30010
|
+
attr_accessor :display_attribution_message
|
30011
|
+
|
30012
|
+
# The proto defines the attribution information for a document using whatever
|
30013
|
+
# fields are most applicable for that document's datasource. For example, a
|
30014
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
30015
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
30016
|
+
# id:28
|
30017
|
+
# Corresponds to the JSON property `docAttribution`
|
30018
|
+
# @return [Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoDocAttribution]
|
30019
|
+
attr_accessor :doc_attribution
|
30020
|
+
|
30021
|
+
# number of documents that contained this segment
|
30022
|
+
# Corresponds to the JSON property `docOccurrences`
|
30023
|
+
# @return [Fixnum]
|
30024
|
+
attr_accessor :doc_occurrences
|
30025
|
+
|
30026
|
+
#
|
30027
|
+
# Corresponds to the JSON property `endIndex`
|
30028
|
+
# @return [Fixnum]
|
30029
|
+
attr_accessor :end_index
|
30030
|
+
|
30031
|
+
# The raw text in the given input that is corresponding to the segment. It will
|
30032
|
+
# be available only when 'return_segment_raw_text' is enabled in the request
|
30033
|
+
# options.
|
30034
|
+
# Corresponds to the JSON property `rawText`
|
30035
|
+
# @return [String]
|
30036
|
+
attr_accessor :raw_text
|
30037
|
+
|
30038
|
+
#
|
30039
|
+
# Corresponds to the JSON property `segmentRecitationAction`
|
30040
|
+
# @return [String]
|
30041
|
+
attr_accessor :segment_recitation_action
|
30042
|
+
|
30043
|
+
# The segment boundary start (inclusive) and end index (exclusive) in the given
|
30044
|
+
# text. In the streaming RPC, the indexes always start from the beginning of the
|
30045
|
+
# first text in the entire stream. The indexes are measured in UTF-16 code units.
|
30046
|
+
# Corresponds to the JSON property `startIndex`
|
30047
|
+
# @return [Fixnum]
|
30048
|
+
attr_accessor :start_index
|
30049
|
+
|
30050
|
+
def initialize(**args)
|
30051
|
+
update!(**args)
|
30052
|
+
end
|
30053
|
+
|
30054
|
+
# Update properties of this object
|
30055
|
+
def update!(**args)
|
30056
|
+
@attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
|
30057
|
+
@display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
|
30058
|
+
@doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
|
30059
|
+
@doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
|
30060
|
+
@end_index = args[:end_index] if args.key?(:end_index)
|
30061
|
+
@raw_text = args[:raw_text] if args.key?(:raw_text)
|
30062
|
+
@segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
|
30063
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
30064
|
+
end
|
30065
|
+
end
|
30066
|
+
|
30067
|
+
# The recitation result for one stream input
|
30068
|
+
class LanguageLabsAidaTrustRecitationProtoStreamRecitationResult
|
30069
|
+
include Google::Apis::Core::Hashable
|
30070
|
+
|
30071
|
+
# The recitation result against the given dynamic data source.
|
30072
|
+
# Corresponds to the JSON property `dynamicSegmentResults`
|
30073
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
30074
|
+
attr_accessor :dynamic_segment_results
|
30075
|
+
|
30076
|
+
# Last index of input text fully checked for recitation in the entire streaming
|
30077
|
+
# context. Would return `-1` if no Input was checked for recitation.
|
30078
|
+
# Corresponds to the JSON property `fullyCheckedTextIndex`
|
30079
|
+
# @return [Fixnum]
|
30080
|
+
attr_accessor :fully_checked_text_index
|
30081
|
+
|
30082
|
+
# The recitation action for one given input. When its segments contain different
|
30083
|
+
# actions, the overall action will be returned in the precedence of BLOCK > CITE
|
30084
|
+
# > NO_ACTION.
|
30085
|
+
# Corresponds to the JSON property `recitationAction`
|
30086
|
+
# @return [String]
|
30087
|
+
attr_accessor :recitation_action
|
30088
|
+
|
30089
|
+
# The recitation result against model training data.
|
30090
|
+
# Corresponds to the JSON property `trainingSegmentResults`
|
30091
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
30092
|
+
attr_accessor :training_segment_results
|
30093
|
+
|
30094
|
+
def initialize(**args)
|
30095
|
+
update!(**args)
|
30096
|
+
end
|
30097
|
+
|
30098
|
+
# Update properties of this object
|
30099
|
+
def update!(**args)
|
30100
|
+
@dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
|
30101
|
+
@fully_checked_text_index = args[:fully_checked_text_index] if args.key?(:fully_checked_text_index)
|
30102
|
+
@recitation_action = args[:recitation_action] if args.key?(:recitation_action)
|
30103
|
+
@training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
|
30104
|
+
end
|
30105
|
+
end
|
30106
|
+
|
30107
|
+
# The proto defines the attribution information for a document using whatever
|
30108
|
+
# fields are most applicable for that document's datasource. For example, a
|
30109
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
30110
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
30111
|
+
# id: 28
|
30112
|
+
class LearningGenaiRecitationDocAttribution
|
30113
|
+
include Google::Apis::Core::Hashable
|
30114
|
+
|
30115
|
+
#
|
30116
|
+
# Corresponds to the JSON property `amarnaId`
|
30117
|
+
# @return [String]
|
30118
|
+
attr_accessor :amarna_id
|
30119
|
+
|
30120
|
+
#
|
30121
|
+
# Corresponds to the JSON property `arxivId`
|
30122
|
+
# @return [String]
|
30123
|
+
attr_accessor :arxiv_id
|
30124
|
+
|
30125
|
+
#
|
30126
|
+
# Corresponds to the JSON property `author`
|
30127
|
+
# @return [String]
|
30128
|
+
attr_accessor :author
|
30129
|
+
|
30130
|
+
#
|
30131
|
+
# Corresponds to the JSON property `bibkey`
|
30132
|
+
# @return [String]
|
30133
|
+
attr_accessor :bibkey
|
30134
|
+
|
30135
|
+
#
|
30136
|
+
# Corresponds to the JSON property `bookTitle`
|
30137
|
+
# @return [String]
|
30138
|
+
attr_accessor :book_title
|
30139
|
+
|
30140
|
+
# The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
|
30141
|
+
# of a book. There is a deterministic function from a volume id to a URL under
|
30142
|
+
# the books.google.com domain. Marked as 'optional' since a volume ID of zero is
|
30143
|
+
# potentially possible and we want to distinguish that from the volume ID not
|
30144
|
+
# being set.
|
30145
|
+
# Corresponds to the JSON property `bookVolumeId`
|
30146
|
+
# @return [Fixnum]
|
30147
|
+
attr_accessor :book_volume_id
|
30148
|
+
|
30149
|
+
#
|
30150
|
+
# Corresponds to the JSON property `conversationId`
|
30151
|
+
# @return [String]
|
30152
|
+
attr_accessor :conversation_id
|
30153
|
+
|
30154
|
+
# The dataset this document comes from.
|
30155
|
+
# Corresponds to the JSON property `dataset`
|
30156
|
+
# @return [String]
|
30157
|
+
attr_accessor :dataset
|
30158
|
+
|
30159
|
+
#
|
30160
|
+
# Corresponds to the JSON property `filepath`
|
30161
|
+
# @return [String]
|
30162
|
+
attr_accessor :filepath
|
30163
|
+
|
30164
|
+
#
|
30165
|
+
# Corresponds to the JSON property `geminiId`
|
30166
|
+
# @return [String]
|
30167
|
+
attr_accessor :gemini_id
|
30168
|
+
|
30169
|
+
#
|
30170
|
+
# Corresponds to the JSON property `gnewsArticleTitle`
|
30171
|
+
# @return [String]
|
30172
|
+
attr_accessor :gnews_article_title
|
30173
|
+
|
30174
|
+
#
|
30175
|
+
# Corresponds to the JSON property `goodallExampleId`
|
30176
|
+
# @return [String]
|
30177
|
+
attr_accessor :goodall_example_id
|
30178
|
+
|
30179
|
+
# Whether the document is opted out.
|
30180
|
+
# Corresponds to the JSON property `isOptOut`
|
30181
|
+
# @return [Boolean]
|
30182
|
+
attr_accessor :is_opt_out
|
30183
|
+
alias_method :is_opt_out?, :is_opt_out
|
30184
|
+
|
30185
|
+
# When true, this attribution came from the user's prompt.
|
30186
|
+
# Corresponds to the JSON property `isPrompt`
|
30187
|
+
# @return [Boolean]
|
30188
|
+
attr_accessor :is_prompt
|
30189
|
+
alias_method :is_prompt?, :is_prompt
|
30190
|
+
|
30191
|
+
#
|
30192
|
+
# Corresponds to the JSON property `lamdaExampleId`
|
30193
|
+
# @return [String]
|
30194
|
+
attr_accessor :lamda_example_id
|
30195
|
+
|
30196
|
+
#
|
30197
|
+
# Corresponds to the JSON property `license`
|
30198
|
+
# @return [String]
|
30199
|
+
attr_accessor :license
|
30200
|
+
|
30201
|
+
#
|
30202
|
+
# Corresponds to the JSON property `meenaConversationId`
|
30203
|
+
# @return [String]
|
30204
|
+
attr_accessor :meena_conversation_id
|
30205
|
+
|
30206
|
+
# Natural (not programming) language of the document. Language code as defined
|
30207
|
+
# by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
|
30208
|
+
# html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
|
30209
|
+
# & read language fields. See go/iii.
|
30210
|
+
# Corresponds to the JSON property `naturalLanguageCode`
|
30211
|
+
# @return [String]
|
30212
|
+
attr_accessor :natural_language_code
|
30213
|
+
|
30214
|
+
# True if this doc has no attribution information available. We use an explicit
|
30215
|
+
# field for this instead of just implicitly leaving all the DocAttribution
|
30216
|
+
# fields blank to distinguish a case where a bug/oversight has left the
|
30217
|
+
# attribution information empty vs when we really have no attribution
|
30218
|
+
# information available.
|
30219
|
+
# Corresponds to the JSON property `noAttribution`
|
30220
|
+
# @return [Boolean]
|
30221
|
+
attr_accessor :no_attribution
|
30222
|
+
alias_method :no_attribution?, :no_attribution
|
30223
|
+
|
30224
|
+
#
|
30225
|
+
# Corresponds to the JSON property `podcastUtteranceId`
|
30226
|
+
# @return [String]
|
30227
|
+
attr_accessor :podcast_utterance_id
|
30228
|
+
|
30229
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
30230
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
30231
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
30232
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
30233
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
30234
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
30235
|
+
# example, a credit card expiration date). Related types: * google.type.
|
30236
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
30237
|
+
# Corresponds to the JSON property `publicationDate`
|
30238
|
+
# @return [Google::Apis::AiplatformV1beta1::GoogleTypeDate]
|
30239
|
+
attr_accessor :publication_date
|
30240
|
+
|
30241
|
+
# This field is for opt-out experiment only, MUST never be used during actual
|
30242
|
+
# production/serving.
|
30243
|
+
# Corresponds to the JSON property `qualityScoreExperimentOnly`
|
30244
|
+
# @return [Float]
|
30245
|
+
attr_accessor :quality_score_experiment_only
|
30246
|
+
|
30247
|
+
# Github repository
|
30248
|
+
# Corresponds to the JSON property `repo`
|
30249
|
+
# @return [String]
|
30250
|
+
attr_accessor :repo
|
30251
|
+
|
30252
|
+
# URL of a webdoc
|
30253
|
+
# Corresponds to the JSON property `url`
|
30254
|
+
# @return [String]
|
30255
|
+
attr_accessor :url
|
30256
|
+
|
30257
|
+
#
|
30258
|
+
# Corresponds to the JSON property `volumeId`
|
30259
|
+
# @return [String]
|
30260
|
+
attr_accessor :volume_id
|
30261
|
+
|
30262
|
+
# Wikipedia article title. The Wikipedia TFDS dataset includes article titles
|
30263
|
+
# but not URLs. While a URL is to the best of our knowledge a deterministic
|
30264
|
+
# function of the title, we store the original title to reflect the information
|
30265
|
+
# in the original dataset.
|
30266
|
+
# Corresponds to the JSON property `wikipediaArticleTitle`
|
30267
|
+
# @return [String]
|
30268
|
+
attr_accessor :wikipedia_article_title
|
30269
|
+
|
30270
|
+
def initialize(**args)
|
30271
|
+
update!(**args)
|
30272
|
+
end
|
30273
|
+
|
30274
|
+
# Update properties of this object
|
30275
|
+
def update!(**args)
|
30276
|
+
@amarna_id = args[:amarna_id] if args.key?(:amarna_id)
|
30277
|
+
@arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
|
30278
|
+
@author = args[:author] if args.key?(:author)
|
30279
|
+
@bibkey = args[:bibkey] if args.key?(:bibkey)
|
30280
|
+
@book_title = args[:book_title] if args.key?(:book_title)
|
30281
|
+
@book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
|
30282
|
+
@conversation_id = args[:conversation_id] if args.key?(:conversation_id)
|
30283
|
+
@dataset = args[:dataset] if args.key?(:dataset)
|
30284
|
+
@filepath = args[:filepath] if args.key?(:filepath)
|
30285
|
+
@gemini_id = args[:gemini_id] if args.key?(:gemini_id)
|
30286
|
+
@gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
|
30287
|
+
@goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
|
30288
|
+
@is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
|
30289
|
+
@is_prompt = args[:is_prompt] if args.key?(:is_prompt)
|
30290
|
+
@lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
|
30291
|
+
@license = args[:license] if args.key?(:license)
|
30292
|
+
@meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
|
30293
|
+
@natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
|
30294
|
+
@no_attribution = args[:no_attribution] if args.key?(:no_attribution)
|
30295
|
+
@podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
|
30296
|
+
@publication_date = args[:publication_date] if args.key?(:publication_date)
|
30297
|
+
@quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
|
30298
|
+
@repo = args[:repo] if args.key?(:repo)
|
30299
|
+
@url = args[:url] if args.key?(:url)
|
30300
|
+
@volume_id = args[:volume_id] if args.key?(:volume_id)
|
30301
|
+
@wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
|
30302
|
+
end
|
30303
|
+
end
|
30304
|
+
|
30305
|
+
# The recitation result for one input
|
30306
|
+
class LearningGenaiRecitationRecitationResult
|
30307
|
+
include Google::Apis::Core::Hashable
|
30308
|
+
|
30309
|
+
#
|
30310
|
+
# Corresponds to the JSON property `dynamicSegmentResults`
|
30311
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRecitationSegmentResult>]
|
30312
|
+
attr_accessor :dynamic_segment_results
|
30313
|
+
|
30314
|
+
# The recitation action for one given input. When its segments contain different
|
30315
|
+
# actions, the overall action will be returned in the precedence of BLOCK > CITE
|
30316
|
+
# > NO_ACTION.
|
30317
|
+
# Corresponds to the JSON property `recitationAction`
|
30318
|
+
# @return [String]
|
30319
|
+
attr_accessor :recitation_action
|
30320
|
+
|
30321
|
+
#
|
30322
|
+
# Corresponds to the JSON property `trainingSegmentResults`
|
30323
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRecitationSegmentResult>]
|
30324
|
+
attr_accessor :training_segment_results
|
30325
|
+
|
30326
|
+
def initialize(**args)
|
30327
|
+
update!(**args)
|
30328
|
+
end
|
30329
|
+
|
30330
|
+
# Update properties of this object
|
30331
|
+
def update!(**args)
|
30332
|
+
@dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
|
30333
|
+
@recitation_action = args[:recitation_action] if args.key?(:recitation_action)
|
30334
|
+
@training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
|
30335
|
+
end
|
30336
|
+
end
|
30337
|
+
|
30338
|
+
# The recitation result for each segment in a given input.
|
30339
|
+
class LearningGenaiRecitationSegmentResult
|
30340
|
+
include Google::Apis::Core::Hashable
|
30341
|
+
|
30342
|
+
# The dataset the segment came from.
|
30343
|
+
# Corresponds to the JSON property `attributionDataset`
|
30344
|
+
# @return [String]
|
30345
|
+
attr_accessor :attribution_dataset
|
30346
|
+
|
30347
|
+
# human-friendly string that contains information from doc_attribution which
|
30348
|
+
# could be shown by clients
|
30349
|
+
# Corresponds to the JSON property `displayAttributionMessage`
|
30350
|
+
# @return [String]
|
30351
|
+
attr_accessor :display_attribution_message
|
30352
|
+
|
30353
|
+
# The proto defines the attribution information for a document using whatever
|
30354
|
+
# fields are most applicable for that document's datasource. For example, a
|
30355
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
30356
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
30357
|
+
# id: 28
|
30358
|
+
# Corresponds to the JSON property `docAttribution`
|
30359
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRecitationDocAttribution]
|
30360
|
+
attr_accessor :doc_attribution
|
30361
|
+
|
30362
|
+
# number of documents that contained this segment
|
30363
|
+
# Corresponds to the JSON property `docOccurrences`
|
30364
|
+
# @return [Fixnum]
|
30365
|
+
attr_accessor :doc_occurrences
|
30366
|
+
|
30367
|
+
#
|
30368
|
+
# Corresponds to the JSON property `endIndex`
|
30369
|
+
# @return [Fixnum]
|
30370
|
+
attr_accessor :end_index
|
30371
|
+
|
30372
|
+
# The raw text in the given input that is corresponding to the segment. It will
|
30373
|
+
# be available only when 'return_segment_raw_text' is enabled in the request
|
30374
|
+
# options.
|
30375
|
+
# Corresponds to the JSON property `rawText`
|
30376
|
+
# @return [String]
|
30377
|
+
attr_accessor :raw_text
|
30378
|
+
|
30379
|
+
#
|
30380
|
+
# Corresponds to the JSON property `segmentRecitationAction`
|
30381
|
+
# @return [String]
|
30382
|
+
attr_accessor :segment_recitation_action
|
30383
|
+
|
30384
|
+
# The segment boundary start (inclusive) and end index (exclusive) in the given
|
30385
|
+
# text. In the streaming RPC, the indexes always start from the beginning of the
|
30386
|
+
# first text in the entire stream. The indexes are measured in UTF-16 code units.
|
30387
|
+
# Corresponds to the JSON property `startIndex`
|
30388
|
+
# @return [Fixnum]
|
30389
|
+
attr_accessor :start_index
|
30390
|
+
|
30391
|
+
def initialize(**args)
|
30392
|
+
update!(**args)
|
30393
|
+
end
|
30394
|
+
|
30395
|
+
# Update properties of this object
|
30396
|
+
def update!(**args)
|
30397
|
+
@attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
|
30398
|
+
@display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
|
30399
|
+
@doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
|
30400
|
+
@doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
|
30401
|
+
@end_index = args[:end_index] if args.key?(:end_index)
|
30402
|
+
@raw_text = args[:raw_text] if args.key?(:raw_text)
|
30403
|
+
@segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
|
30404
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
30405
|
+
end
|
30406
|
+
end
|
30407
|
+
|
30408
|
+
# The type used for final weights calculation.
|
30409
|
+
class LearningGenaiRootCalculationType
|
30410
|
+
include Google::Apis::Core::Hashable
|
30411
|
+
|
30412
|
+
#
|
30413
|
+
# Corresponds to the JSON property `scoreType`
|
30414
|
+
# @return [String]
|
30415
|
+
attr_accessor :score_type
|
30416
|
+
|
30417
|
+
#
|
30418
|
+
# Corresponds to the JSON property `weights`
|
30419
|
+
# @return [Float]
|
30420
|
+
attr_accessor :weights
|
30421
|
+
|
30422
|
+
def initialize(**args)
|
30423
|
+
update!(**args)
|
30424
|
+
end
|
30425
|
+
|
30426
|
+
# Update properties of this object
|
30427
|
+
def update!(**args)
|
30428
|
+
@score_type = args[:score_type] if args.key?(:score_type)
|
30429
|
+
@weights = args[:weights] if args.key?(:weights)
|
30430
|
+
end
|
30431
|
+
end
|
30432
|
+
|
30433
|
+
#
|
30434
|
+
class LearningGenaiRootClassifierOutput
|
30435
|
+
include Google::Apis::Core::Hashable
|
30436
|
+
|
30437
|
+
# If set, this is the output of the first matching rule.
|
30438
|
+
# Corresponds to the JSON property `ruleOutput`
|
30439
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRuleOutput]
|
30440
|
+
attr_accessor :rule_output
|
30441
|
+
|
30442
|
+
# outputs of all matching rule.
|
30443
|
+
# Corresponds to the JSON property `ruleOutputs`
|
30444
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootRuleOutput>]
|
30445
|
+
attr_accessor :rule_outputs
|
30446
|
+
|
30447
|
+
# DataProviderOutput and MetricOutput can be saved between calls to the
|
30448
|
+
# Classifier framework. For instance, you can run the query classifier, get
|
30449
|
+
# outputs from those metrics, then use them in a result classifier as well.
|
30450
|
+
# Example rule based on this idea: and_rules ` rule ` metric_name: '
|
30451
|
+
# query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
|
30452
|
+
# Corresponds to the JSON property `state`
|
30453
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootClassifierState]
|
30454
|
+
attr_accessor :state
|
30455
|
+
|
30456
|
+
def initialize(**args)
|
30457
|
+
update!(**args)
|
30458
|
+
end
|
30459
|
+
|
30460
|
+
# Update properties of this object
|
30461
|
+
def update!(**args)
|
30462
|
+
@rule_output = args[:rule_output] if args.key?(:rule_output)
|
30463
|
+
@rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
|
30464
|
+
@state = args[:state] if args.key?(:state)
|
30465
|
+
end
|
30466
|
+
end
|
30467
|
+
|
30468
|
+
#
|
30469
|
+
class LearningGenaiRootClassifierOutputSummary
|
30470
|
+
include Google::Apis::Core::Hashable
|
30471
|
+
|
30472
|
+
#
|
30473
|
+
# Corresponds to the JSON property `metrics`
|
30474
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootMetricOutput>]
|
30475
|
+
attr_accessor :metrics
|
30476
|
+
|
30477
|
+
# Output of the first matching rule.
|
30478
|
+
# Corresponds to the JSON property `ruleOutput`
|
30479
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRuleOutput]
|
30480
|
+
attr_accessor :rule_output
|
30481
|
+
|
30482
|
+
# outputs of all matching rule.
|
30483
|
+
# Corresponds to the JSON property `ruleOutputs`
|
30484
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootRuleOutput>]
|
30485
|
+
attr_accessor :rule_outputs
|
30486
|
+
|
30487
|
+
def initialize(**args)
|
30488
|
+
update!(**args)
|
30489
|
+
end
|
30490
|
+
|
30491
|
+
# Update properties of this object
|
30492
|
+
def update!(**args)
|
30493
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
30494
|
+
@rule_output = args[:rule_output] if args.key?(:rule_output)
|
30495
|
+
@rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
|
30496
|
+
end
|
30497
|
+
end
|
30498
|
+
|
30499
|
+
# DataProviderOutput and MetricOutput can be saved between calls to the
|
30500
|
+
# Classifier framework. For instance, you can run the query classifier, get
|
30501
|
+
# outputs from those metrics, then use them in a result classifier as well.
|
30502
|
+
# Example rule based on this idea: and_rules ` rule ` metric_name: '
|
30503
|
+
# query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
|
30504
|
+
class LearningGenaiRootClassifierState
|
30505
|
+
include Google::Apis::Core::Hashable
|
30506
|
+
|
30507
|
+
#
|
30508
|
+
# Corresponds to the JSON property `dataProviderOutput`
|
30509
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootDataProviderOutput>]
|
30510
|
+
attr_accessor :data_provider_output
|
30511
|
+
|
30512
|
+
#
|
30513
|
+
# Corresponds to the JSON property `metricOutput`
|
30514
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootMetricOutput>]
|
30515
|
+
attr_accessor :metric_output
|
30516
|
+
|
30517
|
+
def initialize(**args)
|
30518
|
+
update!(**args)
|
30519
|
+
end
|
30520
|
+
|
30521
|
+
# Update properties of this object
|
30522
|
+
def update!(**args)
|
30523
|
+
@data_provider_output = args[:data_provider_output] if args.key?(:data_provider_output)
|
30524
|
+
@metric_output = args[:metric_output] if args.key?(:metric_output)
|
30525
|
+
end
|
30526
|
+
end
|
30527
|
+
|
30528
|
+
#
|
30529
|
+
class LearningGenaiRootDataProviderOutput
|
30530
|
+
include Google::Apis::Core::Hashable
|
30531
|
+
|
30532
|
+
#
|
30533
|
+
# Corresponds to the JSON property `name`
|
30534
|
+
# @return [String]
|
30535
|
+
attr_accessor :name
|
30536
|
+
|
30537
|
+
# Wire-format for a Status object
|
30538
|
+
# Corresponds to the JSON property `status`
|
30539
|
+
# @return [Google::Apis::AiplatformV1beta1::UtilStatusProto]
|
30540
|
+
attr_accessor :status
|
30541
|
+
|
30542
|
+
def initialize(**args)
|
30543
|
+
update!(**args)
|
30544
|
+
end
|
30545
|
+
|
30546
|
+
# Update properties of this object
|
30547
|
+
def update!(**args)
|
30548
|
+
@name = args[:name] if args.key?(:name)
|
30549
|
+
@status = args[:status] if args.key?(:status)
|
30550
|
+
end
|
30551
|
+
end
|
30552
|
+
|
30553
|
+
#
|
30554
|
+
class LearningGenaiRootFilterMetadata
|
30555
|
+
include Google::Apis::Core::Hashable
|
30556
|
+
|
30557
|
+
# Filter confidence.
|
30558
|
+
# Corresponds to the JSON property `confidence`
|
30559
|
+
# @return [String]
|
30560
|
+
attr_accessor :confidence
|
30561
|
+
|
30562
|
+
# Debug info for the message.
|
30563
|
+
# Corresponds to the JSON property `debugInfo`
|
30564
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootFilterMetadataFilterDebugInfo]
|
30565
|
+
attr_accessor :debug_info
|
30566
|
+
|
30567
|
+
# A fallback message chosen by the applied filter.
|
30568
|
+
# Corresponds to the JSON property `fallback`
|
30569
|
+
# @return [String]
|
30570
|
+
attr_accessor :fallback
|
30571
|
+
|
30572
|
+
# Additional info for the filter.
|
30573
|
+
# Corresponds to the JSON property `info`
|
30574
|
+
# @return [String]
|
30575
|
+
attr_accessor :info
|
30576
|
+
|
30577
|
+
# Name of the filter that triggered.
|
30578
|
+
# Corresponds to the JSON property `name`
|
30579
|
+
# @return [String]
|
30580
|
+
attr_accessor :name
|
30581
|
+
|
30582
|
+
# Filter reason.
|
30583
|
+
# Corresponds to the JSON property `reason`
|
30584
|
+
# @return [String]
|
30585
|
+
attr_accessor :reason
|
30586
|
+
|
30587
|
+
# The input query or generated response that is getting filtered.
|
30588
|
+
# Corresponds to the JSON property `text`
|
30589
|
+
# @return [String]
|
30590
|
+
attr_accessor :text
|
30591
|
+
|
30592
|
+
def initialize(**args)
|
30593
|
+
update!(**args)
|
30594
|
+
end
|
30595
|
+
|
30596
|
+
# Update properties of this object
|
30597
|
+
def update!(**args)
|
30598
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
30599
|
+
@debug_info = args[:debug_info] if args.key?(:debug_info)
|
30600
|
+
@fallback = args[:fallback] if args.key?(:fallback)
|
30601
|
+
@info = args[:info] if args.key?(:info)
|
30602
|
+
@name = args[:name] if args.key?(:name)
|
30603
|
+
@reason = args[:reason] if args.key?(:reason)
|
30604
|
+
@text = args[:text] if args.key?(:text)
|
30605
|
+
end
|
30606
|
+
end
|
30607
|
+
|
30608
|
+
#
|
30609
|
+
class LearningGenaiRootFilterMetadataFilterDebugInfo
|
30610
|
+
include Google::Apis::Core::Hashable
|
30611
|
+
|
30612
|
+
#
|
30613
|
+
# Corresponds to the JSON property `classifierOutput`
|
30614
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootClassifierOutput]
|
30615
|
+
attr_accessor :classifier_output
|
30616
|
+
|
30617
|
+
#
|
30618
|
+
# Corresponds to the JSON property `defaultMetadata`
|
30619
|
+
# @return [String]
|
30620
|
+
attr_accessor :default_metadata
|
30621
|
+
|
30622
|
+
#
|
30623
|
+
# Corresponds to the JSON property `languageFilterResult`
|
30624
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningServingLlmLanguageFilterResult]
|
30625
|
+
attr_accessor :language_filter_result
|
30626
|
+
|
30627
|
+
# This is per harm.
|
30628
|
+
# Corresponds to the JSON property `raiOutput`
|
30629
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRaiOutput]
|
30630
|
+
attr_accessor :rai_output
|
30631
|
+
|
30632
|
+
# The RAI results for a given text.
|
30633
|
+
# Corresponds to the JSON property `raiResult`
|
30634
|
+
# @return [Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceRaiResult]
|
30635
|
+
attr_accessor :rai_result
|
30636
|
+
|
30637
|
+
# An RAI signal for a single category.
|
30638
|
+
# Corresponds to the JSON property `raiSignal`
|
30639
|
+
# @return [Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceRaiSignal]
|
30640
|
+
attr_accessor :rai_signal
|
30641
|
+
|
30642
|
+
# The recitation result for one stream input
|
30643
|
+
# Corresponds to the JSON property `streamRecitationResult`
|
30644
|
+
# @return [Google::Apis::AiplatformV1beta1::LanguageLabsAidaTrustRecitationProtoStreamRecitationResult]
|
30645
|
+
attr_accessor :stream_recitation_result
|
30646
|
+
|
30647
|
+
#
|
30648
|
+
# Corresponds to the JSON property `takedownResult`
|
30649
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootTakedownResult]
|
30650
|
+
attr_accessor :takedown_result
|
30651
|
+
|
30652
|
+
# A model can generate multiple signals and this captures all the generated
|
30653
|
+
# signals for a single message.
|
30654
|
+
# Corresponds to the JSON property `toxicityResult`
|
30655
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootToxicityResult]
|
30656
|
+
attr_accessor :toxicity_result
|
30657
|
+
|
30658
|
+
def initialize(**args)
|
30659
|
+
update!(**args)
|
30660
|
+
end
|
30661
|
+
|
30662
|
+
# Update properties of this object
|
30663
|
+
def update!(**args)
|
30664
|
+
@classifier_output = args[:classifier_output] if args.key?(:classifier_output)
|
30665
|
+
@default_metadata = args[:default_metadata] if args.key?(:default_metadata)
|
30666
|
+
@language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
|
30667
|
+
@rai_output = args[:rai_output] if args.key?(:rai_output)
|
30668
|
+
@rai_result = args[:rai_result] if args.key?(:rai_result)
|
30669
|
+
@rai_signal = args[:rai_signal] if args.key?(:rai_signal)
|
30670
|
+
@stream_recitation_result = args[:stream_recitation_result] if args.key?(:stream_recitation_result)
|
30671
|
+
@takedown_result = args[:takedown_result] if args.key?(:takedown_result)
|
30672
|
+
@toxicity_result = args[:toxicity_result] if args.key?(:toxicity_result)
|
30673
|
+
end
|
30674
|
+
end
|
30675
|
+
|
30676
|
+
#
|
30677
|
+
class LearningGenaiRootHarm
|
30678
|
+
include Google::Apis::Core::Hashable
|
30679
|
+
|
30680
|
+
# Please do not use, this is still under development.
|
30681
|
+
# Corresponds to the JSON property `contextualDangerous`
|
30682
|
+
# @return [Boolean]
|
30683
|
+
attr_accessor :contextual_dangerous
|
30684
|
+
alias_method :contextual_dangerous?, :contextual_dangerous
|
30685
|
+
|
30686
|
+
#
|
30687
|
+
# Corresponds to the JSON property `csam`
|
30688
|
+
# @return [Boolean]
|
30689
|
+
attr_accessor :csam
|
30690
|
+
alias_method :csam?, :csam
|
30691
|
+
|
30692
|
+
#
|
30693
|
+
# Corresponds to the JSON property `fringe`
|
30694
|
+
# @return [Boolean]
|
30695
|
+
attr_accessor :fringe
|
30696
|
+
alias_method :fringe?, :fringe
|
30697
|
+
|
30698
|
+
# Harm type for images
|
30699
|
+
# Corresponds to the JSON property `grailImageHarmType`
|
30700
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootHarmGrailImageHarmType]
|
30701
|
+
attr_accessor :grail_image_harm_type
|
30702
|
+
|
30703
|
+
# Harm type for text
|
30704
|
+
# Corresponds to the JSON property `grailTextHarmType`
|
30705
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootHarmGrailTextHarmType]
|
30706
|
+
attr_accessor :grail_text_harm_type
|
30707
|
+
|
30708
|
+
#
|
30709
|
+
# Corresponds to the JSON property `imageCsam`
|
30710
|
+
# @return [Boolean]
|
30711
|
+
attr_accessor :image_csam
|
30712
|
+
alias_method :image_csam?, :image_csam
|
30713
|
+
|
30714
|
+
#
|
30715
|
+
# Corresponds to the JSON property `imagePedo`
|
30716
|
+
# @return [Boolean]
|
30717
|
+
attr_accessor :image_pedo
|
30718
|
+
alias_method :image_pedo?, :image_pedo
|
30719
|
+
|
30720
|
+
# Image signals
|
30721
|
+
# Corresponds to the JSON property `imagePorn`
|
30722
|
+
# @return [Boolean]
|
30723
|
+
attr_accessor :image_porn
|
30724
|
+
alias_method :image_porn?, :image_porn
|
30725
|
+
|
30726
|
+
#
|
30727
|
+
# Corresponds to the JSON property `imageViolence`
|
30728
|
+
# @return [Boolean]
|
30729
|
+
attr_accessor :image_violence
|
30730
|
+
alias_method :image_violence?, :image_violence
|
30731
|
+
|
30732
|
+
#
|
30733
|
+
# Corresponds to the JSON property `pqc`
|
30734
|
+
# @return [Boolean]
|
30735
|
+
attr_accessor :pqc
|
30736
|
+
alias_method :pqc?, :pqc
|
30737
|
+
|
30738
|
+
#
|
30739
|
+
# Corresponds to the JSON property `safetycat`
|
30740
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootHarmSafetyCatCategories]
|
30741
|
+
attr_accessor :safetycat
|
30742
|
+
|
30743
|
+
#
|
30744
|
+
# Corresponds to the JSON property `spii`
|
30745
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootHarmSpiiFilter]
|
30746
|
+
attr_accessor :spii
|
30747
|
+
|
30748
|
+
#
|
30749
|
+
# Corresponds to the JSON property `threshold`
|
30750
|
+
# @return [Float]
|
30751
|
+
attr_accessor :threshold
|
30752
|
+
|
30753
|
+
#
|
30754
|
+
# Corresponds to the JSON property `videoFrameCsam`
|
30755
|
+
# @return [Boolean]
|
30756
|
+
attr_accessor :video_frame_csam
|
30757
|
+
alias_method :video_frame_csam?, :video_frame_csam
|
30758
|
+
|
30759
|
+
#
|
30760
|
+
# Corresponds to the JSON property `videoFramePedo`
|
30761
|
+
# @return [Boolean]
|
30762
|
+
attr_accessor :video_frame_pedo
|
30763
|
+
alias_method :video_frame_pedo?, :video_frame_pedo
|
30764
|
+
|
30765
|
+
# Video frame signals
|
30766
|
+
# Corresponds to the JSON property `videoFramePorn`
|
30767
|
+
# @return [Boolean]
|
30768
|
+
attr_accessor :video_frame_porn
|
30769
|
+
alias_method :video_frame_porn?, :video_frame_porn
|
30770
|
+
|
30771
|
+
#
|
30772
|
+
# Corresponds to the JSON property `videoFrameViolence`
|
30773
|
+
# @return [Boolean]
|
30774
|
+
attr_accessor :video_frame_violence
|
30775
|
+
alias_method :video_frame_violence?, :video_frame_violence
|
30776
|
+
|
30777
|
+
def initialize(**args)
|
30778
|
+
update!(**args)
|
30779
|
+
end
|
30780
|
+
|
30781
|
+
# Update properties of this object
|
30782
|
+
def update!(**args)
|
30783
|
+
@contextual_dangerous = args[:contextual_dangerous] if args.key?(:contextual_dangerous)
|
30784
|
+
@csam = args[:csam] if args.key?(:csam)
|
30785
|
+
@fringe = args[:fringe] if args.key?(:fringe)
|
30786
|
+
@grail_image_harm_type = args[:grail_image_harm_type] if args.key?(:grail_image_harm_type)
|
30787
|
+
@grail_text_harm_type = args[:grail_text_harm_type] if args.key?(:grail_text_harm_type)
|
30788
|
+
@image_csam = args[:image_csam] if args.key?(:image_csam)
|
30789
|
+
@image_pedo = args[:image_pedo] if args.key?(:image_pedo)
|
30790
|
+
@image_porn = args[:image_porn] if args.key?(:image_porn)
|
30791
|
+
@image_violence = args[:image_violence] if args.key?(:image_violence)
|
30792
|
+
@pqc = args[:pqc] if args.key?(:pqc)
|
30793
|
+
@safetycat = args[:safetycat] if args.key?(:safetycat)
|
30794
|
+
@spii = args[:spii] if args.key?(:spii)
|
30795
|
+
@threshold = args[:threshold] if args.key?(:threshold)
|
30796
|
+
@video_frame_csam = args[:video_frame_csam] if args.key?(:video_frame_csam)
|
30797
|
+
@video_frame_pedo = args[:video_frame_pedo] if args.key?(:video_frame_pedo)
|
30798
|
+
@video_frame_porn = args[:video_frame_porn] if args.key?(:video_frame_porn)
|
30799
|
+
@video_frame_violence = args[:video_frame_violence] if args.key?(:video_frame_violence)
|
30800
|
+
end
|
30801
|
+
end
|
30802
|
+
|
30803
|
+
# Harm type for images
|
30804
|
+
class LearningGenaiRootHarmGrailImageHarmType
|
30805
|
+
include Google::Apis::Core::Hashable
|
30806
|
+
|
30807
|
+
#
|
30808
|
+
# Corresponds to the JSON property `imageHarmType`
|
30809
|
+
# @return [Array<String>]
|
30810
|
+
attr_accessor :image_harm_type
|
30811
|
+
|
30812
|
+
def initialize(**args)
|
30813
|
+
update!(**args)
|
30814
|
+
end
|
30815
|
+
|
30816
|
+
# Update properties of this object
|
30817
|
+
def update!(**args)
|
30818
|
+
@image_harm_type = args[:image_harm_type] if args.key?(:image_harm_type)
|
30819
|
+
end
|
30820
|
+
end
|
30821
|
+
|
30822
|
+
# Harm type for text
|
30823
|
+
class LearningGenaiRootHarmGrailTextHarmType
|
30824
|
+
include Google::Apis::Core::Hashable
|
30825
|
+
|
30826
|
+
#
|
30827
|
+
# Corresponds to the JSON property `harmType`
|
30828
|
+
# @return [Array<String>]
|
30829
|
+
attr_accessor :harm_type
|
30830
|
+
|
30831
|
+
def initialize(**args)
|
30832
|
+
update!(**args)
|
30833
|
+
end
|
30834
|
+
|
30835
|
+
# Update properties of this object
|
30836
|
+
def update!(**args)
|
30837
|
+
@harm_type = args[:harm_type] if args.key?(:harm_type)
|
30838
|
+
end
|
30839
|
+
end
|
30840
|
+
|
30841
|
+
#
|
30842
|
+
class LearningGenaiRootHarmSafetyCatCategories
|
30843
|
+
include Google::Apis::Core::Hashable
|
30844
|
+
|
30845
|
+
#
|
30846
|
+
# Corresponds to the JSON property `categories`
|
30847
|
+
# @return [Array<String>]
|
30848
|
+
attr_accessor :categories
|
30849
|
+
|
30850
|
+
def initialize(**args)
|
30851
|
+
update!(**args)
|
30852
|
+
end
|
30853
|
+
|
30854
|
+
# Update properties of this object
|
30855
|
+
def update!(**args)
|
30856
|
+
@categories = args[:categories] if args.key?(:categories)
|
30857
|
+
end
|
30858
|
+
end
|
30859
|
+
|
30860
|
+
#
|
30861
|
+
class LearningGenaiRootHarmSpiiFilter
|
30862
|
+
include Google::Apis::Core::Hashable
|
30863
|
+
|
30864
|
+
#
|
30865
|
+
# Corresponds to the JSON property `usBankRoutingMicr`
|
30866
|
+
# @return [Boolean]
|
30867
|
+
attr_accessor :us_bank_routing_micr
|
30868
|
+
alias_method :us_bank_routing_micr?, :us_bank_routing_micr
|
30869
|
+
|
30870
|
+
#
|
30871
|
+
# Corresponds to the JSON property `usEmployerIdentificationNumber`
|
30872
|
+
# @return [Boolean]
|
30873
|
+
attr_accessor :us_employer_identification_number
|
30874
|
+
alias_method :us_employer_identification_number?, :us_employer_identification_number
|
30875
|
+
|
30876
|
+
#
|
30877
|
+
# Corresponds to the JSON property `usSocialSecurityNumber`
|
30878
|
+
# @return [Boolean]
|
30879
|
+
attr_accessor :us_social_security_number
|
30880
|
+
alias_method :us_social_security_number?, :us_social_security_number
|
30881
|
+
|
30882
|
+
def initialize(**args)
|
30883
|
+
update!(**args)
|
30884
|
+
end
|
30885
|
+
|
30886
|
+
# Update properties of this object
|
30887
|
+
def update!(**args)
|
30888
|
+
@us_bank_routing_micr = args[:us_bank_routing_micr] if args.key?(:us_bank_routing_micr)
|
30889
|
+
@us_employer_identification_number = args[:us_employer_identification_number] if args.key?(:us_employer_identification_number)
|
30890
|
+
@us_social_security_number = args[:us_social_security_number] if args.key?(:us_social_security_number)
|
30891
|
+
end
|
30892
|
+
end
|
30893
|
+
|
30894
|
+
#
|
30895
|
+
class LearningGenaiRootInternalMetadata
|
30896
|
+
include Google::Apis::Core::Hashable
|
30897
|
+
|
30898
|
+
#
|
30899
|
+
# Corresponds to the JSON property `scoredTokens`
|
30900
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootScoredToken>]
|
30901
|
+
attr_accessor :scored_tokens
|
30902
|
+
|
30903
|
+
def initialize(**args)
|
30904
|
+
update!(**args)
|
30905
|
+
end
|
30906
|
+
|
30907
|
+
# Update properties of this object
|
30908
|
+
def update!(**args)
|
30909
|
+
@scored_tokens = args[:scored_tokens] if args.key?(:scored_tokens)
|
30910
|
+
end
|
30911
|
+
end
|
30912
|
+
|
30913
|
+
#
|
30914
|
+
class LearningGenaiRootMetricOutput
|
30915
|
+
include Google::Apis::Core::Hashable
|
30916
|
+
|
30917
|
+
#
|
30918
|
+
# Corresponds to the JSON property `debug`
|
30919
|
+
# @return [String]
|
30920
|
+
attr_accessor :debug
|
30921
|
+
|
30922
|
+
# Name of the metric.
|
30923
|
+
# Corresponds to the JSON property `name`
|
30924
|
+
# @return [String]
|
30925
|
+
attr_accessor :name
|
30926
|
+
|
30927
|
+
#
|
30928
|
+
# Corresponds to the JSON property `numericValue`
|
30929
|
+
# @return [Float]
|
30930
|
+
attr_accessor :numeric_value
|
30931
|
+
|
30932
|
+
# Wire-format for a Status object
|
30933
|
+
# Corresponds to the JSON property `status`
|
30934
|
+
# @return [Google::Apis::AiplatformV1beta1::UtilStatusProto]
|
30935
|
+
attr_accessor :status
|
30936
|
+
|
30937
|
+
#
|
30938
|
+
# Corresponds to the JSON property `stringValue`
|
30939
|
+
# @return [String]
|
30940
|
+
attr_accessor :string_value
|
30941
|
+
|
30942
|
+
def initialize(**args)
|
30943
|
+
update!(**args)
|
30944
|
+
end
|
30945
|
+
|
30946
|
+
# Update properties of this object
|
30947
|
+
def update!(**args)
|
30948
|
+
@debug = args[:debug] if args.key?(:debug)
|
30949
|
+
@name = args[:name] if args.key?(:name)
|
30950
|
+
@numeric_value = args[:numeric_value] if args.key?(:numeric_value)
|
30951
|
+
@status = args[:status] if args.key?(:status)
|
30952
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
30953
|
+
end
|
30954
|
+
end
|
30955
|
+
|
30956
|
+
# This is per harm.
|
30957
|
+
class LearningGenaiRootRaiOutput
|
30958
|
+
include Google::Apis::Core::Hashable
|
30959
|
+
|
30960
|
+
#
|
30961
|
+
# Corresponds to the JSON property `allowed`
|
30962
|
+
# @return [Boolean]
|
30963
|
+
attr_accessor :allowed
|
30964
|
+
alias_method :allowed?, :allowed
|
30965
|
+
|
30966
|
+
#
|
30967
|
+
# Corresponds to the JSON property `harm`
|
30968
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootHarm]
|
30969
|
+
attr_accessor :harm
|
30970
|
+
|
30971
|
+
#
|
30972
|
+
# Corresponds to the JSON property `name`
|
30973
|
+
# @return [String]
|
30974
|
+
attr_accessor :name
|
30975
|
+
|
30976
|
+
#
|
30977
|
+
# Corresponds to the JSON property `score`
|
30978
|
+
# @return [Float]
|
30979
|
+
attr_accessor :score
|
30980
|
+
|
30981
|
+
def initialize(**args)
|
30982
|
+
update!(**args)
|
30983
|
+
end
|
30984
|
+
|
30985
|
+
# Update properties of this object
|
30986
|
+
def update!(**args)
|
30987
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
30988
|
+
@harm = args[:harm] if args.key?(:harm)
|
30989
|
+
@name = args[:name] if args.key?(:name)
|
30990
|
+
@score = args[:score] if args.key?(:score)
|
30991
|
+
end
|
30992
|
+
end
|
30993
|
+
|
30994
|
+
#
|
30995
|
+
class LearningGenaiRootRegexTakedownResult
|
30996
|
+
include Google::Apis::Core::Hashable
|
30997
|
+
|
30998
|
+
# False when query or response should be taken down due to match with a blocked
|
30999
|
+
# regex, true otherwise.
|
31000
|
+
# Corresponds to the JSON property `allowed`
|
31001
|
+
# @return [Boolean]
|
31002
|
+
attr_accessor :allowed
|
31003
|
+
alias_method :allowed?, :allowed
|
31004
|
+
|
31005
|
+
# Regex used to decide that query or response should be taken down. Empty when
|
31006
|
+
# query or response is kept.
|
31007
|
+
# Corresponds to the JSON property `takedownRegex`
|
31008
|
+
# @return [String]
|
31009
|
+
attr_accessor :takedown_regex
|
31010
|
+
|
31011
|
+
def initialize(**args)
|
31012
|
+
update!(**args)
|
31013
|
+
end
|
31014
|
+
|
31015
|
+
# Update properties of this object
|
31016
|
+
def update!(**args)
|
31017
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
31018
|
+
@takedown_regex = args[:takedown_regex] if args.key?(:takedown_regex)
|
31019
|
+
end
|
31020
|
+
end
|
31021
|
+
|
31022
|
+
#
|
31023
|
+
class LearningGenaiRootRequestResponseTakedownResult
|
31024
|
+
include Google::Apis::Core::Hashable
|
31025
|
+
|
31026
|
+
# False when response has to be taken down per above config.
|
31027
|
+
# Corresponds to the JSON property `allowed`
|
31028
|
+
# @return [Boolean]
|
31029
|
+
attr_accessor :allowed
|
31030
|
+
alias_method :allowed?, :allowed
|
31031
|
+
|
31032
|
+
# Regex used to match the request.
|
31033
|
+
# Corresponds to the JSON property `requestTakedownRegex`
|
31034
|
+
# @return [String]
|
31035
|
+
attr_accessor :request_takedown_regex
|
31036
|
+
|
31037
|
+
# Regex used to decide that response should be taken down. Empty when response
|
31038
|
+
# is kept.
|
31039
|
+
# Corresponds to the JSON property `responseTakedownRegex`
|
31040
|
+
# @return [String]
|
31041
|
+
attr_accessor :response_takedown_regex
|
31042
|
+
|
31043
|
+
def initialize(**args)
|
31044
|
+
update!(**args)
|
31045
|
+
end
|
31046
|
+
|
31047
|
+
# Update properties of this object
|
31048
|
+
def update!(**args)
|
31049
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
31050
|
+
@request_takedown_regex = args[:request_takedown_regex] if args.key?(:request_takedown_regex)
|
31051
|
+
@response_takedown_regex = args[:response_takedown_regex] if args.key?(:response_takedown_regex)
|
31052
|
+
end
|
31053
|
+
end
|
31054
|
+
|
31055
|
+
# Holds the final routing decision, by storing the model_config_id. And
|
31056
|
+
# individual scores each model got.
|
31057
|
+
class LearningGenaiRootRoutingDecision
|
31058
|
+
include Google::Apis::Core::Hashable
|
31059
|
+
|
31060
|
+
# Debug metadata about the routing decision.
|
31061
|
+
# Corresponds to the JSON property `metadata`
|
31062
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRoutingDecisionMetadata]
|
31063
|
+
attr_accessor :metadata
|
31064
|
+
|
31065
|
+
# The selected model to route traffic to.
|
31066
|
+
# Corresponds to the JSON property `modelConfigId`
|
31067
|
+
# @return [String]
|
31068
|
+
attr_accessor :model_config_id
|
31069
|
+
|
31070
|
+
def initialize(**args)
|
31071
|
+
update!(**args)
|
31072
|
+
end
|
31073
|
+
|
31074
|
+
# Update properties of this object
|
31075
|
+
def update!(**args)
|
31076
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
31077
|
+
@model_config_id = args[:model_config_id] if args.key?(:model_config_id)
|
31078
|
+
end
|
31079
|
+
end
|
31080
|
+
|
31081
|
+
# Debug metadata about the routing decision.
|
31082
|
+
class LearningGenaiRootRoutingDecisionMetadata
|
31083
|
+
include Google::Apis::Core::Hashable
|
31084
|
+
|
31085
|
+
# If we are routing using scored based configuration, then the metadata about
|
31086
|
+
# that is available in this proto.
|
31087
|
+
# Corresponds to the JSON property `scoreBasedRoutingMetadata`
|
31088
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRoutingDecisionMetadataScoreBased]
|
31089
|
+
attr_accessor :score_based_routing_metadata
|
31090
|
+
|
31091
|
+
#
|
31092
|
+
# Corresponds to the JSON property `tokenLengthBasedRoutingMetadata`
|
31093
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBased]
|
31094
|
+
attr_accessor :token_length_based_routing_metadata
|
31095
|
+
|
31096
|
+
def initialize(**args)
|
31097
|
+
update!(**args)
|
31098
|
+
end
|
31099
|
+
|
31100
|
+
# Update properties of this object
|
31101
|
+
def update!(**args)
|
31102
|
+
@score_based_routing_metadata = args[:score_based_routing_metadata] if args.key?(:score_based_routing_metadata)
|
31103
|
+
@token_length_based_routing_metadata = args[:token_length_based_routing_metadata] if args.key?(:token_length_based_routing_metadata)
|
31104
|
+
end
|
31105
|
+
end
|
31106
|
+
|
31107
|
+
# If we are routing using scored based configuration, then the metadata about
|
31108
|
+
# that is available in this proto.
|
31109
|
+
class LearningGenaiRootRoutingDecisionMetadataScoreBased
|
31110
|
+
include Google::Apis::Core::Hashable
|
31111
|
+
|
31112
|
+
# The rule that was matched.
|
31113
|
+
# Corresponds to the JSON property `matchedRule`
|
31114
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootScoreBasedRoutingConfigRule]
|
31115
|
+
attr_accessor :matched_rule
|
31116
|
+
|
31117
|
+
# The score that was generated by the router i.e. the model.
|
31118
|
+
# Corresponds to the JSON property `score`
|
31119
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootScore]
|
31120
|
+
attr_accessor :score
|
31121
|
+
|
31122
|
+
# No rules were matched & therefore used the default fallback.
|
31123
|
+
# Corresponds to the JSON property `usedDefaultFallback`
|
31124
|
+
# @return [Boolean]
|
31125
|
+
attr_accessor :used_default_fallback
|
31126
|
+
alias_method :used_default_fallback?, :used_default_fallback
|
31127
|
+
|
31128
|
+
def initialize(**args)
|
31129
|
+
update!(**args)
|
31130
|
+
end
|
31131
|
+
|
31132
|
+
# Update properties of this object
|
31133
|
+
def update!(**args)
|
31134
|
+
@matched_rule = args[:matched_rule] if args.key?(:matched_rule)
|
31135
|
+
@score = args[:score] if args.key?(:score)
|
31136
|
+
@used_default_fallback = args[:used_default_fallback] if args.key?(:used_default_fallback)
|
31137
|
+
end
|
31138
|
+
end
|
31139
|
+
|
31140
|
+
#
|
31141
|
+
class LearningGenaiRootRoutingDecisionMetadataTokenLengthBased
|
31142
|
+
include Google::Apis::Core::Hashable
|
31143
|
+
|
31144
|
+
#
|
31145
|
+
# Corresponds to the JSON property `modelInputTokenMetadata`
|
31146
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata>]
|
31147
|
+
attr_accessor :model_input_token_metadata
|
31148
|
+
|
31149
|
+
#
|
31150
|
+
# Corresponds to the JSON property `modelMaxTokenMetadata`
|
31151
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata>]
|
31152
|
+
attr_accessor :model_max_token_metadata
|
31153
|
+
|
31154
|
+
def initialize(**args)
|
31155
|
+
update!(**args)
|
31156
|
+
end
|
31157
|
+
|
31158
|
+
# Update properties of this object
|
31159
|
+
def update!(**args)
|
31160
|
+
@model_input_token_metadata = args[:model_input_token_metadata] if args.key?(:model_input_token_metadata)
|
31161
|
+
@model_max_token_metadata = args[:model_max_token_metadata] if args.key?(:model_max_token_metadata)
|
31162
|
+
end
|
31163
|
+
end
|
31164
|
+
|
31165
|
+
#
|
31166
|
+
class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata
|
31167
|
+
include Google::Apis::Core::Hashable
|
31168
|
+
|
31169
|
+
# The length computed by backends using the formatter & tokenizer specific to
|
31170
|
+
# the model
|
31171
|
+
# Corresponds to the JSON property `computedInputTokenLength`
|
31172
|
+
# @return [Fixnum]
|
31173
|
+
attr_accessor :computed_input_token_length
|
31174
|
+
|
31175
|
+
#
|
31176
|
+
# Corresponds to the JSON property `modelId`
|
31177
|
+
# @return [String]
|
31178
|
+
attr_accessor :model_id
|
31179
|
+
|
31180
|
+
def initialize(**args)
|
31181
|
+
update!(**args)
|
31182
|
+
end
|
31183
|
+
|
31184
|
+
# Update properties of this object
|
31185
|
+
def update!(**args)
|
31186
|
+
@computed_input_token_length = args[:computed_input_token_length] if args.key?(:computed_input_token_length)
|
31187
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
31188
|
+
end
|
31189
|
+
end
|
31190
|
+
|
31191
|
+
#
|
31192
|
+
class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata
|
31193
|
+
include Google::Apis::Core::Hashable
|
31194
|
+
|
31195
|
+
#
|
31196
|
+
# Corresponds to the JSON property `maxNumInputTokens`
|
31197
|
+
# @return [Fixnum]
|
31198
|
+
attr_accessor :max_num_input_tokens
|
31199
|
+
|
31200
|
+
#
|
31201
|
+
# Corresponds to the JSON property `maxNumOutputTokens`
|
31202
|
+
# @return [Fixnum]
|
31203
|
+
attr_accessor :max_num_output_tokens
|
31204
|
+
|
31205
|
+
#
|
31206
|
+
# Corresponds to the JSON property `modelId`
|
31207
|
+
# @return [String]
|
31208
|
+
attr_accessor :model_id
|
31209
|
+
|
31210
|
+
def initialize(**args)
|
31211
|
+
update!(**args)
|
31212
|
+
end
|
31213
|
+
|
31214
|
+
# Update properties of this object
|
31215
|
+
def update!(**args)
|
31216
|
+
@max_num_input_tokens = args[:max_num_input_tokens] if args.key?(:max_num_input_tokens)
|
31217
|
+
@max_num_output_tokens = args[:max_num_output_tokens] if args.key?(:max_num_output_tokens)
|
31218
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
31219
|
+
end
|
31220
|
+
end
|
31221
|
+
|
31222
|
+
#
|
31223
|
+
class LearningGenaiRootRuleOutput
|
31224
|
+
include Google::Apis::Core::Hashable
|
31225
|
+
|
31226
|
+
#
|
31227
|
+
# Corresponds to the JSON property `decision`
|
31228
|
+
# @return [String]
|
31229
|
+
attr_accessor :decision
|
31230
|
+
|
31231
|
+
#
|
31232
|
+
# Corresponds to the JSON property `name`
|
31233
|
+
# @return [String]
|
31234
|
+
attr_accessor :name
|
31235
|
+
|
31236
|
+
def initialize(**args)
|
31237
|
+
update!(**args)
|
31238
|
+
end
|
31239
|
+
|
31240
|
+
# Update properties of this object
|
31241
|
+
def update!(**args)
|
31242
|
+
@decision = args[:decision] if args.key?(:decision)
|
31243
|
+
@name = args[:name] if args.key?(:name)
|
31244
|
+
end
|
31245
|
+
end
|
31246
|
+
|
31247
|
+
#
|
31248
|
+
class LearningGenaiRootScore
|
31249
|
+
include Google::Apis::Core::Hashable
|
31250
|
+
|
31251
|
+
# The type used for final weights calculation.
|
31252
|
+
# Corresponds to the JSON property `calculationType`
|
31253
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootCalculationType]
|
31254
|
+
attr_accessor :calculation_type
|
31255
|
+
|
31256
|
+
# The internal_metadata is intended to be used by internal processors and will
|
31257
|
+
# be cleared before returns.
|
31258
|
+
# Corresponds to the JSON property `internalMetadata`
|
31259
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootInternalMetadata]
|
31260
|
+
attr_accessor :internal_metadata
|
31261
|
+
|
31262
|
+
# The type of score that bundled with a threshold, and will not be attending the
|
31263
|
+
# final score calculation. How each score type uses the threshold can be
|
31264
|
+
# implementation details.
|
31265
|
+
# Corresponds to the JSON property `thresholdType`
|
31266
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootThresholdType]
|
31267
|
+
attr_accessor :threshold_type
|
31268
|
+
|
31269
|
+
# Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
|
31270
|
+
# Corresponds to the JSON property `tokensAndLogprobPerDecodingStep`
|
31271
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootTokensAndLogProbPerDecodingStep]
|
31272
|
+
attr_accessor :tokens_and_logprob_per_decoding_step
|
31273
|
+
|
31274
|
+
#
|
31275
|
+
# Corresponds to the JSON property `value`
|
31276
|
+
# @return [Float]
|
31277
|
+
attr_accessor :value
|
31278
|
+
|
31279
|
+
def initialize(**args)
|
31280
|
+
update!(**args)
|
31281
|
+
end
|
31282
|
+
|
31283
|
+
# Update properties of this object
|
31284
|
+
def update!(**args)
|
31285
|
+
@calculation_type = args[:calculation_type] if args.key?(:calculation_type)
|
31286
|
+
@internal_metadata = args[:internal_metadata] if args.key?(:internal_metadata)
|
31287
|
+
@threshold_type = args[:threshold_type] if args.key?(:threshold_type)
|
31288
|
+
@tokens_and_logprob_per_decoding_step = args[:tokens_and_logprob_per_decoding_step] if args.key?(:tokens_and_logprob_per_decoding_step)
|
31289
|
+
@value = args[:value] if args.key?(:value)
|
31290
|
+
end
|
31291
|
+
end
|
31292
|
+
|
31293
|
+
#
|
31294
|
+
class LearningGenaiRootScoreBasedRoutingConfigRule
|
31295
|
+
include Google::Apis::Core::Hashable
|
31296
|
+
|
31297
|
+
# NOTE: Hardest examples have smaller values in their routing scores.
|
31298
|
+
# Corresponds to the JSON property `equalOrGreaterThan`
|
31299
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootScore]
|
31300
|
+
attr_accessor :equal_or_greater_than
|
31301
|
+
|
31302
|
+
#
|
31303
|
+
# Corresponds to the JSON property `lessThan`
|
31304
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootScore]
|
31305
|
+
attr_accessor :less_than
|
31306
|
+
|
31307
|
+
# This model_config_id points to ModelConfig::id which allows us to find the
|
31308
|
+
# ModelConfig to route to. This is part of the banks specified in the
|
31309
|
+
# ModelBankConfig.
|
31310
|
+
# Corresponds to the JSON property `modelConfigId`
|
31311
|
+
# @return [String]
|
31312
|
+
attr_accessor :model_config_id
|
31313
|
+
|
31314
|
+
def initialize(**args)
|
31315
|
+
update!(**args)
|
31316
|
+
end
|
31317
|
+
|
31318
|
+
# Update properties of this object
|
31319
|
+
def update!(**args)
|
31320
|
+
@equal_or_greater_than = args[:equal_or_greater_than] if args.key?(:equal_or_greater_than)
|
31321
|
+
@less_than = args[:less_than] if args.key?(:less_than)
|
31322
|
+
@model_config_id = args[:model_config_id] if args.key?(:model_config_id)
|
31323
|
+
end
|
31324
|
+
end
|
31325
|
+
|
31326
|
+
# Proto containing the results from the Universal Sentence Encoder / Other
|
31327
|
+
# models
|
31328
|
+
class LearningGenaiRootScoredSimilarityTakedownPhrase
|
31329
|
+
include Google::Apis::Core::Hashable
|
31330
|
+
|
31331
|
+
# Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
|
31332
|
+
# phrases together along with a corresponding punt If the closest matching
|
31333
|
+
# response is of the allowed type, we allow the response If the closest matching
|
31334
|
+
# response is of the blocked type, we block the response. eg: Blocked phrase - "
|
31335
|
+
# All lives matter"
|
31336
|
+
# Corresponds to the JSON property `phrase`
|
31337
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootSimilarityTakedownPhrase]
|
31338
|
+
attr_accessor :phrase
|
31339
|
+
|
31340
|
+
#
|
31341
|
+
# Corresponds to the JSON property `similarityScore`
|
31342
|
+
# @return [Float]
|
31343
|
+
attr_accessor :similarity_score
|
31344
|
+
|
31345
|
+
def initialize(**args)
|
31346
|
+
update!(**args)
|
31347
|
+
end
|
31348
|
+
|
31349
|
+
# Update properties of this object
|
31350
|
+
def update!(**args)
|
31351
|
+
@phrase = args[:phrase] if args.key?(:phrase)
|
31352
|
+
@similarity_score = args[:similarity_score] if args.key?(:similarity_score)
|
31353
|
+
end
|
31354
|
+
end
|
31355
|
+
|
31356
|
+
# A token with its own score.
|
31357
|
+
class LearningGenaiRootScoredToken
|
31358
|
+
include Google::Apis::Core::Hashable
|
31359
|
+
|
31360
|
+
# Each end_token_score is a logprob for how well the completion would end at a
|
31361
|
+
# particular token. See http://google3/labs/language/aida/config/proto/
|
31362
|
+
# model_config.proto;l=376;rcl=573039459
|
31363
|
+
# Corresponds to the JSON property `endTokenScore`
|
31364
|
+
# @return [Float]
|
31365
|
+
attr_accessor :end_token_score
|
31366
|
+
|
31367
|
+
# Each score is the logprob for the token in model response.
|
31368
|
+
# Corresponds to the JSON property `score`
|
31369
|
+
# @return [Float]
|
31370
|
+
attr_accessor :score
|
31371
|
+
|
31372
|
+
#
|
31373
|
+
# Corresponds to the JSON property `token`
|
31374
|
+
# @return [String]
|
31375
|
+
attr_accessor :token
|
31376
|
+
|
31377
|
+
def initialize(**args)
|
31378
|
+
update!(**args)
|
31379
|
+
end
|
31380
|
+
|
31381
|
+
# Update properties of this object
|
31382
|
+
def update!(**args)
|
31383
|
+
@end_token_score = args[:end_token_score] if args.key?(:end_token_score)
|
31384
|
+
@score = args[:score] if args.key?(:score)
|
31385
|
+
@token = args[:token] if args.key?(:token)
|
31386
|
+
end
|
31387
|
+
end
|
31388
|
+
|
31389
|
+
# Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
|
31390
|
+
# phrases together along with a corresponding punt If the closest matching
|
31391
|
+
# response is of the allowed type, we allow the response If the closest matching
|
31392
|
+
# response is of the blocked type, we block the response. eg: Blocked phrase - "
|
31393
|
+
# All lives matter"
|
31394
|
+
class LearningGenaiRootSimilarityTakedownPhrase
|
31395
|
+
include Google::Apis::Core::Hashable
|
31396
|
+
|
31397
|
+
#
|
31398
|
+
# Corresponds to the JSON property `blockedPhrase`
|
31399
|
+
# @return [String]
|
31400
|
+
attr_accessor :blocked_phrase
|
31401
|
+
|
31402
|
+
def initialize(**args)
|
31403
|
+
update!(**args)
|
31404
|
+
end
|
31405
|
+
|
31406
|
+
# Update properties of this object
|
31407
|
+
def update!(**args)
|
31408
|
+
@blocked_phrase = args[:blocked_phrase] if args.key?(:blocked_phrase)
|
31409
|
+
end
|
31410
|
+
end
|
31411
|
+
|
31412
|
+
#
|
31413
|
+
class LearningGenaiRootSimilarityTakedownResult
|
31414
|
+
include Google::Apis::Core::Hashable
|
31415
|
+
|
31416
|
+
# False when query or response should be taken down by any of the takedown rules,
|
31417
|
+
# true otherwise.
|
31418
|
+
# Corresponds to the JSON property `allowed`
|
31419
|
+
# @return [Boolean]
|
31420
|
+
attr_accessor :allowed
|
31421
|
+
alias_method :allowed?, :allowed
|
31422
|
+
|
31423
|
+
# List of similar phrases with score. Set only if allowed=false.
|
31424
|
+
# Corresponds to the JSON property `scoredPhrases`
|
31425
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootScoredSimilarityTakedownPhrase>]
|
31426
|
+
attr_accessor :scored_phrases
|
31427
|
+
|
31428
|
+
def initialize(**args)
|
31429
|
+
update!(**args)
|
31430
|
+
end
|
31431
|
+
|
31432
|
+
# Update properties of this object
|
31433
|
+
def update!(**args)
|
31434
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
31435
|
+
@scored_phrases = args[:scored_phrases] if args.key?(:scored_phrases)
|
31436
|
+
end
|
31437
|
+
end
|
31438
|
+
|
31439
|
+
#
|
31440
|
+
class LearningGenaiRootTakedownResult
|
31441
|
+
include Google::Apis::Core::Hashable
|
31442
|
+
|
31443
|
+
# False when query or response should be taken down by any of the takedown rules,
|
31444
|
+
# true otherwise.
|
31445
|
+
# Corresponds to the JSON property `allowed`
|
31446
|
+
# @return [Boolean]
|
31447
|
+
attr_accessor :allowed
|
31448
|
+
alias_method :allowed?, :allowed
|
31449
|
+
|
31450
|
+
#
|
31451
|
+
# Corresponds to the JSON property `regexTakedownResult`
|
31452
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRegexTakedownResult]
|
31453
|
+
attr_accessor :regex_takedown_result
|
31454
|
+
|
31455
|
+
#
|
31456
|
+
# Corresponds to the JSON property `requestResponseTakedownResult`
|
31457
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootRequestResponseTakedownResult]
|
31458
|
+
attr_accessor :request_response_takedown_result
|
31459
|
+
|
31460
|
+
#
|
31461
|
+
# Corresponds to the JSON property `similarityTakedownResult`
|
31462
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootSimilarityTakedownResult]
|
31463
|
+
attr_accessor :similarity_takedown_result
|
31464
|
+
|
31465
|
+
def initialize(**args)
|
31466
|
+
update!(**args)
|
31467
|
+
end
|
31468
|
+
|
31469
|
+
# Update properties of this object
|
31470
|
+
def update!(**args)
|
31471
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
31472
|
+
@regex_takedown_result = args[:regex_takedown_result] if args.key?(:regex_takedown_result)
|
31473
|
+
@request_response_takedown_result = args[:request_response_takedown_result] if args.key?(:request_response_takedown_result)
|
31474
|
+
@similarity_takedown_result = args[:similarity_takedown_result] if args.key?(:similarity_takedown_result)
|
31475
|
+
end
|
31476
|
+
end
|
31477
|
+
|
31478
|
+
# The type of score that bundled with a threshold, and will not be attending the
|
31479
|
+
# final score calculation. How each score type uses the threshold can be
|
31480
|
+
# implementation details.
|
31481
|
+
class LearningGenaiRootThresholdType
|
31482
|
+
include Google::Apis::Core::Hashable
|
31483
|
+
|
31484
|
+
#
|
31485
|
+
# Corresponds to the JSON property `scoreType`
|
31486
|
+
# @return [String]
|
31487
|
+
attr_accessor :score_type
|
31488
|
+
|
31489
|
+
#
|
31490
|
+
# Corresponds to the JSON property `threshold`
|
31491
|
+
# @return [Float]
|
31492
|
+
attr_accessor :threshold
|
31493
|
+
|
31494
|
+
def initialize(**args)
|
31495
|
+
update!(**args)
|
31496
|
+
end
|
31497
|
+
|
31498
|
+
# Update properties of this object
|
31499
|
+
def update!(**args)
|
31500
|
+
@score_type = args[:score_type] if args.key?(:score_type)
|
31501
|
+
@threshold = args[:threshold] if args.key?(:threshold)
|
31502
|
+
end
|
31503
|
+
end
|
31504
|
+
|
31505
|
+
# Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
|
31506
|
+
class LearningGenaiRootTokensAndLogProbPerDecodingStep
|
31507
|
+
include Google::Apis::Core::Hashable
|
31508
|
+
|
31509
|
+
# Length = total number of decoding steps. The chosen candidates may or may not
|
31510
|
+
# be in top_candidates.
|
31511
|
+
# Corresponds to the JSON property `chosenCandidates`
|
31512
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
|
31513
|
+
attr_accessor :chosen_candidates
|
31514
|
+
|
31515
|
+
# Length = total number of decoding steps.
|
31516
|
+
# Corresponds to the JSON property `topCandidates`
|
31517
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates>]
|
31518
|
+
attr_accessor :top_candidates
|
31519
|
+
|
31520
|
+
def initialize(**args)
|
31521
|
+
update!(**args)
|
31522
|
+
end
|
31523
|
+
|
31524
|
+
# Update properties of this object
|
31525
|
+
def update!(**args)
|
31526
|
+
@chosen_candidates = args[:chosen_candidates] if args.key?(:chosen_candidates)
|
31527
|
+
@top_candidates = args[:top_candidates] if args.key?(:top_candidates)
|
31528
|
+
end
|
31529
|
+
end
|
31530
|
+
|
31531
|
+
# A candidate at a decoding step.
|
31532
|
+
class LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate
|
31533
|
+
include Google::Apis::Core::Hashable
|
31534
|
+
|
31535
|
+
# The candidate's log probability.
|
31536
|
+
# Corresponds to the JSON property `logProbability`
|
31537
|
+
# @return [Float]
|
31538
|
+
attr_accessor :log_probability
|
31539
|
+
|
31540
|
+
# The candidate’s token value.
|
31541
|
+
# Corresponds to the JSON property `token`
|
31542
|
+
# @return [String]
|
31543
|
+
attr_accessor :token
|
31544
|
+
|
31545
|
+
def initialize(**args)
|
31546
|
+
update!(**args)
|
31547
|
+
end
|
31548
|
+
|
31549
|
+
# Update properties of this object
|
31550
|
+
def update!(**args)
|
31551
|
+
@log_probability = args[:log_probability] if args.key?(:log_probability)
|
31552
|
+
@token = args[:token] if args.key?(:token)
|
31553
|
+
end
|
31554
|
+
end
|
31555
|
+
|
31556
|
+
# Candidates with top log probabilities at each decoding step.
|
31557
|
+
class LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates
|
31558
|
+
include Google::Apis::Core::Hashable
|
31559
|
+
|
31560
|
+
# Sorted by log probability in descending order.
|
31561
|
+
# Corresponds to the JSON property `candidates`
|
31562
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
|
31563
|
+
attr_accessor :candidates
|
31564
|
+
|
31565
|
+
def initialize(**args)
|
31566
|
+
update!(**args)
|
31567
|
+
end
|
31568
|
+
|
31569
|
+
# Update properties of this object
|
31570
|
+
def update!(**args)
|
31571
|
+
@candidates = args[:candidates] if args.key?(:candidates)
|
31572
|
+
end
|
31573
|
+
end
|
31574
|
+
|
31575
|
+
# A model can generate multiple signals and this captures all the generated
|
31576
|
+
# signals for a single message.
|
31577
|
+
class LearningGenaiRootToxicityResult
|
31578
|
+
include Google::Apis::Core::Hashable
|
31579
|
+
|
31580
|
+
#
|
31581
|
+
# Corresponds to the JSON property `signals`
|
31582
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootToxicitySignal>]
|
31583
|
+
attr_accessor :signals
|
31584
|
+
|
31585
|
+
def initialize(**args)
|
31586
|
+
update!(**args)
|
31587
|
+
end
|
31588
|
+
|
31589
|
+
# Update properties of this object
|
31590
|
+
def update!(**args)
|
31591
|
+
@signals = args[:signals] if args.key?(:signals)
|
31592
|
+
end
|
31593
|
+
end
|
31594
|
+
|
31595
|
+
# Proto to capture a signal generated by the toxicity model.
|
31596
|
+
class LearningGenaiRootToxicitySignal
|
31597
|
+
include Google::Apis::Core::Hashable
|
31598
|
+
|
31599
|
+
#
|
31600
|
+
# Corresponds to the JSON property `allowed`
|
31601
|
+
# @return [Boolean]
|
31602
|
+
attr_accessor :allowed
|
31603
|
+
alias_method :allowed?, :allowed
|
31604
|
+
|
31605
|
+
#
|
31606
|
+
# Corresponds to the JSON property `label`
|
31607
|
+
# @return [String]
|
31608
|
+
attr_accessor :label
|
31609
|
+
|
31610
|
+
#
|
31611
|
+
# Corresponds to the JSON property `score`
|
31612
|
+
# @return [Float]
|
31613
|
+
attr_accessor :score
|
31614
|
+
|
31615
|
+
def initialize(**args)
|
31616
|
+
update!(**args)
|
31617
|
+
end
|
31618
|
+
|
31619
|
+
# Update properties of this object
|
31620
|
+
def update!(**args)
|
31621
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
31622
|
+
@label = args[:label] if args.key?(:label)
|
31623
|
+
@score = args[:score] if args.key?(:score)
|
31624
|
+
end
|
31625
|
+
end
|
31626
|
+
|
31627
|
+
#
|
31628
|
+
class LearningServingLlmLanguageFilterResult
|
31629
|
+
include Google::Apis::Core::Hashable
|
31630
|
+
|
31631
|
+
# False when query or response should be filtered out due to unsupported
|
31632
|
+
# language.
|
31633
|
+
# Corresponds to the JSON property `allowed`
|
31634
|
+
# @return [Boolean]
|
31635
|
+
attr_accessor :allowed
|
31636
|
+
alias_method :allowed?, :allowed
|
31637
|
+
|
31638
|
+
# Language of the query or response.
|
31639
|
+
# Corresponds to the JSON property `detectedLanguage`
|
31640
|
+
# @return [String]
|
31641
|
+
attr_accessor :detected_language
|
31642
|
+
|
31643
|
+
# Probability of the language predicted as returned by LangID.
|
31644
|
+
# Corresponds to the JSON property `detectedLanguageProbability`
|
31645
|
+
# @return [Float]
|
31646
|
+
attr_accessor :detected_language_probability
|
31647
|
+
|
31648
|
+
def initialize(**args)
|
31649
|
+
update!(**args)
|
31650
|
+
end
|
31651
|
+
|
31652
|
+
# Update properties of this object
|
31653
|
+
def update!(**args)
|
31654
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
31655
|
+
@detected_language = args[:detected_language] if args.key?(:detected_language)
|
31656
|
+
@detected_language_probability = args[:detected_language_probability] if args.key?(:detected_language_probability)
|
31657
|
+
end
|
31658
|
+
end
|
31659
|
+
|
31660
|
+
# LINT.IfChange This metadata contains additional information required for
|
31661
|
+
# debugging.
|
31662
|
+
class LearningServingLlmMessageMetadata
|
31663
|
+
include Google::Apis::Core::Hashable
|
31664
|
+
|
31665
|
+
# Summary of classifier output. We attach this to all messages regardless of
|
31666
|
+
# whether classification rules triggered or not.
|
31667
|
+
# Corresponds to the JSON property `classifierSummary`
|
31668
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootClassifierOutputSummary]
|
31669
|
+
attr_accessor :classifier_summary
|
31670
|
+
|
31671
|
+
#
|
31672
|
+
# Corresponds to the JSON property `currentStreamTextLength`
|
31673
|
+
# @return [Fixnum]
|
31674
|
+
attr_accessor :current_stream_text_length
|
31675
|
+
|
31676
|
+
# Whether the corresponding message has been deleted.
|
31677
|
+
# Corresponds to the JSON property `deleted`
|
31678
|
+
# @return [Boolean]
|
31679
|
+
attr_accessor :deleted
|
31680
|
+
alias_method :deleted?, :deleted
|
31681
|
+
|
31682
|
+
# Metadata for filters that triggered.
|
31683
|
+
# Corresponds to the JSON property `filterMeta`
|
31684
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootFilterMetadata>]
|
31685
|
+
attr_accessor :filter_meta
|
31686
|
+
|
31687
|
+
# This score is finally used for ranking the message. This will be same as the
|
31688
|
+
# score present in `Message.score` field.
|
31689
|
+
# Corresponds to the JSON property `finalMessageScore`
|
31690
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRootScore]
|
31691
|
+
attr_accessor :final_message_score
|
31692
|
+
|
31693
|
+
# NOT YET IMPLEMENTED.
|
31694
|
+
# Corresponds to the JSON property `finishReason`
|
31695
|
+
# @return [String]
|
31696
|
+
attr_accessor :finish_reason
|
31697
|
+
|
31698
|
+
# Applies to Response message only. Indicates whether the message is a fallback
|
31699
|
+
# and the response would have otherwise been empty.
|
31700
|
+
# Corresponds to the JSON property `isFallback`
|
31701
|
+
# @return [Boolean]
|
31702
|
+
attr_accessor :is_fallback
|
31703
|
+
alias_method :is_fallback?, :is_fallback
|
31704
|
+
|
31705
|
+
# Result from nlp_saft DetectLanguage method. Currently the predicted language
|
31706
|
+
# code and language probability is used.
|
31707
|
+
# Corresponds to the JSON property `langidResult`
|
31708
|
+
# @return [Google::Apis::AiplatformV1beta1::NlpSaftLangIdResult]
|
31709
|
+
attr_accessor :langid_result
|
31710
|
+
|
31711
|
+
# Detected language.
|
31712
|
+
# Corresponds to the JSON property `language`
|
31713
|
+
# @return [String]
|
31714
|
+
attr_accessor :language
|
31715
|
+
|
31716
|
+
# The LM prefix used to generate this response.
|
31717
|
+
# Corresponds to the JSON property `lmPrefix`
|
31718
|
+
# @return [String]
|
31719
|
+
attr_accessor :lm_prefix
|
31720
|
+
|
31721
|
+
# The original text generated by LLM. This is the raw output for debugging
|
31722
|
+
# purposes.
|
31723
|
+
# Corresponds to the JSON property `originalText`
|
31724
|
+
# @return [String]
|
31725
|
+
attr_accessor :original_text
|
31726
|
+
|
31727
|
+
# NOT YET IMPLEMENTED. Applies to streaming only. Number of tokens decoded /
|
31728
|
+
# emitted by the model as part of this stream. This may be different from
|
31729
|
+
# token_count, which contains number of tokens returned in this response after
|
31730
|
+
# any response rewriting / truncation.
|
31731
|
+
# Corresponds to the JSON property `perStreamDecodedTokenCount`
|
31732
|
+
# @return [Fixnum]
|
31733
|
+
attr_accessor :per_stream_decoded_token_count
|
31734
|
+
|
31735
|
+
# Results of running RAI on the query or this response candidate. One output per
|
31736
|
+
# rai_config. It will be populated regardless of whether the threshold is
|
31737
|
+
# exceeded or not.
|
31738
|
+
# Corresponds to the JSON property `raiOutputs`
|
31739
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootRaiOutput>]
|
31740
|
+
attr_accessor :rai_outputs
|
31741
|
+
|
31742
|
+
# The recitation result for one input
|
31743
|
+
# Corresponds to the JSON property `recitationResult`
|
31744
|
+
# @return [Google::Apis::AiplatformV1beta1::LearningGenaiRecitationRecitationResult]
|
31745
|
+
attr_accessor :recitation_result
|
31746
|
+
|
31747
|
+
# NOT YET IMPLEMENTED. Number of tokens returned as part of this candidate.
|
31748
|
+
# Corresponds to the JSON property `returnTokenCount`
|
31749
|
+
# @return [Fixnum]
|
31750
|
+
attr_accessor :return_token_count
|
31751
|
+
|
31752
|
+
# All the different scores for a message are logged here.
|
31753
|
+
# Corresponds to the JSON property `scores`
|
31754
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::LearningGenaiRootScore>]
|
31755
|
+
attr_accessor :scores
|
31756
|
+
|
31757
|
+
# Whether the response is terminated during streaming return. Only used for
|
31758
|
+
# streaming requests.
|
31759
|
+
# Corresponds to the JSON property `streamTerminated`
|
31760
|
+
# @return [Boolean]
|
31761
|
+
attr_accessor :stream_terminated
|
31762
|
+
alias_method :stream_terminated?, :stream_terminated
|
31763
|
+
|
31764
|
+
# NOT YET IMPLEMENTED. Aggregated number of total tokens decoded so far. For
|
31765
|
+
# streaming, this is sum of all the tokens decoded so far i.e. aggregated count.
|
31766
|
+
# Corresponds to the JSON property `totalDecodedTokenCount`
|
31767
|
+
# @return [Fixnum]
|
31768
|
+
attr_accessor :total_decoded_token_count
|
31769
|
+
|
31770
|
+
# Translated user-prompt used for RAI post processing. This is for internal
|
31771
|
+
# processing only. We will translate in pre-processor and pass the translated
|
31772
|
+
# text to the post processor using this field. It will be empty if non of the
|
31773
|
+
# signals requested need translation.
|
31774
|
+
# Corresponds to the JSON property `translatedUserPrompts`
|
31775
|
+
# @return [Array<String>]
|
31776
|
+
attr_accessor :translated_user_prompts
|
31777
|
+
|
31778
|
+
# The RAI results for a given text.
|
31779
|
+
# Corresponds to the JSON property `vertexRaiResult`
|
31780
|
+
# @return [Google::Apis::AiplatformV1beta1::CloudAiNlLlmProtoServiceRaiResult]
|
31781
|
+
attr_accessor :vertex_rai_result
|
31782
|
+
|
31783
|
+
def initialize(**args)
|
31784
|
+
update!(**args)
|
31785
|
+
end
|
31786
|
+
|
31787
|
+
# Update properties of this object
|
31788
|
+
def update!(**args)
|
31789
|
+
@classifier_summary = args[:classifier_summary] if args.key?(:classifier_summary)
|
31790
|
+
@current_stream_text_length = args[:current_stream_text_length] if args.key?(:current_stream_text_length)
|
31791
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
31792
|
+
@filter_meta = args[:filter_meta] if args.key?(:filter_meta)
|
31793
|
+
@final_message_score = args[:final_message_score] if args.key?(:final_message_score)
|
31794
|
+
@finish_reason = args[:finish_reason] if args.key?(:finish_reason)
|
31795
|
+
@is_fallback = args[:is_fallback] if args.key?(:is_fallback)
|
31796
|
+
@langid_result = args[:langid_result] if args.key?(:langid_result)
|
31797
|
+
@language = args[:language] if args.key?(:language)
|
31798
|
+
@lm_prefix = args[:lm_prefix] if args.key?(:lm_prefix)
|
31799
|
+
@original_text = args[:original_text] if args.key?(:original_text)
|
31800
|
+
@per_stream_decoded_token_count = args[:per_stream_decoded_token_count] if args.key?(:per_stream_decoded_token_count)
|
31801
|
+
@rai_outputs = args[:rai_outputs] if args.key?(:rai_outputs)
|
31802
|
+
@recitation_result = args[:recitation_result] if args.key?(:recitation_result)
|
31803
|
+
@return_token_count = args[:return_token_count] if args.key?(:return_token_count)
|
31804
|
+
@scores = args[:scores] if args.key?(:scores)
|
31805
|
+
@stream_terminated = args[:stream_terminated] if args.key?(:stream_terminated)
|
31806
|
+
@total_decoded_token_count = args[:total_decoded_token_count] if args.key?(:total_decoded_token_count)
|
31807
|
+
@translated_user_prompts = args[:translated_user_prompts] if args.key?(:translated_user_prompts)
|
31808
|
+
@vertex_rai_result = args[:vertex_rai_result] if args.key?(:vertex_rai_result)
|
31809
|
+
end
|
31810
|
+
end
|
31811
|
+
|
31812
|
+
#
|
31813
|
+
class NlpSaftLangIdLocalesResult
|
31814
|
+
include Google::Apis::Core::Hashable
|
31815
|
+
|
31816
|
+
# List of locales in which the text would be considered acceptable. Sorted in
|
31817
|
+
# descending order according to each locale's respective likelihood. For example,
|
31818
|
+
# if a Portuguese text is acceptable in both Brazil and Portugal, but is more
|
31819
|
+
# strongly associated with Brazil, then the predictions would be ["pt-BR", "pt-
|
31820
|
+
# PT"], in that order. May be empty, indicating that the model did not predict
|
31821
|
+
# any acceptable locales.
|
31822
|
+
# Corresponds to the JSON property `predictions`
|
31823
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::NlpSaftLangIdLocalesResultLocale>]
|
31824
|
+
attr_accessor :predictions
|
31825
|
+
|
31826
|
+
def initialize(**args)
|
31827
|
+
update!(**args)
|
31828
|
+
end
|
31829
|
+
|
31830
|
+
# Update properties of this object
|
31831
|
+
def update!(**args)
|
31832
|
+
@predictions = args[:predictions] if args.key?(:predictions)
|
31833
|
+
end
|
31834
|
+
end
|
31835
|
+
|
31836
|
+
#
|
31837
|
+
class NlpSaftLangIdLocalesResultLocale
|
31838
|
+
include Google::Apis::Core::Hashable
|
31839
|
+
|
31840
|
+
# A BCP 47 language code that includes region information. For example, "pt-BR"
|
31841
|
+
# or "pt-PT". This field will always be populated.
|
31842
|
+
# Corresponds to the JSON property `languageCode`
|
31843
|
+
# @return [String]
|
31844
|
+
attr_accessor :language_code
|
31845
|
+
|
31846
|
+
def initialize(**args)
|
31847
|
+
update!(**args)
|
31848
|
+
end
|
31849
|
+
|
31850
|
+
# Update properties of this object
|
31851
|
+
def update!(**args)
|
31852
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
31853
|
+
end
|
31854
|
+
end
|
31855
|
+
|
31856
|
+
#
|
31857
|
+
class NlpSaftLangIdResult
|
31858
|
+
include Google::Apis::Core::Hashable
|
31859
|
+
|
31860
|
+
# The version of the model used to create these annotations.
|
31861
|
+
# Corresponds to the JSON property `modelVersion`
|
31862
|
+
# @return [String]
|
31863
|
+
attr_accessor :model_version
|
31864
|
+
|
31865
|
+
# This field stores the n-best list of possible BCP 47 language code strings for
|
31866
|
+
# a given input sorted in descending order according to each code's respective
|
31867
|
+
# probability.
|
31868
|
+
# Corresponds to the JSON property `predictions`
|
31869
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::NlpSaftLanguageSpan>]
|
31870
|
+
attr_accessor :predictions
|
31871
|
+
|
31872
|
+
# This field stores language predictions of subspans of the input, when
|
31873
|
+
# available. Each LanguageSpanSequence is a sequence of LanguageSpans. A
|
31874
|
+
# particular sequence of LanguageSpans has an associated probability, and need
|
31875
|
+
# not necessarily cover the entire input. If no language could be predicted for
|
31876
|
+
# any span, then this field may be empty.
|
31877
|
+
# Corresponds to the JSON property `spanPredictions`
|
31878
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::NlpSaftLanguageSpanSequence>]
|
31879
|
+
attr_accessor :span_predictions
|
31880
|
+
|
31881
|
+
def initialize(**args)
|
31882
|
+
update!(**args)
|
31883
|
+
end
|
31884
|
+
|
31885
|
+
# Update properties of this object
|
31886
|
+
def update!(**args)
|
31887
|
+
@model_version = args[:model_version] if args.key?(:model_version)
|
31888
|
+
@predictions = args[:predictions] if args.key?(:predictions)
|
31889
|
+
@span_predictions = args[:span_predictions] if args.key?(:span_predictions)
|
31890
|
+
end
|
31891
|
+
end
|
31892
|
+
|
31893
|
+
#
|
31894
|
+
class NlpSaftLanguageSpan
|
31895
|
+
include Google::Apis::Core::Hashable
|
31896
|
+
|
31897
|
+
#
|
31898
|
+
# Corresponds to the JSON property `end`
|
31899
|
+
# @return [Fixnum]
|
31900
|
+
attr_accessor :end
|
31901
|
+
|
31902
|
+
# A BCP 47 language code for this span.
|
31903
|
+
# Corresponds to the JSON property `languageCode`
|
31904
|
+
# @return [String]
|
31905
|
+
attr_accessor :language_code
|
31906
|
+
|
31907
|
+
# Optional field containing any information that was predicted about the
|
31908
|
+
# specific locale(s) of the span.
|
31909
|
+
# Corresponds to the JSON property `locales`
|
31910
|
+
# @return [Google::Apis::AiplatformV1beta1::NlpSaftLangIdLocalesResult]
|
31911
|
+
attr_accessor :locales
|
31912
|
+
|
31913
|
+
# A probability associated with this prediction.
|
31914
|
+
# Corresponds to the JSON property `probability`
|
31915
|
+
# @return [Float]
|
31916
|
+
attr_accessor :probability
|
31917
|
+
|
31918
|
+
# Start and end byte offsets, inclusive, within the given input string. A value
|
31919
|
+
# of -1 implies that this field is not set. Both fields must either be set with
|
31920
|
+
# a nonnegative value or both are unset. If both are unset then this
|
31921
|
+
# LanguageSpan applies to the entire input.
|
31922
|
+
# Corresponds to the JSON property `start`
|
31923
|
+
# @return [Fixnum]
|
31924
|
+
attr_accessor :start
|
31925
|
+
|
31926
|
+
def initialize(**args)
|
31927
|
+
update!(**args)
|
31928
|
+
end
|
31929
|
+
|
31930
|
+
# Update properties of this object
|
31931
|
+
def update!(**args)
|
31932
|
+
@end = args[:end] if args.key?(:end)
|
31933
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
31934
|
+
@locales = args[:locales] if args.key?(:locales)
|
31935
|
+
@probability = args[:probability] if args.key?(:probability)
|
31936
|
+
@start = args[:start] if args.key?(:start)
|
31937
|
+
end
|
31938
|
+
end
|
31939
|
+
|
31940
|
+
#
|
31941
|
+
class NlpSaftLanguageSpanSequence
|
31942
|
+
include Google::Apis::Core::Hashable
|
31943
|
+
|
31944
|
+
# A sequence of LanguageSpan objects, each assigning a language to a subspan of
|
31945
|
+
# the input.
|
31946
|
+
# Corresponds to the JSON property `languageSpans`
|
31947
|
+
# @return [Array<Google::Apis::AiplatformV1beta1::NlpSaftLanguageSpan>]
|
31948
|
+
attr_accessor :language_spans
|
31949
|
+
|
31950
|
+
# The probability of this sequence of LanguageSpans.
|
31951
|
+
# Corresponds to the JSON property `probability`
|
31952
|
+
# @return [Float]
|
31953
|
+
attr_accessor :probability
|
31954
|
+
|
31955
|
+
def initialize(**args)
|
31956
|
+
update!(**args)
|
31957
|
+
end
|
31958
|
+
|
31959
|
+
# Update properties of this object
|
31960
|
+
def update!(**args)
|
31961
|
+
@language_spans = args[:language_spans] if args.key?(:language_spans)
|
31962
|
+
@probability = args[:probability] if args.key?(:probability)
|
31963
|
+
end
|
31964
|
+
end
|
31965
|
+
|
31966
|
+
# This is proto2's version of MessageSet.
|
31967
|
+
class Proto2BridgeMessageSet
|
31968
|
+
include Google::Apis::Core::Hashable
|
31969
|
+
|
31970
|
+
def initialize(**args)
|
31971
|
+
update!(**args)
|
31972
|
+
end
|
31973
|
+
|
31974
|
+
# Update properties of this object
|
31975
|
+
def update!(**args)
|
31976
|
+
end
|
31977
|
+
end
|
31978
|
+
|
31979
|
+
# Wire-format for a Status object
|
31980
|
+
class UtilStatusProto
|
31981
|
+
include Google::Apis::Core::Hashable
|
31982
|
+
|
31983
|
+
# The canonical error code (see codes.proto) that most closely corresponds to
|
31984
|
+
# this status. This may be missing, and in the common case of the generic space,
|
31985
|
+
# it definitely will be.
|
31986
|
+
# Corresponds to the JSON property `canonicalCode`
|
31987
|
+
# @return [Fixnum]
|
31988
|
+
attr_accessor :canonical_code
|
31989
|
+
|
31990
|
+
# Numeric code drawn from the space specified below. Often, this is the
|
31991
|
+
# canonical error space, and code is drawn from google3/util/task/codes.proto
|
31992
|
+
# Corresponds to the JSON property `code`
|
31993
|
+
# @return [Fixnum]
|
31994
|
+
attr_accessor :code
|
31995
|
+
|
31996
|
+
# Detail message
|
31997
|
+
# Corresponds to the JSON property `message`
|
31998
|
+
# @return [String]
|
31999
|
+
attr_accessor :message
|
32000
|
+
|
32001
|
+
# This is proto2's version of MessageSet.
|
32002
|
+
# Corresponds to the JSON property `messageSet`
|
32003
|
+
# @return [Google::Apis::AiplatformV1beta1::Proto2BridgeMessageSet]
|
32004
|
+
attr_accessor :message_set
|
32005
|
+
|
32006
|
+
# The following are usually only present when code != 0 Space to which this
|
32007
|
+
# status belongs
|
32008
|
+
# Corresponds to the JSON property `space`
|
32009
|
+
# @return [String]
|
32010
|
+
attr_accessor :space
|
32011
|
+
|
32012
|
+
def initialize(**args)
|
32013
|
+
update!(**args)
|
32014
|
+
end
|
32015
|
+
|
32016
|
+
# Update properties of this object
|
32017
|
+
def update!(**args)
|
32018
|
+
@canonical_code = args[:canonical_code] if args.key?(:canonical_code)
|
32019
|
+
@code = args[:code] if args.key?(:code)
|
32020
|
+
@message = args[:message] if args.key?(:message)
|
32021
|
+
@message_set = args[:message_set] if args.key?(:message_set)
|
32022
|
+
@space = args[:space] if args.key?(:space)
|
32023
|
+
end
|
32024
|
+
end
|
29559
32025
|
end
|
29560
32026
|
end
|
29561
32027
|
end
|