google-apis-aiplatform_v1 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/google/apis/aiplatform_v1/classes.rb +2492 -9
- data/lib/google/apis/aiplatform_v1/gem_version.rb +3 -3
- data/lib/google/apis/aiplatform_v1/representations.rb +4550 -3517
- data/lib/google/apis/aiplatform_v1/service.rb +817 -83
- metadata +6 -6
@@ -647,6 +647,12 @@ module Google
|
|
647
647
|
# @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceCandidate>]
|
648
648
|
attr_accessor :candidates
|
649
649
|
|
650
|
+
# Debug information containing message metadata. Clients should not consume this
|
651
|
+
# field, and this is only populated for Flow Runner path.
|
652
|
+
# Corresponds to the JSON property `debugMetadata`
|
653
|
+
# @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceMessageMetadata]
|
654
|
+
attr_accessor :debug_metadata
|
655
|
+
|
650
656
|
# Content filter results for a prompt sent in the request.
|
651
657
|
# Corresponds to the JSON property `promptFeedback`
|
652
658
|
# @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServicePromptFeedback]
|
@@ -669,12 +675,46 @@ module Google
|
|
669
675
|
# Update properties of this object
|
670
676
|
def update!(**args)
|
671
677
|
@candidates = args[:candidates] if args.key?(:candidates)
|
678
|
+
@debug_metadata = args[:debug_metadata] if args.key?(:debug_metadata)
|
672
679
|
@prompt_feedback = args[:prompt_feedback] if args.key?(:prompt_feedback)
|
673
680
|
@reporting_metrics = args[:reporting_metrics] if args.key?(:reporting_metrics)
|
674
681
|
@usage_metadata = args[:usage_metadata] if args.key?(:usage_metadata)
|
675
682
|
end
|
676
683
|
end
|
677
684
|
|
685
|
+
#
|
686
|
+
class CloudAiNlLlmProtoServiceMessageMetadata
|
687
|
+
include Google::Apis::Core::Hashable
|
688
|
+
|
689
|
+
# LINT.IfChange This metadata contains additional information required for
|
690
|
+
# debugging.
|
691
|
+
# Corresponds to the JSON property `inputFilterInfo`
|
692
|
+
# @return [Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata]
|
693
|
+
attr_accessor :input_filter_info
|
694
|
+
|
695
|
+
# Holds the final routing decision, by storing the model_config_id. And
|
696
|
+
# individual scores each model got.
|
697
|
+
# Corresponds to the JSON property `modelRoutingDecision`
|
698
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecision]
|
699
|
+
attr_accessor :model_routing_decision
|
700
|
+
|
701
|
+
# Filter metadata of the output messages.
|
702
|
+
# Corresponds to the JSON property `outputFilterInfo`
|
703
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata>]
|
704
|
+
attr_accessor :output_filter_info
|
705
|
+
|
706
|
+
def initialize(**args)
|
707
|
+
update!(**args)
|
708
|
+
end
|
709
|
+
|
710
|
+
# Update properties of this object
|
711
|
+
def update!(**args)
|
712
|
+
@input_filter_info = args[:input_filter_info] if args.key?(:input_filter_info)
|
713
|
+
@model_routing_decision = args[:model_routing_decision] if args.key?(:model_routing_decision)
|
714
|
+
@output_filter_info = args[:output_filter_info] if args.key?(:output_filter_info)
|
715
|
+
end
|
716
|
+
end
|
717
|
+
|
678
718
|
# A single part of a message.
|
679
719
|
class CloudAiNlLlmProtoServicePart
|
680
720
|
include Google::Apis::Core::Hashable
|
@@ -837,6 +877,122 @@ module Google
|
|
837
877
|
end
|
838
878
|
end
|
839
879
|
|
880
|
+
# The RAI results for a given text.
|
881
|
+
class CloudAiNlLlmProtoServiceRaiResult
|
882
|
+
include Google::Apis::Core::Hashable
|
883
|
+
|
884
|
+
# The recitation result for one input
|
885
|
+
# Corresponds to the JSON property `aidaRecitationResult`
|
886
|
+
# @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoRecitationResult]
|
887
|
+
attr_accessor :aida_recitation_result
|
888
|
+
|
889
|
+
# Use `triggered_blocklist`.
|
890
|
+
# Corresponds to the JSON property `blocked`
|
891
|
+
# @return [Boolean]
|
892
|
+
attr_accessor :blocked
|
893
|
+
alias_method :blocked?, :blocked
|
894
|
+
|
895
|
+
# The error codes indicate which RAI filters block the response.
|
896
|
+
# Corresponds to the JSON property `errorCodes`
|
897
|
+
# @return [Array<Fixnum>]
|
898
|
+
attr_accessor :error_codes
|
899
|
+
|
900
|
+
# Whether the text should be filtered and not shown to the end user. This is
|
901
|
+
# determined based on a combination of `triggered_recitation`, `
|
902
|
+
# triggered_blocklist`, `language_filter_result`, and `triggered_safety_filter`.
|
903
|
+
# Corresponds to the JSON property `filtered`
|
904
|
+
# @return [Boolean]
|
905
|
+
attr_accessor :filtered
|
906
|
+
alias_method :filtered?, :filtered
|
907
|
+
|
908
|
+
# Language filter result from SAFT LangId.
|
909
|
+
# Corresponds to the JSON property `languageFilterResult`
|
910
|
+
# @return [Google::Apis::AiplatformV1::LearningServingLlmLanguageFilterResult]
|
911
|
+
attr_accessor :language_filter_result
|
912
|
+
|
913
|
+
# The RAI signals for the text.
|
914
|
+
# Corresponds to the JSON property `raiSignals`
|
915
|
+
# @return [Array<Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal>]
|
916
|
+
attr_accessor :rai_signals
|
917
|
+
|
918
|
+
# Whether the text triggered the blocklist.
|
919
|
+
# Corresponds to the JSON property `triggeredBlocklist`
|
920
|
+
# @return [Boolean]
|
921
|
+
attr_accessor :triggered_blocklist
|
922
|
+
alias_method :triggered_blocklist?, :triggered_blocklist
|
923
|
+
|
924
|
+
# Whether the text should be blocked by the recitation result from Aida
|
925
|
+
# recitation checker. It is determined from aida_recitation_result.
|
926
|
+
# Corresponds to the JSON property `triggeredRecitation`
|
927
|
+
# @return [Boolean]
|
928
|
+
attr_accessor :triggered_recitation
|
929
|
+
alias_method :triggered_recitation?, :triggered_recitation
|
930
|
+
|
931
|
+
# Whether the text triggered the safety filter. Currently, this is due to CSAI
|
932
|
+
# triggering or one of four categories (derogatory, sexual, toxic, violent)
|
933
|
+
# having a score over the filter threshold.
|
934
|
+
# Corresponds to the JSON property `triggeredSafetyFilter`
|
935
|
+
# @return [Boolean]
|
936
|
+
attr_accessor :triggered_safety_filter
|
937
|
+
alias_method :triggered_safety_filter?, :triggered_safety_filter
|
938
|
+
|
939
|
+
def initialize(**args)
|
940
|
+
update!(**args)
|
941
|
+
end
|
942
|
+
|
943
|
+
# Update properties of this object
|
944
|
+
def update!(**args)
|
945
|
+
@aida_recitation_result = args[:aida_recitation_result] if args.key?(:aida_recitation_result)
|
946
|
+
@blocked = args[:blocked] if args.key?(:blocked)
|
947
|
+
@error_codes = args[:error_codes] if args.key?(:error_codes)
|
948
|
+
@filtered = args[:filtered] if args.key?(:filtered)
|
949
|
+
@language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
|
950
|
+
@rai_signals = args[:rai_signals] if args.key?(:rai_signals)
|
951
|
+
@triggered_blocklist = args[:triggered_blocklist] if args.key?(:triggered_blocklist)
|
952
|
+
@triggered_recitation = args[:triggered_recitation] if args.key?(:triggered_recitation)
|
953
|
+
@triggered_safety_filter = args[:triggered_safety_filter] if args.key?(:triggered_safety_filter)
|
954
|
+
end
|
955
|
+
end
|
956
|
+
|
957
|
+
# An RAI signal for a single category.
|
958
|
+
class CloudAiNlLlmProtoServiceRaiSignal
|
959
|
+
include Google::Apis::Core::Hashable
|
960
|
+
|
961
|
+
# The confidence level for the RAI category.
|
962
|
+
# Corresponds to the JSON property `confidence`
|
963
|
+
# @return [String]
|
964
|
+
attr_accessor :confidence
|
965
|
+
|
966
|
+
# Whether the category is flagged as being present. Currently, this is set to
|
967
|
+
# true if score >= 0.5.
|
968
|
+
# Corresponds to the JSON property `flagged`
|
969
|
+
# @return [Boolean]
|
970
|
+
attr_accessor :flagged
|
971
|
+
alias_method :flagged?, :flagged
|
972
|
+
|
973
|
+
# The RAI category.
|
974
|
+
# Corresponds to the JSON property `raiCategory`
|
975
|
+
# @return [String]
|
976
|
+
attr_accessor :rai_category
|
977
|
+
|
978
|
+
# The score for the category, in the range [0.0, 1.0].
|
979
|
+
# Corresponds to the JSON property `score`
|
980
|
+
# @return [Float]
|
981
|
+
attr_accessor :score
|
982
|
+
|
983
|
+
def initialize(**args)
|
984
|
+
update!(**args)
|
985
|
+
end
|
986
|
+
|
987
|
+
# Update properties of this object
|
988
|
+
def update!(**args)
|
989
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
990
|
+
@flagged = args[:flagged] if args.key?(:flagged)
|
991
|
+
@rai_category = args[:rai_category] if args.key?(:rai_category)
|
992
|
+
@score = args[:score] if args.key?(:score)
|
993
|
+
end
|
994
|
+
end
|
995
|
+
|
840
996
|
# Safety rating corresponding to the generated content.
|
841
997
|
class CloudAiNlLlmProtoServiceSafetyRating
|
842
998
|
include Google::Apis::Core::Hashable
|
@@ -9141,12 +9297,6 @@ module Google
|
|
9141
9297
|
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>]
|
9142
9298
|
attr_accessor :contents
|
9143
9299
|
|
9144
|
-
# Required. The name of the Endpoint requested to serve the prediction. Format: `
|
9145
|
-
# projects/`project`/locations/`location`/endpoints/`endpoint``
|
9146
|
-
# Corresponds to the JSON property `endpoint`
|
9147
|
-
# @return [String]
|
9148
|
-
attr_accessor :endpoint
|
9149
|
-
|
9150
9300
|
# Generation config.
|
9151
9301
|
# Corresponds to the JSON property `generationConfig`
|
9152
9302
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig]
|
@@ -9173,7 +9323,6 @@ module Google
|
|
9173
9323
|
# Update properties of this object
|
9174
9324
|
def update!(**args)
|
9175
9325
|
@contents = args[:contents] if args.key?(:contents)
|
9176
|
-
@endpoint = args[:endpoint] if args.key?(:endpoint)
|
9177
9326
|
@generation_config = args[:generation_config] if args.key?(:generation_config)
|
9178
9327
|
@safety_settings = args[:safety_settings] if args.key?(:safety_settings)
|
9179
9328
|
@tools = args[:tools] if args.key?(:tools)
|
@@ -16334,6 +16483,11 @@ module Google
|
|
16334
16483
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences]
|
16335
16484
|
attr_accessor :open_fine_tuning_pipeline
|
16336
16485
|
|
16486
|
+
# Open fine tuning pipelines.
|
16487
|
+
# Corresponds to the JSON property `openFineTuningPipelines`
|
16488
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines]
|
16489
|
+
attr_accessor :open_fine_tuning_pipelines
|
16490
|
+
|
16337
16491
|
# The regional resource name or the URI. Key is region, e.g., us-central1,
|
16338
16492
|
# europe-west2, global, etc..
|
16339
16493
|
# Corresponds to the JSON property `openGenerationAiStudio`
|
@@ -16352,6 +16506,11 @@ module Google
|
|
16352
16506
|
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences]
|
16353
16507
|
attr_accessor :open_notebook
|
16354
16508
|
|
16509
|
+
# Open notebooks.
|
16510
|
+
# Corresponds to the JSON property `openNotebooks`
|
16511
|
+
# @return [Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks]
|
16512
|
+
attr_accessor :open_notebooks
|
16513
|
+
|
16355
16514
|
# The regional resource name or the URI. Key is region, e.g., us-central1,
|
16356
16515
|
# europe-west2, global, etc..
|
16357
16516
|
# Corresponds to the JSON property `openPromptTuningPipeline`
|
@@ -16379,9 +16538,11 @@ module Google
|
|
16379
16538
|
@deploy = args[:deploy] if args.key?(:deploy)
|
16380
16539
|
@open_evaluation_pipeline = args[:open_evaluation_pipeline] if args.key?(:open_evaluation_pipeline)
|
16381
16540
|
@open_fine_tuning_pipeline = args[:open_fine_tuning_pipeline] if args.key?(:open_fine_tuning_pipeline)
|
16541
|
+
@open_fine_tuning_pipelines = args[:open_fine_tuning_pipelines] if args.key?(:open_fine_tuning_pipelines)
|
16382
16542
|
@open_generation_ai_studio = args[:open_generation_ai_studio] if args.key?(:open_generation_ai_studio)
|
16383
16543
|
@open_genie = args[:open_genie] if args.key?(:open_genie)
|
16384
16544
|
@open_notebook = args[:open_notebook] if args.key?(:open_notebook)
|
16545
|
+
@open_notebooks = args[:open_notebooks] if args.key?(:open_notebooks)
|
16385
16546
|
@open_prompt_tuning_pipeline = args[:open_prompt_tuning_pipeline] if args.key?(:open_prompt_tuning_pipeline)
|
16386
16547
|
@request_access = args[:request_access] if args.key?(:request_access)
|
16387
16548
|
@view_rest_api = args[:view_rest_api] if args.key?(:view_rest_api)
|
@@ -16465,6 +16626,44 @@ module Google
|
|
16465
16626
|
end
|
16466
16627
|
end
|
16467
16628
|
|
16629
|
+
# Open fine tuning pipelines.
|
16630
|
+
class GoogleCloudAiplatformV1PublisherModelCallToActionOpenFineTuningPipelines
|
16631
|
+
include Google::Apis::Core::Hashable
|
16632
|
+
|
16633
|
+
# Required. Regional resource references to fine tuning pipelines.
|
16634
|
+
# Corresponds to the JSON property `fineTuningPipelines`
|
16635
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences>]
|
16636
|
+
attr_accessor :fine_tuning_pipelines
|
16637
|
+
|
16638
|
+
def initialize(**args)
|
16639
|
+
update!(**args)
|
16640
|
+
end
|
16641
|
+
|
16642
|
+
# Update properties of this object
|
16643
|
+
def update!(**args)
|
16644
|
+
@fine_tuning_pipelines = args[:fine_tuning_pipelines] if args.key?(:fine_tuning_pipelines)
|
16645
|
+
end
|
16646
|
+
end
|
16647
|
+
|
16648
|
+
# Open notebooks.
|
16649
|
+
class GoogleCloudAiplatformV1PublisherModelCallToActionOpenNotebooks
|
16650
|
+
include Google::Apis::Core::Hashable
|
16651
|
+
|
16652
|
+
# Required. Regional resource references to notebooks.
|
16653
|
+
# Corresponds to the JSON property `notebooks`
|
16654
|
+
# @return [Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences>]
|
16655
|
+
attr_accessor :notebooks
|
16656
|
+
|
16657
|
+
def initialize(**args)
|
16658
|
+
update!(**args)
|
16659
|
+
end
|
16660
|
+
|
16661
|
+
# Update properties of this object
|
16662
|
+
def update!(**args)
|
16663
|
+
@notebooks = args[:notebooks] if args.key?(:notebooks)
|
16664
|
+
end
|
16665
|
+
end
|
16666
|
+
|
16468
16667
|
# The regional resource name or the URI. Key is region, e.g., us-central1,
|
16469
16668
|
# europe-west2, global, etc..
|
16470
16669
|
class GoogleCloudAiplatformV1PublisherModelCallToActionRegionalResourceReferences
|
@@ -16475,7 +16674,22 @@ module Google
|
|
16475
16674
|
# @return [Hash<String,Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PublisherModelResourceReference>]
|
16476
16675
|
attr_accessor :references
|
16477
16676
|
|
16478
|
-
#
|
16677
|
+
# Optional. Description of the resource.
|
16678
|
+
# Corresponds to the JSON property `resourceDescription`
|
16679
|
+
# @return [String]
|
16680
|
+
attr_accessor :resource_description
|
16681
|
+
|
16682
|
+
# Optional. Title of the resource.
|
16683
|
+
# Corresponds to the JSON property `resourceTitle`
|
16684
|
+
# @return [String]
|
16685
|
+
attr_accessor :resource_title
|
16686
|
+
|
16687
|
+
# Optional. Use case (CUJ) of the resource.
|
16688
|
+
# Corresponds to the JSON property `resourceUseCase`
|
16689
|
+
# @return [String]
|
16690
|
+
attr_accessor :resource_use_case
|
16691
|
+
|
16692
|
+
# Required.
|
16479
16693
|
# Corresponds to the JSON property `title`
|
16480
16694
|
# @return [String]
|
16481
16695
|
attr_accessor :title
|
@@ -16487,6 +16701,9 @@ module Google
|
|
16487
16701
|
# Update properties of this object
|
16488
16702
|
def update!(**args)
|
16489
16703
|
@references = args[:references] if args.key?(:references)
|
16704
|
+
@resource_description = args[:resource_description] if args.key?(:resource_description)
|
16705
|
+
@resource_title = args[:resource_title] if args.key?(:resource_title)
|
16706
|
+
@resource_use_case = args[:resource_use_case] if args.key?(:resource_use_case)
|
16490
16707
|
@title = args[:title] if args.key?(:title)
|
16491
16708
|
end
|
16492
16709
|
end
|
@@ -19633,7 +19850,7 @@ module Google
|
|
19633
19850
|
attr_accessor :enterprise_datastore
|
19634
19851
|
|
19635
19852
|
# The grounding text passed inline with the Predict API. It can support up to 1
|
19636
|
-
# million
|
19853
|
+
# million bytes.
|
19637
19854
|
# Corresponds to the JSON property `inlineContext`
|
19638
19855
|
# @return [String]
|
19639
19856
|
attr_accessor :inline_context
|
@@ -28164,6 +28381,2272 @@ module Google
|
|
28164
28381
|
@metric_entries = args[:metric_entries] if args.key?(:metric_entries)
|
28165
28382
|
end
|
28166
28383
|
end
|
28384
|
+
|
28385
|
+
# The proto defines the attribution information for a document using whatever
|
28386
|
+
# fields are most applicable for that document's datasource. For example, a
|
28387
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
28388
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
28389
|
+
# id:28
|
28390
|
+
class LanguageLabsAidaTrustRecitationProtoDocAttribution
|
28391
|
+
include Google::Apis::Core::Hashable
|
28392
|
+
|
28393
|
+
#
|
28394
|
+
# Corresponds to the JSON property `amarnaId`
|
28395
|
+
# @return [String]
|
28396
|
+
attr_accessor :amarna_id
|
28397
|
+
|
28398
|
+
#
|
28399
|
+
# Corresponds to the JSON property `arxivId`
|
28400
|
+
# @return [String]
|
28401
|
+
attr_accessor :arxiv_id
|
28402
|
+
|
28403
|
+
#
|
28404
|
+
# Corresponds to the JSON property `author`
|
28405
|
+
# @return [String]
|
28406
|
+
attr_accessor :author
|
28407
|
+
|
28408
|
+
#
|
28409
|
+
# Corresponds to the JSON property `bibkey`
|
28410
|
+
# @return [String]
|
28411
|
+
attr_accessor :bibkey
|
28412
|
+
|
28413
|
+
#
|
28414
|
+
# Corresponds to the JSON property `bookTitle`
|
28415
|
+
# @return [String]
|
28416
|
+
attr_accessor :book_title
|
28417
|
+
|
28418
|
+
# The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
|
28419
|
+
# of a book. There is a deterministic function from a volume id to a URL under
|
28420
|
+
# the books.google.com domain. Marked as 'optional' since a volume ID of zero is
|
28421
|
+
# potentially possible and we want to distinguish that from the volume ID not
|
28422
|
+
# being set.
|
28423
|
+
# Corresponds to the JSON property `bookVolumeId`
|
28424
|
+
# @return [Fixnum]
|
28425
|
+
attr_accessor :book_volume_id
|
28426
|
+
|
28427
|
+
#
|
28428
|
+
# Corresponds to the JSON property `category`
|
28429
|
+
# @return [String]
|
28430
|
+
attr_accessor :category
|
28431
|
+
|
28432
|
+
#
|
28433
|
+
# Corresponds to the JSON property `conversationId`
|
28434
|
+
# @return [String]
|
28435
|
+
attr_accessor :conversation_id
|
28436
|
+
|
28437
|
+
# The dataset this document comes from.
|
28438
|
+
# Corresponds to the JSON property `dataset`
|
28439
|
+
# @return [String]
|
28440
|
+
attr_accessor :dataset
|
28441
|
+
|
28442
|
+
#
|
28443
|
+
# Corresponds to the JSON property `filepath`
|
28444
|
+
# @return [String]
|
28445
|
+
attr_accessor :filepath
|
28446
|
+
|
28447
|
+
#
|
28448
|
+
# Corresponds to the JSON property `geminiId`
|
28449
|
+
# @return [String]
|
28450
|
+
attr_accessor :gemini_id
|
28451
|
+
|
28452
|
+
#
|
28453
|
+
# Corresponds to the JSON property `gnewsArticleTitle`
|
28454
|
+
# @return [String]
|
28455
|
+
attr_accessor :gnews_article_title
|
28456
|
+
|
28457
|
+
#
|
28458
|
+
# Corresponds to the JSON property `goodallExampleId`
|
28459
|
+
# @return [String]
|
28460
|
+
attr_accessor :goodall_example_id
|
28461
|
+
|
28462
|
+
# Whether the document is opted out.
|
28463
|
+
# Corresponds to the JSON property `isOptOut`
|
28464
|
+
# @return [Boolean]
|
28465
|
+
attr_accessor :is_opt_out
|
28466
|
+
alias_method :is_opt_out?, :is_opt_out
|
28467
|
+
|
28468
|
+
#
|
28469
|
+
# Corresponds to the JSON property `isPrompt`
|
28470
|
+
# @return [Boolean]
|
28471
|
+
attr_accessor :is_prompt
|
28472
|
+
alias_method :is_prompt?, :is_prompt
|
28473
|
+
|
28474
|
+
#
|
28475
|
+
# Corresponds to the JSON property `lamdaExampleId`
|
28476
|
+
# @return [String]
|
28477
|
+
attr_accessor :lamda_example_id
|
28478
|
+
|
28479
|
+
#
|
28480
|
+
# Corresponds to the JSON property `license`
|
28481
|
+
# @return [String]
|
28482
|
+
attr_accessor :license
|
28483
|
+
|
28484
|
+
#
|
28485
|
+
# Corresponds to the JSON property `meenaConversationId`
|
28486
|
+
# @return [String]
|
28487
|
+
attr_accessor :meena_conversation_id
|
28488
|
+
|
28489
|
+
# Natural (not programming) language of the document. Language code as defined
|
28490
|
+
# by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
|
28491
|
+
# html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
|
28492
|
+
# & read language fields. See go/iii.
|
28493
|
+
# Corresponds to the JSON property `naturalLanguageCode`
|
28494
|
+
# @return [String]
|
28495
|
+
attr_accessor :natural_language_code
|
28496
|
+
|
28497
|
+
# True if this doc has no attribution information available. We use an explicit
|
28498
|
+
# field for this instead of just implicitly leaving all the DocAttribution
|
28499
|
+
# fields blank to distinguish a case where a bug/oversight has left the
|
28500
|
+
# attribution information empty vs when we really have no attribution
|
28501
|
+
# information available.
|
28502
|
+
# Corresponds to the JSON property `noAttribution`
|
28503
|
+
# @return [Boolean]
|
28504
|
+
attr_accessor :no_attribution
|
28505
|
+
alias_method :no_attribution?, :no_attribution
|
28506
|
+
|
28507
|
+
#
|
28508
|
+
# Corresponds to the JSON property `podcastUtteranceId`
|
28509
|
+
# @return [String]
|
28510
|
+
attr_accessor :podcast_utterance_id
|
28511
|
+
|
28512
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
28513
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
28514
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
28515
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
28516
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
28517
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
28518
|
+
# example, a credit card expiration date). Related types: * google.type.
|
28519
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
28520
|
+
# Corresponds to the JSON property `publicationDate`
|
28521
|
+
# @return [Google::Apis::AiplatformV1::GoogleTypeDate]
|
28522
|
+
attr_accessor :publication_date
|
28523
|
+
|
28524
|
+
# This field is for opt-out experiment only, MUST never be used during actual
|
28525
|
+
# production/serving.
|
28526
|
+
# Corresponds to the JSON property `qualityScoreExperimentOnly`
|
28527
|
+
# @return [Float]
|
28528
|
+
attr_accessor :quality_score_experiment_only
|
28529
|
+
|
28530
|
+
# Github repository
|
28531
|
+
# Corresponds to the JSON property `repo`
|
28532
|
+
# @return [String]
|
28533
|
+
attr_accessor :repo
|
28534
|
+
|
28535
|
+
# URL of a webdoc
|
28536
|
+
# Corresponds to the JSON property `url`
|
28537
|
+
# @return [String]
|
28538
|
+
attr_accessor :url
|
28539
|
+
|
28540
|
+
#
|
28541
|
+
# Corresponds to the JSON property `volumeId`
|
28542
|
+
# @return [String]
|
28543
|
+
attr_accessor :volume_id
|
28544
|
+
|
28545
|
+
# Wikipedia article title. The Wikipedia TFDS dataset includes article titles
|
28546
|
+
# but not URLs. While a URL is to the best of our knowledge a deterministic
|
28547
|
+
# function of the title, we store the original title to reflect the information
|
28548
|
+
# in the original dataset.
|
28549
|
+
# Corresponds to the JSON property `wikipediaArticleTitle`
|
28550
|
+
# @return [String]
|
28551
|
+
attr_accessor :wikipedia_article_title
|
28552
|
+
|
28553
|
+
def initialize(**args)
|
28554
|
+
update!(**args)
|
28555
|
+
end
|
28556
|
+
|
28557
|
+
# Update properties of this object
|
28558
|
+
def update!(**args)
|
28559
|
+
@amarna_id = args[:amarna_id] if args.key?(:amarna_id)
|
28560
|
+
@arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
|
28561
|
+
@author = args[:author] if args.key?(:author)
|
28562
|
+
@bibkey = args[:bibkey] if args.key?(:bibkey)
|
28563
|
+
@book_title = args[:book_title] if args.key?(:book_title)
|
28564
|
+
@book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
|
28565
|
+
@category = args[:category] if args.key?(:category)
|
28566
|
+
@conversation_id = args[:conversation_id] if args.key?(:conversation_id)
|
28567
|
+
@dataset = args[:dataset] if args.key?(:dataset)
|
28568
|
+
@filepath = args[:filepath] if args.key?(:filepath)
|
28569
|
+
@gemini_id = args[:gemini_id] if args.key?(:gemini_id)
|
28570
|
+
@gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
|
28571
|
+
@goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
|
28572
|
+
@is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
|
28573
|
+
@is_prompt = args[:is_prompt] if args.key?(:is_prompt)
|
28574
|
+
@lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
|
28575
|
+
@license = args[:license] if args.key?(:license)
|
28576
|
+
@meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
|
28577
|
+
@natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
|
28578
|
+
@no_attribution = args[:no_attribution] if args.key?(:no_attribution)
|
28579
|
+
@podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
|
28580
|
+
@publication_date = args[:publication_date] if args.key?(:publication_date)
|
28581
|
+
@quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
|
28582
|
+
@repo = args[:repo] if args.key?(:repo)
|
28583
|
+
@url = args[:url] if args.key?(:url)
|
28584
|
+
@volume_id = args[:volume_id] if args.key?(:volume_id)
|
28585
|
+
@wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
|
28586
|
+
end
|
28587
|
+
end
|
28588
|
+
|
28589
|
+
# The recitation result for one input
|
28590
|
+
class LanguageLabsAidaTrustRecitationProtoRecitationResult
|
28591
|
+
include Google::Apis::Core::Hashable
|
28592
|
+
|
28593
|
+
#
|
28594
|
+
# Corresponds to the JSON property `dynamicSegmentResults`
|
28595
|
+
# @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
28596
|
+
attr_accessor :dynamic_segment_results
|
28597
|
+
|
28598
|
+
# The recitation action for one given input. When its segments contain different
|
28599
|
+
# actions, the overall action will be returned in the precedence of BLOCK > CITE
|
28600
|
+
# > NO_ACTION.
|
28601
|
+
# Corresponds to the JSON property `recitationAction`
|
28602
|
+
# @return [String]
|
28603
|
+
attr_accessor :recitation_action
|
28604
|
+
|
28605
|
+
#
|
28606
|
+
# Corresponds to the JSON property `trainingSegmentResults`
|
28607
|
+
# @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
28608
|
+
attr_accessor :training_segment_results
|
28609
|
+
|
28610
|
+
def initialize(**args)
|
28611
|
+
update!(**args)
|
28612
|
+
end
|
28613
|
+
|
28614
|
+
# Update properties of this object
|
28615
|
+
def update!(**args)
|
28616
|
+
@dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
|
28617
|
+
@recitation_action = args[:recitation_action] if args.key?(:recitation_action)
|
28618
|
+
@training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
|
28619
|
+
end
|
28620
|
+
end
|
28621
|
+
|
28622
|
+
# The recitation result for each segment in a given input.
|
28623
|
+
class LanguageLabsAidaTrustRecitationProtoSegmentResult
|
28624
|
+
include Google::Apis::Core::Hashable
|
28625
|
+
|
28626
|
+
# The dataset the segment came from.
|
28627
|
+
# Corresponds to the JSON property `attributionDataset`
|
28628
|
+
# @return [String]
|
28629
|
+
attr_accessor :attribution_dataset
|
28630
|
+
|
28631
|
+
# human-friendly string that contains information from doc_attribution which
|
28632
|
+
# could be shown by clients
|
28633
|
+
# Corresponds to the JSON property `displayAttributionMessage`
|
28634
|
+
# @return [String]
|
28635
|
+
attr_accessor :display_attribution_message
|
28636
|
+
|
28637
|
+
# The proto defines the attribution information for a document using whatever
|
28638
|
+
# fields are most applicable for that document's datasource. For example, a
|
28639
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
28640
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
28641
|
+
# id:28
|
28642
|
+
# Corresponds to the JSON property `docAttribution`
|
28643
|
+
# @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoDocAttribution]
|
28644
|
+
attr_accessor :doc_attribution
|
28645
|
+
|
28646
|
+
# number of documents that contained this segment
|
28647
|
+
# Corresponds to the JSON property `docOccurrences`
|
28648
|
+
# @return [Fixnum]
|
28649
|
+
attr_accessor :doc_occurrences
|
28650
|
+
|
28651
|
+
#
|
28652
|
+
# Corresponds to the JSON property `endIndex`
|
28653
|
+
# @return [Fixnum]
|
28654
|
+
attr_accessor :end_index
|
28655
|
+
|
28656
|
+
# The raw text in the given input that is corresponding to the segment. It will
|
28657
|
+
# be available only when 'return_segment_raw_text' is enabled in the request
|
28658
|
+
# options.
|
28659
|
+
# Corresponds to the JSON property `rawText`
|
28660
|
+
# @return [String]
|
28661
|
+
attr_accessor :raw_text
|
28662
|
+
|
28663
|
+
#
|
28664
|
+
# Corresponds to the JSON property `segmentRecitationAction`
|
28665
|
+
# @return [String]
|
28666
|
+
attr_accessor :segment_recitation_action
|
28667
|
+
|
28668
|
+
# The segment boundary start (inclusive) and end index (exclusive) in the given
|
28669
|
+
# text. In the streaming RPC, the indexes always start from the beginning of the
|
28670
|
+
# first text in the entire stream. The indexes are measured in UTF-16 code units.
|
28671
|
+
# Corresponds to the JSON property `startIndex`
|
28672
|
+
# @return [Fixnum]
|
28673
|
+
attr_accessor :start_index
|
28674
|
+
|
28675
|
+
def initialize(**args)
|
28676
|
+
update!(**args)
|
28677
|
+
end
|
28678
|
+
|
28679
|
+
# Update properties of this object
|
28680
|
+
def update!(**args)
|
28681
|
+
@attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
|
28682
|
+
@display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
|
28683
|
+
@doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
|
28684
|
+
@doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
|
28685
|
+
@end_index = args[:end_index] if args.key?(:end_index)
|
28686
|
+
@raw_text = args[:raw_text] if args.key?(:raw_text)
|
28687
|
+
@segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
|
28688
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
28689
|
+
end
|
28690
|
+
end
|
28691
|
+
|
28692
|
+
# The recitation result for one stream input
|
28693
|
+
class LanguageLabsAidaTrustRecitationProtoStreamRecitationResult
|
28694
|
+
include Google::Apis::Core::Hashable
|
28695
|
+
|
28696
|
+
# The recitation result against the given dynamic data source.
|
28697
|
+
# Corresponds to the JSON property `dynamicSegmentResults`
|
28698
|
+
# @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
28699
|
+
attr_accessor :dynamic_segment_results
|
28700
|
+
|
28701
|
+
# Last index of input text fully checked for recitation in the entire streaming
|
28702
|
+
# context. Would return `-1` if no Input was checked for recitation.
|
28703
|
+
# Corresponds to the JSON property `fullyCheckedTextIndex`
|
28704
|
+
# @return [Fixnum]
|
28705
|
+
attr_accessor :fully_checked_text_index
|
28706
|
+
|
28707
|
+
# The recitation action for one given input. When its segments contain different
|
28708
|
+
# actions, the overall action will be returned in the precedence of BLOCK > CITE
|
28709
|
+
# > NO_ACTION.
|
28710
|
+
# Corresponds to the JSON property `recitationAction`
|
28711
|
+
# @return [String]
|
28712
|
+
attr_accessor :recitation_action
|
28713
|
+
|
28714
|
+
# The recitation result against model training data.
|
28715
|
+
# Corresponds to the JSON property `trainingSegmentResults`
|
28716
|
+
# @return [Array<Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoSegmentResult>]
|
28717
|
+
attr_accessor :training_segment_results
|
28718
|
+
|
28719
|
+
def initialize(**args)
|
28720
|
+
update!(**args)
|
28721
|
+
end
|
28722
|
+
|
28723
|
+
# Update properties of this object
|
28724
|
+
def update!(**args)
|
28725
|
+
@dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
|
28726
|
+
@fully_checked_text_index = args[:fully_checked_text_index] if args.key?(:fully_checked_text_index)
|
28727
|
+
@recitation_action = args[:recitation_action] if args.key?(:recitation_action)
|
28728
|
+
@training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
|
28729
|
+
end
|
28730
|
+
end
|
28731
|
+
|
28732
|
+
# The proto defines the attribution information for a document using whatever
|
28733
|
+
# fields are most applicable for that document's datasource. For example, a
|
28734
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
28735
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
28736
|
+
# id: 28
|
28737
|
+
class LearningGenaiRecitationDocAttribution
|
28738
|
+
include Google::Apis::Core::Hashable
|
28739
|
+
|
28740
|
+
#
|
28741
|
+
# Corresponds to the JSON property `amarnaId`
|
28742
|
+
# @return [String]
|
28743
|
+
attr_accessor :amarna_id
|
28744
|
+
|
28745
|
+
#
|
28746
|
+
# Corresponds to the JSON property `arxivId`
|
28747
|
+
# @return [String]
|
28748
|
+
attr_accessor :arxiv_id
|
28749
|
+
|
28750
|
+
#
|
28751
|
+
# Corresponds to the JSON property `author`
|
28752
|
+
# @return [String]
|
28753
|
+
attr_accessor :author
|
28754
|
+
|
28755
|
+
#
|
28756
|
+
# Corresponds to the JSON property `bibkey`
|
28757
|
+
# @return [String]
|
28758
|
+
attr_accessor :bibkey
|
28759
|
+
|
28760
|
+
#
|
28761
|
+
# Corresponds to the JSON property `bookTitle`
|
28762
|
+
# @return [String]
|
28763
|
+
attr_accessor :book_title
|
28764
|
+
|
28765
|
+
# The Oceanographers full-view books dataset uses a 'volume id' as the unique ID
|
28766
|
+
# of a book. There is a deterministic function from a volume id to a URL under
|
28767
|
+
# the books.google.com domain. Marked as 'optional' since a volume ID of zero is
|
28768
|
+
# potentially possible and we want to distinguish that from the volume ID not
|
28769
|
+
# being set.
|
28770
|
+
# Corresponds to the JSON property `bookVolumeId`
|
28771
|
+
# @return [Fixnum]
|
28772
|
+
attr_accessor :book_volume_id
|
28773
|
+
|
28774
|
+
#
|
28775
|
+
# Corresponds to the JSON property `conversationId`
|
28776
|
+
# @return [String]
|
28777
|
+
attr_accessor :conversation_id
|
28778
|
+
|
28779
|
+
# The dataset this document comes from.
|
28780
|
+
# Corresponds to the JSON property `dataset`
|
28781
|
+
# @return [String]
|
28782
|
+
attr_accessor :dataset
|
28783
|
+
|
28784
|
+
#
|
28785
|
+
# Corresponds to the JSON property `filepath`
|
28786
|
+
# @return [String]
|
28787
|
+
attr_accessor :filepath
|
28788
|
+
|
28789
|
+
#
|
28790
|
+
# Corresponds to the JSON property `geminiId`
|
28791
|
+
# @return [String]
|
28792
|
+
attr_accessor :gemini_id
|
28793
|
+
|
28794
|
+
#
|
28795
|
+
# Corresponds to the JSON property `gnewsArticleTitle`
|
28796
|
+
# @return [String]
|
28797
|
+
attr_accessor :gnews_article_title
|
28798
|
+
|
28799
|
+
#
|
28800
|
+
# Corresponds to the JSON property `goodallExampleId`
|
28801
|
+
# @return [String]
|
28802
|
+
attr_accessor :goodall_example_id
|
28803
|
+
|
28804
|
+
# Whether the document is opted out.
|
28805
|
+
# Corresponds to the JSON property `isOptOut`
|
28806
|
+
# @return [Boolean]
|
28807
|
+
attr_accessor :is_opt_out
|
28808
|
+
alias_method :is_opt_out?, :is_opt_out
|
28809
|
+
|
28810
|
+
# When true, this attribution came from the user's prompt.
|
28811
|
+
# Corresponds to the JSON property `isPrompt`
|
28812
|
+
# @return [Boolean]
|
28813
|
+
attr_accessor :is_prompt
|
28814
|
+
alias_method :is_prompt?, :is_prompt
|
28815
|
+
|
28816
|
+
#
|
28817
|
+
# Corresponds to the JSON property `lamdaExampleId`
|
28818
|
+
# @return [String]
|
28819
|
+
attr_accessor :lamda_example_id
|
28820
|
+
|
28821
|
+
#
|
28822
|
+
# Corresponds to the JSON property `license`
|
28823
|
+
# @return [String]
|
28824
|
+
attr_accessor :license
|
28825
|
+
|
28826
|
+
#
|
28827
|
+
# Corresponds to the JSON property `meenaConversationId`
|
28828
|
+
# @return [String]
|
28829
|
+
attr_accessor :meena_conversation_id
|
28830
|
+
|
28831
|
+
# Natural (not programming) language of the document. Language code as defined
|
28832
|
+
# by http://www.unicode.org/reports/tr35/#Identifiers and https://tools.ietf.org/
|
28833
|
+
# html/bcp47. Currently applicable to full-view books. Use docinfo-util.h to set
|
28834
|
+
# & read language fields. See go/iii.
|
28835
|
+
# Corresponds to the JSON property `naturalLanguageCode`
|
28836
|
+
# @return [String]
|
28837
|
+
attr_accessor :natural_language_code
|
28838
|
+
|
28839
|
+
# True if this doc has no attribution information available. We use an explicit
|
28840
|
+
# field for this instead of just implicitly leaving all the DocAttribution
|
28841
|
+
# fields blank to distinguish a case where a bug/oversight has left the
|
28842
|
+
# attribution information empty vs when we really have no attribution
|
28843
|
+
# information available.
|
28844
|
+
# Corresponds to the JSON property `noAttribution`
|
28845
|
+
# @return [Boolean]
|
28846
|
+
attr_accessor :no_attribution
|
28847
|
+
alias_method :no_attribution?, :no_attribution
|
28848
|
+
|
28849
|
+
#
|
28850
|
+
# Corresponds to the JSON property `podcastUtteranceId`
|
28851
|
+
# @return [String]
|
28852
|
+
attr_accessor :podcast_utterance_id
|
28853
|
+
|
28854
|
+
# Represents a whole or partial calendar date, such as a birthday. The time of
|
28855
|
+
# day and time zone are either specified elsewhere or are insignificant. The
|
28856
|
+
# date is relative to the Gregorian Calendar. This can represent one of the
|
28857
|
+
# following: * A full date, with non-zero year, month, and day values. * A month
|
28858
|
+
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
28859
|
+
# with a zero month and a zero day. * A year and month, with a zero day (for
|
28860
|
+
# example, a credit card expiration date). Related types: * google.type.
|
28861
|
+
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
28862
|
+
# Corresponds to the JSON property `publicationDate`
|
28863
|
+
# @return [Google::Apis::AiplatformV1::GoogleTypeDate]
|
28864
|
+
attr_accessor :publication_date
|
28865
|
+
|
28866
|
+
# This field is for opt-out experiment only, MUST never be used during actual
|
28867
|
+
# production/serving.
|
28868
|
+
# Corresponds to the JSON property `qualityScoreExperimentOnly`
|
28869
|
+
# @return [Float]
|
28870
|
+
attr_accessor :quality_score_experiment_only
|
28871
|
+
|
28872
|
+
# Github repository
|
28873
|
+
# Corresponds to the JSON property `repo`
|
28874
|
+
# @return [String]
|
28875
|
+
attr_accessor :repo
|
28876
|
+
|
28877
|
+
# URL of a webdoc
|
28878
|
+
# Corresponds to the JSON property `url`
|
28879
|
+
# @return [String]
|
28880
|
+
attr_accessor :url
|
28881
|
+
|
28882
|
+
#
|
28883
|
+
# Corresponds to the JSON property `volumeId`
|
28884
|
+
# @return [String]
|
28885
|
+
attr_accessor :volume_id
|
28886
|
+
|
28887
|
+
# Wikipedia article title. The Wikipedia TFDS dataset includes article titles
|
28888
|
+
# but not URLs. While a URL is to the best of our knowledge a deterministic
|
28889
|
+
# function of the title, we store the original title to reflect the information
|
28890
|
+
# in the original dataset.
|
28891
|
+
# Corresponds to the JSON property `wikipediaArticleTitle`
|
28892
|
+
# @return [String]
|
28893
|
+
attr_accessor :wikipedia_article_title
|
28894
|
+
|
28895
|
+
def initialize(**args)
|
28896
|
+
update!(**args)
|
28897
|
+
end
|
28898
|
+
|
28899
|
+
# Update properties of this object
|
28900
|
+
def update!(**args)
|
28901
|
+
@amarna_id = args[:amarna_id] if args.key?(:amarna_id)
|
28902
|
+
@arxiv_id = args[:arxiv_id] if args.key?(:arxiv_id)
|
28903
|
+
@author = args[:author] if args.key?(:author)
|
28904
|
+
@bibkey = args[:bibkey] if args.key?(:bibkey)
|
28905
|
+
@book_title = args[:book_title] if args.key?(:book_title)
|
28906
|
+
@book_volume_id = args[:book_volume_id] if args.key?(:book_volume_id)
|
28907
|
+
@conversation_id = args[:conversation_id] if args.key?(:conversation_id)
|
28908
|
+
@dataset = args[:dataset] if args.key?(:dataset)
|
28909
|
+
@filepath = args[:filepath] if args.key?(:filepath)
|
28910
|
+
@gemini_id = args[:gemini_id] if args.key?(:gemini_id)
|
28911
|
+
@gnews_article_title = args[:gnews_article_title] if args.key?(:gnews_article_title)
|
28912
|
+
@goodall_example_id = args[:goodall_example_id] if args.key?(:goodall_example_id)
|
28913
|
+
@is_opt_out = args[:is_opt_out] if args.key?(:is_opt_out)
|
28914
|
+
@is_prompt = args[:is_prompt] if args.key?(:is_prompt)
|
28915
|
+
@lamda_example_id = args[:lamda_example_id] if args.key?(:lamda_example_id)
|
28916
|
+
@license = args[:license] if args.key?(:license)
|
28917
|
+
@meena_conversation_id = args[:meena_conversation_id] if args.key?(:meena_conversation_id)
|
28918
|
+
@natural_language_code = args[:natural_language_code] if args.key?(:natural_language_code)
|
28919
|
+
@no_attribution = args[:no_attribution] if args.key?(:no_attribution)
|
28920
|
+
@podcast_utterance_id = args[:podcast_utterance_id] if args.key?(:podcast_utterance_id)
|
28921
|
+
@publication_date = args[:publication_date] if args.key?(:publication_date)
|
28922
|
+
@quality_score_experiment_only = args[:quality_score_experiment_only] if args.key?(:quality_score_experiment_only)
|
28923
|
+
@repo = args[:repo] if args.key?(:repo)
|
28924
|
+
@url = args[:url] if args.key?(:url)
|
28925
|
+
@volume_id = args[:volume_id] if args.key?(:volume_id)
|
28926
|
+
@wikipedia_article_title = args[:wikipedia_article_title] if args.key?(:wikipedia_article_title)
|
28927
|
+
end
|
28928
|
+
end
|
28929
|
+
|
28930
|
+
# The recitation result for one input
|
28931
|
+
class LearningGenaiRecitationRecitationResult
|
28932
|
+
include Google::Apis::Core::Hashable
|
28933
|
+
|
28934
|
+
#
|
28935
|
+
# Corresponds to the JSON property `dynamicSegmentResults`
|
28936
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRecitationSegmentResult>]
|
28937
|
+
attr_accessor :dynamic_segment_results
|
28938
|
+
|
28939
|
+
# The recitation action for one given input. When its segments contain different
|
28940
|
+
# actions, the overall action will be returned in the precedence of BLOCK > CITE
|
28941
|
+
# > NO_ACTION.
|
28942
|
+
# Corresponds to the JSON property `recitationAction`
|
28943
|
+
# @return [String]
|
28944
|
+
attr_accessor :recitation_action
|
28945
|
+
|
28946
|
+
#
|
28947
|
+
# Corresponds to the JSON property `trainingSegmentResults`
|
28948
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRecitationSegmentResult>]
|
28949
|
+
attr_accessor :training_segment_results
|
28950
|
+
|
28951
|
+
def initialize(**args)
|
28952
|
+
update!(**args)
|
28953
|
+
end
|
28954
|
+
|
28955
|
+
# Update properties of this object
|
28956
|
+
def update!(**args)
|
28957
|
+
@dynamic_segment_results = args[:dynamic_segment_results] if args.key?(:dynamic_segment_results)
|
28958
|
+
@recitation_action = args[:recitation_action] if args.key?(:recitation_action)
|
28959
|
+
@training_segment_results = args[:training_segment_results] if args.key?(:training_segment_results)
|
28960
|
+
end
|
28961
|
+
end
|
28962
|
+
|
28963
|
+
# The recitation result for each segment in a given input.
|
28964
|
+
class LearningGenaiRecitationSegmentResult
|
28965
|
+
include Google::Apis::Core::Hashable
|
28966
|
+
|
28967
|
+
# The dataset the segment came from.
|
28968
|
+
# Corresponds to the JSON property `attributionDataset`
|
28969
|
+
# @return [String]
|
28970
|
+
attr_accessor :attribution_dataset
|
28971
|
+
|
28972
|
+
# human-friendly string that contains information from doc_attribution which
|
28973
|
+
# could be shown by clients
|
28974
|
+
# Corresponds to the JSON property `displayAttributionMessage`
|
28975
|
+
# @return [String]
|
28976
|
+
attr_accessor :display_attribution_message
|
28977
|
+
|
28978
|
+
# The proto defines the attribution information for a document using whatever
|
28979
|
+
# fields are most applicable for that document's datasource. For example, a
|
28980
|
+
# Wikipedia article's attribution is in the form of its article title, a website
|
28981
|
+
# is in the form of a URL, and a Github repo is in the form of a repo name. Next
|
28982
|
+
# id: 28
|
28983
|
+
# Corresponds to the JSON property `docAttribution`
|
28984
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRecitationDocAttribution]
|
28985
|
+
attr_accessor :doc_attribution
|
28986
|
+
|
28987
|
+
# number of documents that contained this segment
|
28988
|
+
# Corresponds to the JSON property `docOccurrences`
|
28989
|
+
# @return [Fixnum]
|
28990
|
+
attr_accessor :doc_occurrences
|
28991
|
+
|
28992
|
+
#
|
28993
|
+
# Corresponds to the JSON property `endIndex`
|
28994
|
+
# @return [Fixnum]
|
28995
|
+
attr_accessor :end_index
|
28996
|
+
|
28997
|
+
# The raw text in the given input that is corresponding to the segment. It will
|
28998
|
+
# be available only when 'return_segment_raw_text' is enabled in the request
|
28999
|
+
# options.
|
29000
|
+
# Corresponds to the JSON property `rawText`
|
29001
|
+
# @return [String]
|
29002
|
+
attr_accessor :raw_text
|
29003
|
+
|
29004
|
+
#
|
29005
|
+
# Corresponds to the JSON property `segmentRecitationAction`
|
29006
|
+
# @return [String]
|
29007
|
+
attr_accessor :segment_recitation_action
|
29008
|
+
|
29009
|
+
# The segment boundary start (inclusive) and end index (exclusive) in the given
|
29010
|
+
# text. In the streaming RPC, the indexes always start from the beginning of the
|
29011
|
+
# first text in the entire stream. The indexes are measured in UTF-16 code units.
|
29012
|
+
# Corresponds to the JSON property `startIndex`
|
29013
|
+
# @return [Fixnum]
|
29014
|
+
attr_accessor :start_index
|
29015
|
+
|
29016
|
+
def initialize(**args)
|
29017
|
+
update!(**args)
|
29018
|
+
end
|
29019
|
+
|
29020
|
+
# Update properties of this object
|
29021
|
+
def update!(**args)
|
29022
|
+
@attribution_dataset = args[:attribution_dataset] if args.key?(:attribution_dataset)
|
29023
|
+
@display_attribution_message = args[:display_attribution_message] if args.key?(:display_attribution_message)
|
29024
|
+
@doc_attribution = args[:doc_attribution] if args.key?(:doc_attribution)
|
29025
|
+
@doc_occurrences = args[:doc_occurrences] if args.key?(:doc_occurrences)
|
29026
|
+
@end_index = args[:end_index] if args.key?(:end_index)
|
29027
|
+
@raw_text = args[:raw_text] if args.key?(:raw_text)
|
29028
|
+
@segment_recitation_action = args[:segment_recitation_action] if args.key?(:segment_recitation_action)
|
29029
|
+
@start_index = args[:start_index] if args.key?(:start_index)
|
29030
|
+
end
|
29031
|
+
end
|
29032
|
+
|
29033
|
+
# The type used for final weights calculation.
|
29034
|
+
class LearningGenaiRootCalculationType
|
29035
|
+
include Google::Apis::Core::Hashable
|
29036
|
+
|
29037
|
+
#
|
29038
|
+
# Corresponds to the JSON property `scoreType`
|
29039
|
+
# @return [String]
|
29040
|
+
attr_accessor :score_type
|
29041
|
+
|
29042
|
+
#
|
29043
|
+
# Corresponds to the JSON property `weights`
|
29044
|
+
# @return [Float]
|
29045
|
+
attr_accessor :weights
|
29046
|
+
|
29047
|
+
def initialize(**args)
|
29048
|
+
update!(**args)
|
29049
|
+
end
|
29050
|
+
|
29051
|
+
# Update properties of this object
|
29052
|
+
def update!(**args)
|
29053
|
+
@score_type = args[:score_type] if args.key?(:score_type)
|
29054
|
+
@weights = args[:weights] if args.key?(:weights)
|
29055
|
+
end
|
29056
|
+
end
|
29057
|
+
|
29058
|
+
#
|
29059
|
+
class LearningGenaiRootClassifierOutput
|
29060
|
+
include Google::Apis::Core::Hashable
|
29061
|
+
|
29062
|
+
# If set, this is the output of the first matching rule.
|
29063
|
+
# Corresponds to the JSON property `ruleOutput`
|
29064
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput]
|
29065
|
+
attr_accessor :rule_output
|
29066
|
+
|
29067
|
+
# outputs of all matching rule.
|
29068
|
+
# Corresponds to the JSON property `ruleOutputs`
|
29069
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput>]
|
29070
|
+
attr_accessor :rule_outputs
|
29071
|
+
|
29072
|
+
# DataProviderOutput and MetricOutput can be saved between calls to the
|
29073
|
+
# Classifier framework. For instance, you can run the query classifier, get
|
29074
|
+
# outputs from those metrics, then use them in a result classifier as well.
|
29075
|
+
# Example rule based on this idea: and_rules ` rule ` metric_name: '
|
29076
|
+
# query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
|
29077
|
+
# Corresponds to the JSON property `state`
|
29078
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierState]
|
29079
|
+
attr_accessor :state
|
29080
|
+
|
29081
|
+
def initialize(**args)
|
29082
|
+
update!(**args)
|
29083
|
+
end
|
29084
|
+
|
29085
|
+
# Update properties of this object
|
29086
|
+
def update!(**args)
|
29087
|
+
@rule_output = args[:rule_output] if args.key?(:rule_output)
|
29088
|
+
@rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
|
29089
|
+
@state = args[:state] if args.key?(:state)
|
29090
|
+
end
|
29091
|
+
end
|
29092
|
+
|
29093
|
+
#
|
29094
|
+
class LearningGenaiRootClassifierOutputSummary
|
29095
|
+
include Google::Apis::Core::Hashable
|
29096
|
+
|
29097
|
+
#
|
29098
|
+
# Corresponds to the JSON property `metrics`
|
29099
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootMetricOutput>]
|
29100
|
+
attr_accessor :metrics
|
29101
|
+
|
29102
|
+
# Output of the first matching rule.
|
29103
|
+
# Corresponds to the JSON property `ruleOutput`
|
29104
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput]
|
29105
|
+
attr_accessor :rule_output
|
29106
|
+
|
29107
|
+
# outputs of all matching rule.
|
29108
|
+
# Corresponds to the JSON property `ruleOutputs`
|
29109
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRuleOutput>]
|
29110
|
+
attr_accessor :rule_outputs
|
29111
|
+
|
29112
|
+
def initialize(**args)
|
29113
|
+
update!(**args)
|
29114
|
+
end
|
29115
|
+
|
29116
|
+
# Update properties of this object
|
29117
|
+
def update!(**args)
|
29118
|
+
@metrics = args[:metrics] if args.key?(:metrics)
|
29119
|
+
@rule_output = args[:rule_output] if args.key?(:rule_output)
|
29120
|
+
@rule_outputs = args[:rule_outputs] if args.key?(:rule_outputs)
|
29121
|
+
end
|
29122
|
+
end
|
29123
|
+
|
29124
|
+
# DataProviderOutput and MetricOutput can be saved between calls to the
|
29125
|
+
# Classifier framework. For instance, you can run the query classifier, get
|
29126
|
+
# outputs from those metrics, then use them in a result classifier as well.
|
29127
|
+
# Example rule based on this idea: and_rules ` rule ` metric_name: '
|
29128
|
+
# query_safesearch_v2' ... ` rule ` metric_name: 'response_safesearch_v2' ... ` `
|
29129
|
+
class LearningGenaiRootClassifierState
|
29130
|
+
include Google::Apis::Core::Hashable
|
29131
|
+
|
29132
|
+
#
|
29133
|
+
# Corresponds to the JSON property `dataProviderOutput`
|
29134
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootDataProviderOutput>]
|
29135
|
+
attr_accessor :data_provider_output
|
29136
|
+
|
29137
|
+
#
|
29138
|
+
# Corresponds to the JSON property `metricOutput`
|
29139
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootMetricOutput>]
|
29140
|
+
attr_accessor :metric_output
|
29141
|
+
|
29142
|
+
def initialize(**args)
|
29143
|
+
update!(**args)
|
29144
|
+
end
|
29145
|
+
|
29146
|
+
# Update properties of this object
|
29147
|
+
def update!(**args)
|
29148
|
+
@data_provider_output = args[:data_provider_output] if args.key?(:data_provider_output)
|
29149
|
+
@metric_output = args[:metric_output] if args.key?(:metric_output)
|
29150
|
+
end
|
29151
|
+
end
|
29152
|
+
|
29153
|
+
#
|
29154
|
+
class LearningGenaiRootDataProviderOutput
|
29155
|
+
include Google::Apis::Core::Hashable
|
29156
|
+
|
29157
|
+
#
|
29158
|
+
# Corresponds to the JSON property `name`
|
29159
|
+
# @return [String]
|
29160
|
+
attr_accessor :name
|
29161
|
+
|
29162
|
+
# Wire-format for a Status object
|
29163
|
+
# Corresponds to the JSON property `status`
|
29164
|
+
# @return [Google::Apis::AiplatformV1::UtilStatusProto]
|
29165
|
+
attr_accessor :status
|
29166
|
+
|
29167
|
+
def initialize(**args)
|
29168
|
+
update!(**args)
|
29169
|
+
end
|
29170
|
+
|
29171
|
+
# Update properties of this object
|
29172
|
+
def update!(**args)
|
29173
|
+
@name = args[:name] if args.key?(:name)
|
29174
|
+
@status = args[:status] if args.key?(:status)
|
29175
|
+
end
|
29176
|
+
end
|
29177
|
+
|
29178
|
+
#
|
29179
|
+
class LearningGenaiRootFilterMetadata
|
29180
|
+
include Google::Apis::Core::Hashable
|
29181
|
+
|
29182
|
+
# Filter confidence.
|
29183
|
+
# Corresponds to the JSON property `confidence`
|
29184
|
+
# @return [String]
|
29185
|
+
attr_accessor :confidence
|
29186
|
+
|
29187
|
+
# Debug info for the message.
|
29188
|
+
# Corresponds to the JSON property `debugInfo`
|
29189
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadataFilterDebugInfo]
|
29190
|
+
attr_accessor :debug_info
|
29191
|
+
|
29192
|
+
# A fallback message chosen by the applied filter.
|
29193
|
+
# Corresponds to the JSON property `fallback`
|
29194
|
+
# @return [String]
|
29195
|
+
attr_accessor :fallback
|
29196
|
+
|
29197
|
+
# Additional info for the filter.
|
29198
|
+
# Corresponds to the JSON property `info`
|
29199
|
+
# @return [String]
|
29200
|
+
attr_accessor :info
|
29201
|
+
|
29202
|
+
# Name of the filter that triggered.
|
29203
|
+
# Corresponds to the JSON property `name`
|
29204
|
+
# @return [String]
|
29205
|
+
attr_accessor :name
|
29206
|
+
|
29207
|
+
# Filter reason.
|
29208
|
+
# Corresponds to the JSON property `reason`
|
29209
|
+
# @return [String]
|
29210
|
+
attr_accessor :reason
|
29211
|
+
|
29212
|
+
# The input query or generated response that is getting filtered.
|
29213
|
+
# Corresponds to the JSON property `text`
|
29214
|
+
# @return [String]
|
29215
|
+
attr_accessor :text
|
29216
|
+
|
29217
|
+
def initialize(**args)
|
29218
|
+
update!(**args)
|
29219
|
+
end
|
29220
|
+
|
29221
|
+
# Update properties of this object
|
29222
|
+
def update!(**args)
|
29223
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
29224
|
+
@debug_info = args[:debug_info] if args.key?(:debug_info)
|
29225
|
+
@fallback = args[:fallback] if args.key?(:fallback)
|
29226
|
+
@info = args[:info] if args.key?(:info)
|
29227
|
+
@name = args[:name] if args.key?(:name)
|
29228
|
+
@reason = args[:reason] if args.key?(:reason)
|
29229
|
+
@text = args[:text] if args.key?(:text)
|
29230
|
+
end
|
29231
|
+
end
|
29232
|
+
|
29233
|
+
#
|
29234
|
+
class LearningGenaiRootFilterMetadataFilterDebugInfo
|
29235
|
+
include Google::Apis::Core::Hashable
|
29236
|
+
|
29237
|
+
#
|
29238
|
+
# Corresponds to the JSON property `classifierOutput`
|
29239
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierOutput]
|
29240
|
+
attr_accessor :classifier_output
|
29241
|
+
|
29242
|
+
#
|
29243
|
+
# Corresponds to the JSON property `defaultMetadata`
|
29244
|
+
# @return [String]
|
29245
|
+
attr_accessor :default_metadata
|
29246
|
+
|
29247
|
+
#
|
29248
|
+
# Corresponds to the JSON property `languageFilterResult`
|
29249
|
+
# @return [Google::Apis::AiplatformV1::LearningServingLlmLanguageFilterResult]
|
29250
|
+
attr_accessor :language_filter_result
|
29251
|
+
|
29252
|
+
# This is per harm.
|
29253
|
+
# Corresponds to the JSON property `raiOutput`
|
29254
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput]
|
29255
|
+
attr_accessor :rai_output
|
29256
|
+
|
29257
|
+
# The RAI results for a given text.
|
29258
|
+
# Corresponds to the JSON property `raiResult`
|
29259
|
+
# @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult]
|
29260
|
+
attr_accessor :rai_result
|
29261
|
+
|
29262
|
+
# An RAI signal for a single category.
|
29263
|
+
# Corresponds to the JSON property `raiSignal`
|
29264
|
+
# @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiSignal]
|
29265
|
+
attr_accessor :rai_signal
|
29266
|
+
|
29267
|
+
# The recitation result for one stream input
|
29268
|
+
# Corresponds to the JSON property `streamRecitationResult`
|
29269
|
+
# @return [Google::Apis::AiplatformV1::LanguageLabsAidaTrustRecitationProtoStreamRecitationResult]
|
29270
|
+
attr_accessor :stream_recitation_result
|
29271
|
+
|
29272
|
+
#
|
29273
|
+
# Corresponds to the JSON property `takedownResult`
|
29274
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootTakedownResult]
|
29275
|
+
attr_accessor :takedown_result
|
29276
|
+
|
29277
|
+
# A model can generate multiple signals and this captures all the generated
|
29278
|
+
# signals for a single message.
|
29279
|
+
# Corresponds to the JSON property `toxicityResult`
|
29280
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootToxicityResult]
|
29281
|
+
attr_accessor :toxicity_result
|
29282
|
+
|
29283
|
+
def initialize(**args)
|
29284
|
+
update!(**args)
|
29285
|
+
end
|
29286
|
+
|
29287
|
+
# Update properties of this object
|
29288
|
+
def update!(**args)
|
29289
|
+
@classifier_output = args[:classifier_output] if args.key?(:classifier_output)
|
29290
|
+
@default_metadata = args[:default_metadata] if args.key?(:default_metadata)
|
29291
|
+
@language_filter_result = args[:language_filter_result] if args.key?(:language_filter_result)
|
29292
|
+
@rai_output = args[:rai_output] if args.key?(:rai_output)
|
29293
|
+
@rai_result = args[:rai_result] if args.key?(:rai_result)
|
29294
|
+
@rai_signal = args[:rai_signal] if args.key?(:rai_signal)
|
29295
|
+
@stream_recitation_result = args[:stream_recitation_result] if args.key?(:stream_recitation_result)
|
29296
|
+
@takedown_result = args[:takedown_result] if args.key?(:takedown_result)
|
29297
|
+
@toxicity_result = args[:toxicity_result] if args.key?(:toxicity_result)
|
29298
|
+
end
|
29299
|
+
end
|
29300
|
+
|
29301
|
+
#
|
29302
|
+
class LearningGenaiRootHarm
|
29303
|
+
include Google::Apis::Core::Hashable
|
29304
|
+
|
29305
|
+
# Please do not use, this is still under development.
|
29306
|
+
# Corresponds to the JSON property `contextualDangerous`
|
29307
|
+
# @return [Boolean]
|
29308
|
+
attr_accessor :contextual_dangerous
|
29309
|
+
alias_method :contextual_dangerous?, :contextual_dangerous
|
29310
|
+
|
29311
|
+
#
|
29312
|
+
# Corresponds to the JSON property `csam`
|
29313
|
+
# @return [Boolean]
|
29314
|
+
attr_accessor :csam
|
29315
|
+
alias_method :csam?, :csam
|
29316
|
+
|
29317
|
+
#
|
29318
|
+
# Corresponds to the JSON property `fringe`
|
29319
|
+
# @return [Boolean]
|
29320
|
+
attr_accessor :fringe
|
29321
|
+
alias_method :fringe?, :fringe
|
29322
|
+
|
29323
|
+
# Harm type for images
|
29324
|
+
# Corresponds to the JSON property `grailImageHarmType`
|
29325
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmGrailImageHarmType]
|
29326
|
+
attr_accessor :grail_image_harm_type
|
29327
|
+
|
29328
|
+
# Harm type for text
|
29329
|
+
# Corresponds to the JSON property `grailTextHarmType`
|
29330
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmGrailTextHarmType]
|
29331
|
+
attr_accessor :grail_text_harm_type
|
29332
|
+
|
29333
|
+
#
|
29334
|
+
# Corresponds to the JSON property `imageCsam`
|
29335
|
+
# @return [Boolean]
|
29336
|
+
attr_accessor :image_csam
|
29337
|
+
alias_method :image_csam?, :image_csam
|
29338
|
+
|
29339
|
+
#
|
29340
|
+
# Corresponds to the JSON property `imagePedo`
|
29341
|
+
# @return [Boolean]
|
29342
|
+
attr_accessor :image_pedo
|
29343
|
+
alias_method :image_pedo?, :image_pedo
|
29344
|
+
|
29345
|
+
# Image signals
|
29346
|
+
# Corresponds to the JSON property `imagePorn`
|
29347
|
+
# @return [Boolean]
|
29348
|
+
attr_accessor :image_porn
|
29349
|
+
alias_method :image_porn?, :image_porn
|
29350
|
+
|
29351
|
+
#
|
29352
|
+
# Corresponds to the JSON property `imageViolence`
|
29353
|
+
# @return [Boolean]
|
29354
|
+
attr_accessor :image_violence
|
29355
|
+
alias_method :image_violence?, :image_violence
|
29356
|
+
|
29357
|
+
#
|
29358
|
+
# Corresponds to the JSON property `pqc`
|
29359
|
+
# @return [Boolean]
|
29360
|
+
attr_accessor :pqc
|
29361
|
+
alias_method :pqc?, :pqc
|
29362
|
+
|
29363
|
+
#
|
29364
|
+
# Corresponds to the JSON property `safetycat`
|
29365
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmSafetyCatCategories]
|
29366
|
+
attr_accessor :safetycat
|
29367
|
+
|
29368
|
+
#
|
29369
|
+
# Corresponds to the JSON property `spii`
|
29370
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootHarmSpiiFilter]
|
29371
|
+
attr_accessor :spii
|
29372
|
+
|
29373
|
+
#
|
29374
|
+
# Corresponds to the JSON property `threshold`
|
29375
|
+
# @return [Float]
|
29376
|
+
attr_accessor :threshold
|
29377
|
+
|
29378
|
+
#
|
29379
|
+
# Corresponds to the JSON property `videoFrameCsam`
|
29380
|
+
# @return [Boolean]
|
29381
|
+
attr_accessor :video_frame_csam
|
29382
|
+
alias_method :video_frame_csam?, :video_frame_csam
|
29383
|
+
|
29384
|
+
#
|
29385
|
+
# Corresponds to the JSON property `videoFramePedo`
|
29386
|
+
# @return [Boolean]
|
29387
|
+
attr_accessor :video_frame_pedo
|
29388
|
+
alias_method :video_frame_pedo?, :video_frame_pedo
|
29389
|
+
|
29390
|
+
# Video frame signals
|
29391
|
+
# Corresponds to the JSON property `videoFramePorn`
|
29392
|
+
# @return [Boolean]
|
29393
|
+
attr_accessor :video_frame_porn
|
29394
|
+
alias_method :video_frame_porn?, :video_frame_porn
|
29395
|
+
|
29396
|
+
#
|
29397
|
+
# Corresponds to the JSON property `videoFrameViolence`
|
29398
|
+
# @return [Boolean]
|
29399
|
+
attr_accessor :video_frame_violence
|
29400
|
+
alias_method :video_frame_violence?, :video_frame_violence
|
29401
|
+
|
29402
|
+
def initialize(**args)
|
29403
|
+
update!(**args)
|
29404
|
+
end
|
29405
|
+
|
29406
|
+
# Update properties of this object
|
29407
|
+
def update!(**args)
|
29408
|
+
@contextual_dangerous = args[:contextual_dangerous] if args.key?(:contextual_dangerous)
|
29409
|
+
@csam = args[:csam] if args.key?(:csam)
|
29410
|
+
@fringe = args[:fringe] if args.key?(:fringe)
|
29411
|
+
@grail_image_harm_type = args[:grail_image_harm_type] if args.key?(:grail_image_harm_type)
|
29412
|
+
@grail_text_harm_type = args[:grail_text_harm_type] if args.key?(:grail_text_harm_type)
|
29413
|
+
@image_csam = args[:image_csam] if args.key?(:image_csam)
|
29414
|
+
@image_pedo = args[:image_pedo] if args.key?(:image_pedo)
|
29415
|
+
@image_porn = args[:image_porn] if args.key?(:image_porn)
|
29416
|
+
@image_violence = args[:image_violence] if args.key?(:image_violence)
|
29417
|
+
@pqc = args[:pqc] if args.key?(:pqc)
|
29418
|
+
@safetycat = args[:safetycat] if args.key?(:safetycat)
|
29419
|
+
@spii = args[:spii] if args.key?(:spii)
|
29420
|
+
@threshold = args[:threshold] if args.key?(:threshold)
|
29421
|
+
@video_frame_csam = args[:video_frame_csam] if args.key?(:video_frame_csam)
|
29422
|
+
@video_frame_pedo = args[:video_frame_pedo] if args.key?(:video_frame_pedo)
|
29423
|
+
@video_frame_porn = args[:video_frame_porn] if args.key?(:video_frame_porn)
|
29424
|
+
@video_frame_violence = args[:video_frame_violence] if args.key?(:video_frame_violence)
|
29425
|
+
end
|
29426
|
+
end
|
29427
|
+
|
29428
|
+
# Harm type for images
|
29429
|
+
class LearningGenaiRootHarmGrailImageHarmType
|
29430
|
+
include Google::Apis::Core::Hashable
|
29431
|
+
|
29432
|
+
#
|
29433
|
+
# Corresponds to the JSON property `imageHarmType`
|
29434
|
+
# @return [Array<String>]
|
29435
|
+
attr_accessor :image_harm_type
|
29436
|
+
|
29437
|
+
def initialize(**args)
|
29438
|
+
update!(**args)
|
29439
|
+
end
|
29440
|
+
|
29441
|
+
# Update properties of this object
|
29442
|
+
def update!(**args)
|
29443
|
+
@image_harm_type = args[:image_harm_type] if args.key?(:image_harm_type)
|
29444
|
+
end
|
29445
|
+
end
|
29446
|
+
|
29447
|
+
# Harm type for text
|
29448
|
+
class LearningGenaiRootHarmGrailTextHarmType
|
29449
|
+
include Google::Apis::Core::Hashable
|
29450
|
+
|
29451
|
+
#
|
29452
|
+
# Corresponds to the JSON property `harmType`
|
29453
|
+
# @return [Array<String>]
|
29454
|
+
attr_accessor :harm_type
|
29455
|
+
|
29456
|
+
def initialize(**args)
|
29457
|
+
update!(**args)
|
29458
|
+
end
|
29459
|
+
|
29460
|
+
# Update properties of this object
|
29461
|
+
def update!(**args)
|
29462
|
+
@harm_type = args[:harm_type] if args.key?(:harm_type)
|
29463
|
+
end
|
29464
|
+
end
|
29465
|
+
|
29466
|
+
#
|
29467
|
+
class LearningGenaiRootHarmSafetyCatCategories
|
29468
|
+
include Google::Apis::Core::Hashable
|
29469
|
+
|
29470
|
+
#
|
29471
|
+
# Corresponds to the JSON property `categories`
|
29472
|
+
# @return [Array<String>]
|
29473
|
+
attr_accessor :categories
|
29474
|
+
|
29475
|
+
def initialize(**args)
|
29476
|
+
update!(**args)
|
29477
|
+
end
|
29478
|
+
|
29479
|
+
# Update properties of this object
|
29480
|
+
def update!(**args)
|
29481
|
+
@categories = args[:categories] if args.key?(:categories)
|
29482
|
+
end
|
29483
|
+
end
|
29484
|
+
|
29485
|
+
#
|
29486
|
+
class LearningGenaiRootHarmSpiiFilter
|
29487
|
+
include Google::Apis::Core::Hashable
|
29488
|
+
|
29489
|
+
#
|
29490
|
+
# Corresponds to the JSON property `usBankRoutingMicr`
|
29491
|
+
# @return [Boolean]
|
29492
|
+
attr_accessor :us_bank_routing_micr
|
29493
|
+
alias_method :us_bank_routing_micr?, :us_bank_routing_micr
|
29494
|
+
|
29495
|
+
#
|
29496
|
+
# Corresponds to the JSON property `usEmployerIdentificationNumber`
|
29497
|
+
# @return [Boolean]
|
29498
|
+
attr_accessor :us_employer_identification_number
|
29499
|
+
alias_method :us_employer_identification_number?, :us_employer_identification_number
|
29500
|
+
|
29501
|
+
#
|
29502
|
+
# Corresponds to the JSON property `usSocialSecurityNumber`
|
29503
|
+
# @return [Boolean]
|
29504
|
+
attr_accessor :us_social_security_number
|
29505
|
+
alias_method :us_social_security_number?, :us_social_security_number
|
29506
|
+
|
29507
|
+
def initialize(**args)
|
29508
|
+
update!(**args)
|
29509
|
+
end
|
29510
|
+
|
29511
|
+
# Update properties of this object
|
29512
|
+
def update!(**args)
|
29513
|
+
@us_bank_routing_micr = args[:us_bank_routing_micr] if args.key?(:us_bank_routing_micr)
|
29514
|
+
@us_employer_identification_number = args[:us_employer_identification_number] if args.key?(:us_employer_identification_number)
|
29515
|
+
@us_social_security_number = args[:us_social_security_number] if args.key?(:us_social_security_number)
|
29516
|
+
end
|
29517
|
+
end
|
29518
|
+
|
29519
|
+
#
|
29520
|
+
class LearningGenaiRootInternalMetadata
|
29521
|
+
include Google::Apis::Core::Hashable
|
29522
|
+
|
29523
|
+
#
|
29524
|
+
# Corresponds to the JSON property `scoredTokens`
|
29525
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScoredToken>]
|
29526
|
+
attr_accessor :scored_tokens
|
29527
|
+
|
29528
|
+
def initialize(**args)
|
29529
|
+
update!(**args)
|
29530
|
+
end
|
29531
|
+
|
29532
|
+
# Update properties of this object
|
29533
|
+
def update!(**args)
|
29534
|
+
@scored_tokens = args[:scored_tokens] if args.key?(:scored_tokens)
|
29535
|
+
end
|
29536
|
+
end
|
29537
|
+
|
29538
|
+
#
|
29539
|
+
class LearningGenaiRootMetricOutput
|
29540
|
+
include Google::Apis::Core::Hashable
|
29541
|
+
|
29542
|
+
#
|
29543
|
+
# Corresponds to the JSON property `debug`
|
29544
|
+
# @return [String]
|
29545
|
+
attr_accessor :debug
|
29546
|
+
|
29547
|
+
# Name of the metric.
|
29548
|
+
# Corresponds to the JSON property `name`
|
29549
|
+
# @return [String]
|
29550
|
+
attr_accessor :name
|
29551
|
+
|
29552
|
+
#
|
29553
|
+
# Corresponds to the JSON property `numericValue`
|
29554
|
+
# @return [Float]
|
29555
|
+
attr_accessor :numeric_value
|
29556
|
+
|
29557
|
+
# Wire-format for a Status object
|
29558
|
+
# Corresponds to the JSON property `status`
|
29559
|
+
# @return [Google::Apis::AiplatformV1::UtilStatusProto]
|
29560
|
+
attr_accessor :status
|
29561
|
+
|
29562
|
+
#
|
29563
|
+
# Corresponds to the JSON property `stringValue`
|
29564
|
+
# @return [String]
|
29565
|
+
attr_accessor :string_value
|
29566
|
+
|
29567
|
+
def initialize(**args)
|
29568
|
+
update!(**args)
|
29569
|
+
end
|
29570
|
+
|
29571
|
+
# Update properties of this object
|
29572
|
+
def update!(**args)
|
29573
|
+
@debug = args[:debug] if args.key?(:debug)
|
29574
|
+
@name = args[:name] if args.key?(:name)
|
29575
|
+
@numeric_value = args[:numeric_value] if args.key?(:numeric_value)
|
29576
|
+
@status = args[:status] if args.key?(:status)
|
29577
|
+
@string_value = args[:string_value] if args.key?(:string_value)
|
29578
|
+
end
|
29579
|
+
end
|
29580
|
+
|
29581
|
+
# This is per harm.
|
29582
|
+
class LearningGenaiRootRaiOutput
|
29583
|
+
include Google::Apis::Core::Hashable
|
29584
|
+
|
29585
|
+
#
|
29586
|
+
# Corresponds to the JSON property `allowed`
|
29587
|
+
# @return [Boolean]
|
29588
|
+
attr_accessor :allowed
|
29589
|
+
alias_method :allowed?, :allowed
|
29590
|
+
|
29591
|
+
#
|
29592
|
+
# Corresponds to the JSON property `harm`
|
29593
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootHarm]
|
29594
|
+
attr_accessor :harm
|
29595
|
+
|
29596
|
+
#
|
29597
|
+
# Corresponds to the JSON property `name`
|
29598
|
+
# @return [String]
|
29599
|
+
attr_accessor :name
|
29600
|
+
|
29601
|
+
#
|
29602
|
+
# Corresponds to the JSON property `score`
|
29603
|
+
# @return [Float]
|
29604
|
+
attr_accessor :score
|
29605
|
+
|
29606
|
+
def initialize(**args)
|
29607
|
+
update!(**args)
|
29608
|
+
end
|
29609
|
+
|
29610
|
+
# Update properties of this object
|
29611
|
+
def update!(**args)
|
29612
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
29613
|
+
@harm = args[:harm] if args.key?(:harm)
|
29614
|
+
@name = args[:name] if args.key?(:name)
|
29615
|
+
@score = args[:score] if args.key?(:score)
|
29616
|
+
end
|
29617
|
+
end
|
29618
|
+
|
29619
|
+
#
|
29620
|
+
class LearningGenaiRootRegexTakedownResult
|
29621
|
+
include Google::Apis::Core::Hashable
|
29622
|
+
|
29623
|
+
# False when query or response should be taken down due to match with a blocked
|
29624
|
+
# regex, true otherwise.
|
29625
|
+
# Corresponds to the JSON property `allowed`
|
29626
|
+
# @return [Boolean]
|
29627
|
+
attr_accessor :allowed
|
29628
|
+
alias_method :allowed?, :allowed
|
29629
|
+
|
29630
|
+
# Regex used to decide that query or response should be taken down. Empty when
|
29631
|
+
# query or response is kept.
|
29632
|
+
# Corresponds to the JSON property `takedownRegex`
|
29633
|
+
# @return [String]
|
29634
|
+
attr_accessor :takedown_regex
|
29635
|
+
|
29636
|
+
def initialize(**args)
|
29637
|
+
update!(**args)
|
29638
|
+
end
|
29639
|
+
|
29640
|
+
# Update properties of this object
|
29641
|
+
def update!(**args)
|
29642
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
29643
|
+
@takedown_regex = args[:takedown_regex] if args.key?(:takedown_regex)
|
29644
|
+
end
|
29645
|
+
end
|
29646
|
+
|
29647
|
+
#
|
29648
|
+
class LearningGenaiRootRequestResponseTakedownResult
|
29649
|
+
include Google::Apis::Core::Hashable
|
29650
|
+
|
29651
|
+
# False when response has to be taken down per above config.
|
29652
|
+
# Corresponds to the JSON property `allowed`
|
29653
|
+
# @return [Boolean]
|
29654
|
+
attr_accessor :allowed
|
29655
|
+
alias_method :allowed?, :allowed
|
29656
|
+
|
29657
|
+
# Regex used to match the request.
|
29658
|
+
# Corresponds to the JSON property `requestTakedownRegex`
|
29659
|
+
# @return [String]
|
29660
|
+
attr_accessor :request_takedown_regex
|
29661
|
+
|
29662
|
+
# Regex used to decide that response should be taken down. Empty when response
|
29663
|
+
# is kept.
|
29664
|
+
# Corresponds to the JSON property `responseTakedownRegex`
|
29665
|
+
# @return [String]
|
29666
|
+
attr_accessor :response_takedown_regex
|
29667
|
+
|
29668
|
+
def initialize(**args)
|
29669
|
+
update!(**args)
|
29670
|
+
end
|
29671
|
+
|
29672
|
+
# Update properties of this object
|
29673
|
+
def update!(**args)
|
29674
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
29675
|
+
@request_takedown_regex = args[:request_takedown_regex] if args.key?(:request_takedown_regex)
|
29676
|
+
@response_takedown_regex = args[:response_takedown_regex] if args.key?(:response_takedown_regex)
|
29677
|
+
end
|
29678
|
+
end
|
29679
|
+
|
29680
|
+
# Holds the final routing decision, by storing the model_config_id. And
|
29681
|
+
# individual scores each model got.
|
29682
|
+
class LearningGenaiRootRoutingDecision
|
29683
|
+
include Google::Apis::Core::Hashable
|
29684
|
+
|
29685
|
+
# Debug metadata about the routing decision.
|
29686
|
+
# Corresponds to the JSON property `metadata`
|
29687
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadata]
|
29688
|
+
attr_accessor :metadata
|
29689
|
+
|
29690
|
+
# The selected model to route traffic to.
|
29691
|
+
# Corresponds to the JSON property `modelConfigId`
|
29692
|
+
# @return [String]
|
29693
|
+
attr_accessor :model_config_id
|
29694
|
+
|
29695
|
+
def initialize(**args)
|
29696
|
+
update!(**args)
|
29697
|
+
end
|
29698
|
+
|
29699
|
+
# Update properties of this object
|
29700
|
+
def update!(**args)
|
29701
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
29702
|
+
@model_config_id = args[:model_config_id] if args.key?(:model_config_id)
|
29703
|
+
end
|
29704
|
+
end
|
29705
|
+
|
29706
|
+
# Debug metadata about the routing decision.
|
29707
|
+
class LearningGenaiRootRoutingDecisionMetadata
|
29708
|
+
include Google::Apis::Core::Hashable
|
29709
|
+
|
29710
|
+
# If we are routing using scored based configuration, then the metadata about
|
29711
|
+
# that is available in this proto.
|
29712
|
+
# Corresponds to the JSON property `scoreBasedRoutingMetadata`
|
29713
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataScoreBased]
|
29714
|
+
attr_accessor :score_based_routing_metadata
|
29715
|
+
|
29716
|
+
#
|
29717
|
+
# Corresponds to the JSON property `tokenLengthBasedRoutingMetadata`
|
29718
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBased]
|
29719
|
+
attr_accessor :token_length_based_routing_metadata
|
29720
|
+
|
29721
|
+
def initialize(**args)
|
29722
|
+
update!(**args)
|
29723
|
+
end
|
29724
|
+
|
29725
|
+
# Update properties of this object
|
29726
|
+
def update!(**args)
|
29727
|
+
@score_based_routing_metadata = args[:score_based_routing_metadata] if args.key?(:score_based_routing_metadata)
|
29728
|
+
@token_length_based_routing_metadata = args[:token_length_based_routing_metadata] if args.key?(:token_length_based_routing_metadata)
|
29729
|
+
end
|
29730
|
+
end
|
29731
|
+
|
29732
|
+
# If we are routing using scored based configuration, then the metadata about
|
29733
|
+
# that is available in this proto.
|
29734
|
+
class LearningGenaiRootRoutingDecisionMetadataScoreBased
|
29735
|
+
include Google::Apis::Core::Hashable
|
29736
|
+
|
29737
|
+
# The rule that was matched.
|
29738
|
+
# Corresponds to the JSON property `matchedRule`
|
29739
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootScoreBasedRoutingConfigRule]
|
29740
|
+
attr_accessor :matched_rule
|
29741
|
+
|
29742
|
+
# The score that was generated by the router i.e. the model.
|
29743
|
+
# Corresponds to the JSON property `score`
|
29744
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
|
29745
|
+
attr_accessor :score
|
29746
|
+
|
29747
|
+
# No rules were matched & therefore used the default fallback.
|
29748
|
+
# Corresponds to the JSON property `usedDefaultFallback`
|
29749
|
+
# @return [Boolean]
|
29750
|
+
attr_accessor :used_default_fallback
|
29751
|
+
alias_method :used_default_fallback?, :used_default_fallback
|
29752
|
+
|
29753
|
+
def initialize(**args)
|
29754
|
+
update!(**args)
|
29755
|
+
end
|
29756
|
+
|
29757
|
+
# Update properties of this object
|
29758
|
+
def update!(**args)
|
29759
|
+
@matched_rule = args[:matched_rule] if args.key?(:matched_rule)
|
29760
|
+
@score = args[:score] if args.key?(:score)
|
29761
|
+
@used_default_fallback = args[:used_default_fallback] if args.key?(:used_default_fallback)
|
29762
|
+
end
|
29763
|
+
end
|
29764
|
+
|
29765
|
+
#
|
29766
|
+
class LearningGenaiRootRoutingDecisionMetadataTokenLengthBased
|
29767
|
+
include Google::Apis::Core::Hashable
|
29768
|
+
|
29769
|
+
#
|
29770
|
+
# Corresponds to the JSON property `modelInputTokenMetadata`
|
29771
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata>]
|
29772
|
+
attr_accessor :model_input_token_metadata
|
29773
|
+
|
29774
|
+
#
|
29775
|
+
# Corresponds to the JSON property `modelMaxTokenMetadata`
|
29776
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata>]
|
29777
|
+
attr_accessor :model_max_token_metadata
|
29778
|
+
|
29779
|
+
def initialize(**args)
|
29780
|
+
update!(**args)
|
29781
|
+
end
|
29782
|
+
|
29783
|
+
# Update properties of this object
|
29784
|
+
def update!(**args)
|
29785
|
+
@model_input_token_metadata = args[:model_input_token_metadata] if args.key?(:model_input_token_metadata)
|
29786
|
+
@model_max_token_metadata = args[:model_max_token_metadata] if args.key?(:model_max_token_metadata)
|
29787
|
+
end
|
29788
|
+
end
|
29789
|
+
|
29790
|
+
#
|
29791
|
+
class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelInputTokenMetadata
|
29792
|
+
include Google::Apis::Core::Hashable
|
29793
|
+
|
29794
|
+
# The length computed by backends using the formatter & tokenizer specific to
|
29795
|
+
# the model
|
29796
|
+
# Corresponds to the JSON property `computedInputTokenLength`
|
29797
|
+
# @return [Fixnum]
|
29798
|
+
attr_accessor :computed_input_token_length
|
29799
|
+
|
29800
|
+
#
|
29801
|
+
# Corresponds to the JSON property `modelId`
|
29802
|
+
# @return [String]
|
29803
|
+
attr_accessor :model_id
|
29804
|
+
|
29805
|
+
def initialize(**args)
|
29806
|
+
update!(**args)
|
29807
|
+
end
|
29808
|
+
|
29809
|
+
# Update properties of this object
|
29810
|
+
def update!(**args)
|
29811
|
+
@computed_input_token_length = args[:computed_input_token_length] if args.key?(:computed_input_token_length)
|
29812
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
29813
|
+
end
|
29814
|
+
end
|
29815
|
+
|
29816
|
+
#
|
29817
|
+
class LearningGenaiRootRoutingDecisionMetadataTokenLengthBasedModelMaxTokenMetadata
|
29818
|
+
include Google::Apis::Core::Hashable
|
29819
|
+
|
29820
|
+
#
|
29821
|
+
# Corresponds to the JSON property `maxNumInputTokens`
|
29822
|
+
# @return [Fixnum]
|
29823
|
+
attr_accessor :max_num_input_tokens
|
29824
|
+
|
29825
|
+
#
|
29826
|
+
# Corresponds to the JSON property `maxNumOutputTokens`
|
29827
|
+
# @return [Fixnum]
|
29828
|
+
attr_accessor :max_num_output_tokens
|
29829
|
+
|
29830
|
+
#
|
29831
|
+
# Corresponds to the JSON property `modelId`
|
29832
|
+
# @return [String]
|
29833
|
+
attr_accessor :model_id
|
29834
|
+
|
29835
|
+
def initialize(**args)
|
29836
|
+
update!(**args)
|
29837
|
+
end
|
29838
|
+
|
29839
|
+
# Update properties of this object
|
29840
|
+
def update!(**args)
|
29841
|
+
@max_num_input_tokens = args[:max_num_input_tokens] if args.key?(:max_num_input_tokens)
|
29842
|
+
@max_num_output_tokens = args[:max_num_output_tokens] if args.key?(:max_num_output_tokens)
|
29843
|
+
@model_id = args[:model_id] if args.key?(:model_id)
|
29844
|
+
end
|
29845
|
+
end
|
29846
|
+
|
29847
|
+
#
|
29848
|
+
class LearningGenaiRootRuleOutput
|
29849
|
+
include Google::Apis::Core::Hashable
|
29850
|
+
|
29851
|
+
#
|
29852
|
+
# Corresponds to the JSON property `decision`
|
29853
|
+
# @return [String]
|
29854
|
+
attr_accessor :decision
|
29855
|
+
|
29856
|
+
#
|
29857
|
+
# Corresponds to the JSON property `name`
|
29858
|
+
# @return [String]
|
29859
|
+
attr_accessor :name
|
29860
|
+
|
29861
|
+
def initialize(**args)
|
29862
|
+
update!(**args)
|
29863
|
+
end
|
29864
|
+
|
29865
|
+
# Update properties of this object
|
29866
|
+
def update!(**args)
|
29867
|
+
@decision = args[:decision] if args.key?(:decision)
|
29868
|
+
@name = args[:name] if args.key?(:name)
|
29869
|
+
end
|
29870
|
+
end
|
29871
|
+
|
29872
|
+
#
|
29873
|
+
class LearningGenaiRootScore
|
29874
|
+
include Google::Apis::Core::Hashable
|
29875
|
+
|
29876
|
+
# The type used for final weights calculation.
|
29877
|
+
# Corresponds to the JSON property `calculationType`
|
29878
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootCalculationType]
|
29879
|
+
attr_accessor :calculation_type
|
29880
|
+
|
29881
|
+
# The internal_metadata is intended to be used by internal processors and will
|
29882
|
+
# be cleared before returns.
|
29883
|
+
# Corresponds to the JSON property `internalMetadata`
|
29884
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootInternalMetadata]
|
29885
|
+
attr_accessor :internal_metadata
|
29886
|
+
|
29887
|
+
# The type of score that bundled with a threshold, and will not be attending the
|
29888
|
+
# final score calculation. How each score type uses the threshold can be
|
29889
|
+
# implementation details.
|
29890
|
+
# Corresponds to the JSON property `thresholdType`
|
29891
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootThresholdType]
|
29892
|
+
attr_accessor :threshold_type
|
29893
|
+
|
29894
|
+
# Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
|
29895
|
+
# Corresponds to the JSON property `tokensAndLogprobPerDecodingStep`
|
29896
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStep]
|
29897
|
+
attr_accessor :tokens_and_logprob_per_decoding_step
|
29898
|
+
|
29899
|
+
#
|
29900
|
+
# Corresponds to the JSON property `value`
|
29901
|
+
# @return [Float]
|
29902
|
+
attr_accessor :value
|
29903
|
+
|
29904
|
+
def initialize(**args)
|
29905
|
+
update!(**args)
|
29906
|
+
end
|
29907
|
+
|
29908
|
+
# Update properties of this object
|
29909
|
+
def update!(**args)
|
29910
|
+
@calculation_type = args[:calculation_type] if args.key?(:calculation_type)
|
29911
|
+
@internal_metadata = args[:internal_metadata] if args.key?(:internal_metadata)
|
29912
|
+
@threshold_type = args[:threshold_type] if args.key?(:threshold_type)
|
29913
|
+
@tokens_and_logprob_per_decoding_step = args[:tokens_and_logprob_per_decoding_step] if args.key?(:tokens_and_logprob_per_decoding_step)
|
29914
|
+
@value = args[:value] if args.key?(:value)
|
29915
|
+
end
|
29916
|
+
end
|
29917
|
+
|
29918
|
+
#
|
29919
|
+
class LearningGenaiRootScoreBasedRoutingConfigRule
|
29920
|
+
include Google::Apis::Core::Hashable
|
29921
|
+
|
29922
|
+
# NOTE: Hardest examples have smaller values in their routing scores.
|
29923
|
+
# Corresponds to the JSON property `equalOrGreaterThan`
|
29924
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
|
29925
|
+
attr_accessor :equal_or_greater_than
|
29926
|
+
|
29927
|
+
#
|
29928
|
+
# Corresponds to the JSON property `lessThan`
|
29929
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
|
29930
|
+
attr_accessor :less_than
|
29931
|
+
|
29932
|
+
# This model_config_id points to ModelConfig::id which allows us to find the
|
29933
|
+
# ModelConfig to route to. This is part of the banks specified in the
|
29934
|
+
# ModelBankConfig.
|
29935
|
+
# Corresponds to the JSON property `modelConfigId`
|
29936
|
+
# @return [String]
|
29937
|
+
attr_accessor :model_config_id
|
29938
|
+
|
29939
|
+
def initialize(**args)
|
29940
|
+
update!(**args)
|
29941
|
+
end
|
29942
|
+
|
29943
|
+
# Update properties of this object
|
29944
|
+
def update!(**args)
|
29945
|
+
@equal_or_greater_than = args[:equal_or_greater_than] if args.key?(:equal_or_greater_than)
|
29946
|
+
@less_than = args[:less_than] if args.key?(:less_than)
|
29947
|
+
@model_config_id = args[:model_config_id] if args.key?(:model_config_id)
|
29948
|
+
end
|
29949
|
+
end
|
29950
|
+
|
29951
|
+
# Proto containing the results from the Universal Sentence Encoder / Other
|
29952
|
+
# models
|
29953
|
+
class LearningGenaiRootScoredSimilarityTakedownPhrase
|
29954
|
+
include Google::Apis::Core::Hashable
|
29955
|
+
|
29956
|
+
# Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
|
29957
|
+
# phrases together along with a corresponding punt If the closest matching
|
29958
|
+
# response is of the allowed type, we allow the response If the closest matching
|
29959
|
+
# response is of the blocked type, we block the response. eg: Blocked phrase - "
|
29960
|
+
# All lives matter"
|
29961
|
+
# Corresponds to the JSON property `phrase`
|
29962
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownPhrase]
|
29963
|
+
attr_accessor :phrase
|
29964
|
+
|
29965
|
+
#
|
29966
|
+
# Corresponds to the JSON property `similarityScore`
|
29967
|
+
# @return [Float]
|
29968
|
+
attr_accessor :similarity_score
|
29969
|
+
|
29970
|
+
def initialize(**args)
|
29971
|
+
update!(**args)
|
29972
|
+
end
|
29973
|
+
|
29974
|
+
# Update properties of this object
|
29975
|
+
def update!(**args)
|
29976
|
+
@phrase = args[:phrase] if args.key?(:phrase)
|
29977
|
+
@similarity_score = args[:similarity_score] if args.key?(:similarity_score)
|
29978
|
+
end
|
29979
|
+
end
|
29980
|
+
|
29981
|
+
# A token with its own score.
|
29982
|
+
class LearningGenaiRootScoredToken
|
29983
|
+
include Google::Apis::Core::Hashable
|
29984
|
+
|
29985
|
+
# Each end_token_score is a logprob for how well the completion would end at a
|
29986
|
+
# particular token. See http://google3/labs/language/aida/config/proto/
|
29987
|
+
# model_config.proto;l=376;rcl=573039459
|
29988
|
+
# Corresponds to the JSON property `endTokenScore`
|
29989
|
+
# @return [Float]
|
29990
|
+
attr_accessor :end_token_score
|
29991
|
+
|
29992
|
+
# Each score is the logprob for the token in model response.
|
29993
|
+
# Corresponds to the JSON property `score`
|
29994
|
+
# @return [Float]
|
29995
|
+
attr_accessor :score
|
29996
|
+
|
29997
|
+
#
|
29998
|
+
# Corresponds to the JSON property `token`
|
29999
|
+
# @return [String]
|
30000
|
+
attr_accessor :token
|
30001
|
+
|
30002
|
+
def initialize(**args)
|
30003
|
+
update!(**args)
|
30004
|
+
end
|
30005
|
+
|
30006
|
+
# Update properties of this object
|
30007
|
+
def update!(**args)
|
30008
|
+
@end_token_score = args[:end_token_score] if args.key?(:end_token_score)
|
30009
|
+
@score = args[:score] if args.key?(:score)
|
30010
|
+
@token = args[:token] if args.key?(:token)
|
30011
|
+
end
|
30012
|
+
end
|
30013
|
+
|
30014
|
+
# Each SimilarityTakedownPhrase treats a logical group of blocked and allowed
|
30015
|
+
# phrases together along with a corresponding punt If the closest matching
|
30016
|
+
# response is of the allowed type, we allow the response If the closest matching
|
30017
|
+
# response is of the blocked type, we block the response. eg: Blocked phrase - "
|
30018
|
+
# All lives matter"
|
30019
|
+
class LearningGenaiRootSimilarityTakedownPhrase
|
30020
|
+
include Google::Apis::Core::Hashable
|
30021
|
+
|
30022
|
+
#
|
30023
|
+
# Corresponds to the JSON property `blockedPhrase`
|
30024
|
+
# @return [String]
|
30025
|
+
attr_accessor :blocked_phrase
|
30026
|
+
|
30027
|
+
def initialize(**args)
|
30028
|
+
update!(**args)
|
30029
|
+
end
|
30030
|
+
|
30031
|
+
# Update properties of this object
|
30032
|
+
def update!(**args)
|
30033
|
+
@blocked_phrase = args[:blocked_phrase] if args.key?(:blocked_phrase)
|
30034
|
+
end
|
30035
|
+
end
|
30036
|
+
|
30037
|
+
#
|
30038
|
+
class LearningGenaiRootSimilarityTakedownResult
|
30039
|
+
include Google::Apis::Core::Hashable
|
30040
|
+
|
30041
|
+
# False when query or response should be taken down by any of the takedown rules,
|
30042
|
+
# true otherwise.
|
30043
|
+
# Corresponds to the JSON property `allowed`
|
30044
|
+
# @return [Boolean]
|
30045
|
+
attr_accessor :allowed
|
30046
|
+
alias_method :allowed?, :allowed
|
30047
|
+
|
30048
|
+
# List of similar phrases with score. Set only if allowed=false.
|
30049
|
+
# Corresponds to the JSON property `scoredPhrases`
|
30050
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScoredSimilarityTakedownPhrase>]
|
30051
|
+
attr_accessor :scored_phrases
|
30052
|
+
|
30053
|
+
def initialize(**args)
|
30054
|
+
update!(**args)
|
30055
|
+
end
|
30056
|
+
|
30057
|
+
# Update properties of this object
|
30058
|
+
def update!(**args)
|
30059
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
30060
|
+
@scored_phrases = args[:scored_phrases] if args.key?(:scored_phrases)
|
30061
|
+
end
|
30062
|
+
end
|
30063
|
+
|
30064
|
+
#
|
30065
|
+
class LearningGenaiRootTakedownResult
|
30066
|
+
include Google::Apis::Core::Hashable
|
30067
|
+
|
30068
|
+
# False when query or response should be taken down by any of the takedown rules,
|
30069
|
+
# true otherwise.
|
30070
|
+
# Corresponds to the JSON property `allowed`
|
30071
|
+
# @return [Boolean]
|
30072
|
+
attr_accessor :allowed
|
30073
|
+
alias_method :allowed?, :allowed
|
30074
|
+
|
30075
|
+
#
|
30076
|
+
# Corresponds to the JSON property `regexTakedownResult`
|
30077
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRegexTakedownResult]
|
30078
|
+
attr_accessor :regex_takedown_result
|
30079
|
+
|
30080
|
+
#
|
30081
|
+
# Corresponds to the JSON property `requestResponseTakedownResult`
|
30082
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootRequestResponseTakedownResult]
|
30083
|
+
attr_accessor :request_response_takedown_result
|
30084
|
+
|
30085
|
+
#
|
30086
|
+
# Corresponds to the JSON property `similarityTakedownResult`
|
30087
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootSimilarityTakedownResult]
|
30088
|
+
attr_accessor :similarity_takedown_result
|
30089
|
+
|
30090
|
+
def initialize(**args)
|
30091
|
+
update!(**args)
|
30092
|
+
end
|
30093
|
+
|
30094
|
+
# Update properties of this object
|
30095
|
+
def update!(**args)
|
30096
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
30097
|
+
@regex_takedown_result = args[:regex_takedown_result] if args.key?(:regex_takedown_result)
|
30098
|
+
@request_response_takedown_result = args[:request_response_takedown_result] if args.key?(:request_response_takedown_result)
|
30099
|
+
@similarity_takedown_result = args[:similarity_takedown_result] if args.key?(:similarity_takedown_result)
|
30100
|
+
end
|
30101
|
+
end
|
30102
|
+
|
30103
|
+
# The type of score that bundled with a threshold, and will not be attending the
|
30104
|
+
# final score calculation. How each score type uses the threshold can be
|
30105
|
+
# implementation details.
|
30106
|
+
class LearningGenaiRootThresholdType
|
30107
|
+
include Google::Apis::Core::Hashable
|
30108
|
+
|
30109
|
+
#
|
30110
|
+
# Corresponds to the JSON property `scoreType`
|
30111
|
+
# @return [String]
|
30112
|
+
attr_accessor :score_type
|
30113
|
+
|
30114
|
+
#
|
30115
|
+
# Corresponds to the JSON property `threshold`
|
30116
|
+
# @return [Float]
|
30117
|
+
attr_accessor :threshold
|
30118
|
+
|
30119
|
+
def initialize(**args)
|
30120
|
+
update!(**args)
|
30121
|
+
end
|
30122
|
+
|
30123
|
+
# Update properties of this object
|
30124
|
+
def update!(**args)
|
30125
|
+
@score_type = args[:score_type] if args.key?(:score_type)
|
30126
|
+
@threshold = args[:threshold] if args.key?(:threshold)
|
30127
|
+
end
|
30128
|
+
end
|
30129
|
+
|
30130
|
+
# Results of RandomSamplingParams::top_k_logprob_per_decoding_step.
|
30131
|
+
class LearningGenaiRootTokensAndLogProbPerDecodingStep
|
30132
|
+
include Google::Apis::Core::Hashable
|
30133
|
+
|
30134
|
+
# Length = total number of decoding steps. The chosen candidates may or may not
|
30135
|
+
# be in top_candidates.
|
30136
|
+
# Corresponds to the JSON property `chosenCandidates`
|
30137
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
|
30138
|
+
attr_accessor :chosen_candidates
|
30139
|
+
|
30140
|
+
# Length = total number of decoding steps.
|
30141
|
+
# Corresponds to the JSON property `topCandidates`
|
30142
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates>]
|
30143
|
+
attr_accessor :top_candidates
|
30144
|
+
|
30145
|
+
def initialize(**args)
|
30146
|
+
update!(**args)
|
30147
|
+
end
|
30148
|
+
|
30149
|
+
# Update properties of this object
|
30150
|
+
def update!(**args)
|
30151
|
+
@chosen_candidates = args[:chosen_candidates] if args.key?(:chosen_candidates)
|
30152
|
+
@top_candidates = args[:top_candidates] if args.key?(:top_candidates)
|
30153
|
+
end
|
30154
|
+
end
|
30155
|
+
|
30156
|
+
# A candidate at a decoding step.
|
30157
|
+
class LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate
|
30158
|
+
include Google::Apis::Core::Hashable
|
30159
|
+
|
30160
|
+
# The candidate's log probability.
|
30161
|
+
# Corresponds to the JSON property `logProbability`
|
30162
|
+
# @return [Float]
|
30163
|
+
attr_accessor :log_probability
|
30164
|
+
|
30165
|
+
# The candidate’s token value.
|
30166
|
+
# Corresponds to the JSON property `token`
|
30167
|
+
# @return [String]
|
30168
|
+
attr_accessor :token
|
30169
|
+
|
30170
|
+
def initialize(**args)
|
30171
|
+
update!(**args)
|
30172
|
+
end
|
30173
|
+
|
30174
|
+
# Update properties of this object
|
30175
|
+
def update!(**args)
|
30176
|
+
@log_probability = args[:log_probability] if args.key?(:log_probability)
|
30177
|
+
@token = args[:token] if args.key?(:token)
|
30178
|
+
end
|
30179
|
+
end
|
30180
|
+
|
30181
|
+
# Candidates with top log probabilities at each decoding step.
|
30182
|
+
class LearningGenaiRootTokensAndLogProbPerDecodingStepTopCandidates
|
30183
|
+
include Google::Apis::Core::Hashable
|
30184
|
+
|
30185
|
+
# Sorted by log probability in descending order.
|
30186
|
+
# Corresponds to the JSON property `candidates`
|
30187
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootTokensAndLogProbPerDecodingStepCandidate>]
|
30188
|
+
attr_accessor :candidates
|
30189
|
+
|
30190
|
+
def initialize(**args)
|
30191
|
+
update!(**args)
|
30192
|
+
end
|
30193
|
+
|
30194
|
+
# Update properties of this object
|
30195
|
+
def update!(**args)
|
30196
|
+
@candidates = args[:candidates] if args.key?(:candidates)
|
30197
|
+
end
|
30198
|
+
end
|
30199
|
+
|
30200
|
+
# A model can generate multiple signals and this captures all the generated
|
30201
|
+
# signals for a single message.
|
30202
|
+
class LearningGenaiRootToxicityResult
|
30203
|
+
include Google::Apis::Core::Hashable
|
30204
|
+
|
30205
|
+
#
|
30206
|
+
# Corresponds to the JSON property `signals`
|
30207
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootToxicitySignal>]
|
30208
|
+
attr_accessor :signals
|
30209
|
+
|
30210
|
+
def initialize(**args)
|
30211
|
+
update!(**args)
|
30212
|
+
end
|
30213
|
+
|
30214
|
+
# Update properties of this object
|
30215
|
+
def update!(**args)
|
30216
|
+
@signals = args[:signals] if args.key?(:signals)
|
30217
|
+
end
|
30218
|
+
end
|
30219
|
+
|
30220
|
+
# Proto to capture a signal generated by the toxicity model.
|
30221
|
+
class LearningGenaiRootToxicitySignal
|
30222
|
+
include Google::Apis::Core::Hashable
|
30223
|
+
|
30224
|
+
#
|
30225
|
+
# Corresponds to the JSON property `allowed`
|
30226
|
+
# @return [Boolean]
|
30227
|
+
attr_accessor :allowed
|
30228
|
+
alias_method :allowed?, :allowed
|
30229
|
+
|
30230
|
+
#
|
30231
|
+
# Corresponds to the JSON property `label`
|
30232
|
+
# @return [String]
|
30233
|
+
attr_accessor :label
|
30234
|
+
|
30235
|
+
#
|
30236
|
+
# Corresponds to the JSON property `score`
|
30237
|
+
# @return [Float]
|
30238
|
+
attr_accessor :score
|
30239
|
+
|
30240
|
+
def initialize(**args)
|
30241
|
+
update!(**args)
|
30242
|
+
end
|
30243
|
+
|
30244
|
+
# Update properties of this object
|
30245
|
+
def update!(**args)
|
30246
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
30247
|
+
@label = args[:label] if args.key?(:label)
|
30248
|
+
@score = args[:score] if args.key?(:score)
|
30249
|
+
end
|
30250
|
+
end
|
30251
|
+
|
30252
|
+
#
|
30253
|
+
class LearningServingLlmLanguageFilterResult
|
30254
|
+
include Google::Apis::Core::Hashable
|
30255
|
+
|
30256
|
+
# False when query or response should be filtered out due to unsupported
|
30257
|
+
# language.
|
30258
|
+
# Corresponds to the JSON property `allowed`
|
30259
|
+
# @return [Boolean]
|
30260
|
+
attr_accessor :allowed
|
30261
|
+
alias_method :allowed?, :allowed
|
30262
|
+
|
30263
|
+
# Language of the query or response.
|
30264
|
+
# Corresponds to the JSON property `detectedLanguage`
|
30265
|
+
# @return [String]
|
30266
|
+
attr_accessor :detected_language
|
30267
|
+
|
30268
|
+
# Probability of the language predicted as returned by LangID.
|
30269
|
+
# Corresponds to the JSON property `detectedLanguageProbability`
|
30270
|
+
# @return [Float]
|
30271
|
+
attr_accessor :detected_language_probability
|
30272
|
+
|
30273
|
+
def initialize(**args)
|
30274
|
+
update!(**args)
|
30275
|
+
end
|
30276
|
+
|
30277
|
+
# Update properties of this object
|
30278
|
+
def update!(**args)
|
30279
|
+
@allowed = args[:allowed] if args.key?(:allowed)
|
30280
|
+
@detected_language = args[:detected_language] if args.key?(:detected_language)
|
30281
|
+
@detected_language_probability = args[:detected_language_probability] if args.key?(:detected_language_probability)
|
30282
|
+
end
|
30283
|
+
end
|
30284
|
+
|
30285
|
+
# LINT.IfChange This metadata contains additional information required for
|
30286
|
+
# debugging.
|
30287
|
+
class LearningServingLlmMessageMetadata
|
30288
|
+
include Google::Apis::Core::Hashable
|
30289
|
+
|
30290
|
+
# Summary of classifier output. We attach this to all messages regardless of
|
30291
|
+
# whether classification rules triggered or not.
|
30292
|
+
# Corresponds to the JSON property `classifierSummary`
|
30293
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootClassifierOutputSummary]
|
30294
|
+
attr_accessor :classifier_summary
|
30295
|
+
|
30296
|
+
#
|
30297
|
+
# Corresponds to the JSON property `currentStreamTextLength`
|
30298
|
+
# @return [Fixnum]
|
30299
|
+
attr_accessor :current_stream_text_length
|
30300
|
+
|
30301
|
+
# Whether the corresponding message has been deleted.
|
30302
|
+
# Corresponds to the JSON property `deleted`
|
30303
|
+
# @return [Boolean]
|
30304
|
+
attr_accessor :deleted
|
30305
|
+
alias_method :deleted?, :deleted
|
30306
|
+
|
30307
|
+
# Metadata for filters that triggered.
|
30308
|
+
# Corresponds to the JSON property `filterMeta`
|
30309
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadata>]
|
30310
|
+
attr_accessor :filter_meta
|
30311
|
+
|
30312
|
+
# This score is finally used for ranking the message. This will be same as the
|
30313
|
+
# score present in `Message.score` field.
|
30314
|
+
# Corresponds to the JSON property `finalMessageScore`
|
30315
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRootScore]
|
30316
|
+
attr_accessor :final_message_score
|
30317
|
+
|
30318
|
+
# NOT YET IMPLEMENTED.
|
30319
|
+
# Corresponds to the JSON property `finishReason`
|
30320
|
+
# @return [String]
|
30321
|
+
attr_accessor :finish_reason
|
30322
|
+
|
30323
|
+
# Applies to Response message only. Indicates whether the message is a fallback
|
30324
|
+
# and the response would have otherwise been empty.
|
30325
|
+
# Corresponds to the JSON property `isFallback`
|
30326
|
+
# @return [Boolean]
|
30327
|
+
attr_accessor :is_fallback
|
30328
|
+
alias_method :is_fallback?, :is_fallback
|
30329
|
+
|
30330
|
+
# Result from nlp_saft DetectLanguage method. Currently the predicted language
|
30331
|
+
# code and language probability is used.
|
30332
|
+
# Corresponds to the JSON property `langidResult`
|
30333
|
+
# @return [Google::Apis::AiplatformV1::NlpSaftLangIdResult]
|
30334
|
+
attr_accessor :langid_result
|
30335
|
+
|
30336
|
+
# Detected language.
|
30337
|
+
# Corresponds to the JSON property `language`
|
30338
|
+
# @return [String]
|
30339
|
+
attr_accessor :language
|
30340
|
+
|
30341
|
+
# The LM prefix used to generate this response.
|
30342
|
+
# Corresponds to the JSON property `lmPrefix`
|
30343
|
+
# @return [String]
|
30344
|
+
attr_accessor :lm_prefix
|
30345
|
+
|
30346
|
+
# The original text generated by LLM. This is the raw output for debugging
|
30347
|
+
# purposes.
|
30348
|
+
# Corresponds to the JSON property `originalText`
|
30349
|
+
# @return [String]
|
30350
|
+
attr_accessor :original_text
|
30351
|
+
|
30352
|
+
# NOT YET IMPLEMENTED. Applies to streaming only. Number of tokens decoded /
|
30353
|
+
# emitted by the model as part of this stream. This may be different from
|
30354
|
+
# token_count, which contains number of tokens returned in this response after
|
30355
|
+
# any response rewriting / truncation.
|
30356
|
+
# Corresponds to the JSON property `perStreamDecodedTokenCount`
|
30357
|
+
# @return [Fixnum]
|
30358
|
+
attr_accessor :per_stream_decoded_token_count
|
30359
|
+
|
30360
|
+
# Results of running RAI on the query or this response candidate. One output per
|
30361
|
+
# rai_config. It will be populated regardless of whether the threshold is
|
30362
|
+
# exceeded or not.
|
30363
|
+
# Corresponds to the JSON property `raiOutputs`
|
30364
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput>]
|
30365
|
+
attr_accessor :rai_outputs
|
30366
|
+
|
30367
|
+
# The recitation result for one input
|
30368
|
+
# Corresponds to the JSON property `recitationResult`
|
30369
|
+
# @return [Google::Apis::AiplatformV1::LearningGenaiRecitationRecitationResult]
|
30370
|
+
attr_accessor :recitation_result
|
30371
|
+
|
30372
|
+
# NOT YET IMPLEMENTED. Number of tokens returned as part of this candidate.
|
30373
|
+
# Corresponds to the JSON property `returnTokenCount`
|
30374
|
+
# @return [Fixnum]
|
30375
|
+
attr_accessor :return_token_count
|
30376
|
+
|
30377
|
+
# All the different scores for a message are logged here.
|
30378
|
+
# Corresponds to the JSON property `scores`
|
30379
|
+
# @return [Array<Google::Apis::AiplatformV1::LearningGenaiRootScore>]
|
30380
|
+
attr_accessor :scores
|
30381
|
+
|
30382
|
+
# Whether the response is terminated during streaming return. Only used for
|
30383
|
+
# streaming requests.
|
30384
|
+
# Corresponds to the JSON property `streamTerminated`
|
30385
|
+
# @return [Boolean]
|
30386
|
+
attr_accessor :stream_terminated
|
30387
|
+
alias_method :stream_terminated?, :stream_terminated
|
30388
|
+
|
30389
|
+
# NOT YET IMPLEMENTED. Aggregated number of total tokens decoded so far. For
|
30390
|
+
# streaming, this is sum of all the tokens decoded so far i.e. aggregated count.
|
30391
|
+
# Corresponds to the JSON property `totalDecodedTokenCount`
|
30392
|
+
# @return [Fixnum]
|
30393
|
+
attr_accessor :total_decoded_token_count
|
30394
|
+
|
30395
|
+
# Translated user-prompt used for RAI post processing. This is for internal
|
30396
|
+
# processing only. We will translate in pre-processor and pass the translated
|
30397
|
+
# text to the post processor using this field. It will be empty if non of the
|
30398
|
+
# signals requested need translation.
|
30399
|
+
# Corresponds to the JSON property `translatedUserPrompts`
|
30400
|
+
# @return [Array<String>]
|
30401
|
+
attr_accessor :translated_user_prompts
|
30402
|
+
|
30403
|
+
# The RAI results for a given text.
|
30404
|
+
# Corresponds to the JSON property `vertexRaiResult`
|
30405
|
+
# @return [Google::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult]
|
30406
|
+
attr_accessor :vertex_rai_result
|
30407
|
+
|
30408
|
+
def initialize(**args)
|
30409
|
+
update!(**args)
|
30410
|
+
end
|
30411
|
+
|
30412
|
+
# Update properties of this object
|
30413
|
+
def update!(**args)
|
30414
|
+
@classifier_summary = args[:classifier_summary] if args.key?(:classifier_summary)
|
30415
|
+
@current_stream_text_length = args[:current_stream_text_length] if args.key?(:current_stream_text_length)
|
30416
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
30417
|
+
@filter_meta = args[:filter_meta] if args.key?(:filter_meta)
|
30418
|
+
@final_message_score = args[:final_message_score] if args.key?(:final_message_score)
|
30419
|
+
@finish_reason = args[:finish_reason] if args.key?(:finish_reason)
|
30420
|
+
@is_fallback = args[:is_fallback] if args.key?(:is_fallback)
|
30421
|
+
@langid_result = args[:langid_result] if args.key?(:langid_result)
|
30422
|
+
@language = args[:language] if args.key?(:language)
|
30423
|
+
@lm_prefix = args[:lm_prefix] if args.key?(:lm_prefix)
|
30424
|
+
@original_text = args[:original_text] if args.key?(:original_text)
|
30425
|
+
@per_stream_decoded_token_count = args[:per_stream_decoded_token_count] if args.key?(:per_stream_decoded_token_count)
|
30426
|
+
@rai_outputs = args[:rai_outputs] if args.key?(:rai_outputs)
|
30427
|
+
@recitation_result = args[:recitation_result] if args.key?(:recitation_result)
|
30428
|
+
@return_token_count = args[:return_token_count] if args.key?(:return_token_count)
|
30429
|
+
@scores = args[:scores] if args.key?(:scores)
|
30430
|
+
@stream_terminated = args[:stream_terminated] if args.key?(:stream_terminated)
|
30431
|
+
@total_decoded_token_count = args[:total_decoded_token_count] if args.key?(:total_decoded_token_count)
|
30432
|
+
@translated_user_prompts = args[:translated_user_prompts] if args.key?(:translated_user_prompts)
|
30433
|
+
@vertex_rai_result = args[:vertex_rai_result] if args.key?(:vertex_rai_result)
|
30434
|
+
end
|
30435
|
+
end
|
30436
|
+
|
30437
|
+
#
|
30438
|
+
class NlpSaftLangIdLocalesResult
|
30439
|
+
include Google::Apis::Core::Hashable
|
30440
|
+
|
30441
|
+
# List of locales in which the text would be considered acceptable. Sorted in
|
30442
|
+
# descending order according to each locale's respective likelihood. For example,
|
30443
|
+
# if a Portuguese text is acceptable in both Brazil and Portugal, but is more
|
30444
|
+
# strongly associated with Brazil, then the predictions would be ["pt-BR", "pt-
|
30445
|
+
# PT"], in that order. May be empty, indicating that the model did not predict
|
30446
|
+
# any acceptable locales.
|
30447
|
+
# Corresponds to the JSON property `predictions`
|
30448
|
+
# @return [Array<Google::Apis::AiplatformV1::NlpSaftLangIdLocalesResultLocale>]
|
30449
|
+
attr_accessor :predictions
|
30450
|
+
|
30451
|
+
def initialize(**args)
|
30452
|
+
update!(**args)
|
30453
|
+
end
|
30454
|
+
|
30455
|
+
# Update properties of this object
|
30456
|
+
def update!(**args)
|
30457
|
+
@predictions = args[:predictions] if args.key?(:predictions)
|
30458
|
+
end
|
30459
|
+
end
|
30460
|
+
|
30461
|
+
#
|
30462
|
+
class NlpSaftLangIdLocalesResultLocale
|
30463
|
+
include Google::Apis::Core::Hashable
|
30464
|
+
|
30465
|
+
# A BCP 47 language code that includes region information. For example, "pt-BR"
|
30466
|
+
# or "pt-PT". This field will always be populated.
|
30467
|
+
# Corresponds to the JSON property `languageCode`
|
30468
|
+
# @return [String]
|
30469
|
+
attr_accessor :language_code
|
30470
|
+
|
30471
|
+
def initialize(**args)
|
30472
|
+
update!(**args)
|
30473
|
+
end
|
30474
|
+
|
30475
|
+
# Update properties of this object
|
30476
|
+
def update!(**args)
|
30477
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
30478
|
+
end
|
30479
|
+
end
|
30480
|
+
|
30481
|
+
#
|
30482
|
+
class NlpSaftLangIdResult
|
30483
|
+
include Google::Apis::Core::Hashable
|
30484
|
+
|
30485
|
+
# The version of the model used to create these annotations.
|
30486
|
+
# Corresponds to the JSON property `modelVersion`
|
30487
|
+
# @return [String]
|
30488
|
+
attr_accessor :model_version
|
30489
|
+
|
30490
|
+
# This field stores the n-best list of possible BCP 47 language code strings for
|
30491
|
+
# a given input sorted in descending order according to each code's respective
|
30492
|
+
# probability.
|
30493
|
+
# Corresponds to the JSON property `predictions`
|
30494
|
+
# @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpan>]
|
30495
|
+
attr_accessor :predictions
|
30496
|
+
|
30497
|
+
# This field stores language predictions of subspans of the input, when
|
30498
|
+
# available. Each LanguageSpanSequence is a sequence of LanguageSpans. A
|
30499
|
+
# particular sequence of LanguageSpans has an associated probability, and need
|
30500
|
+
# not necessarily cover the entire input. If no language could be predicted for
|
30501
|
+
# any span, then this field may be empty.
|
30502
|
+
# Corresponds to the JSON property `spanPredictions`
|
30503
|
+
# @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpanSequence>]
|
30504
|
+
attr_accessor :span_predictions
|
30505
|
+
|
30506
|
+
def initialize(**args)
|
30507
|
+
update!(**args)
|
30508
|
+
end
|
30509
|
+
|
30510
|
+
# Update properties of this object
|
30511
|
+
def update!(**args)
|
30512
|
+
@model_version = args[:model_version] if args.key?(:model_version)
|
30513
|
+
@predictions = args[:predictions] if args.key?(:predictions)
|
30514
|
+
@span_predictions = args[:span_predictions] if args.key?(:span_predictions)
|
30515
|
+
end
|
30516
|
+
end
|
30517
|
+
|
30518
|
+
#
|
30519
|
+
class NlpSaftLanguageSpan
|
30520
|
+
include Google::Apis::Core::Hashable
|
30521
|
+
|
30522
|
+
#
|
30523
|
+
# Corresponds to the JSON property `end`
|
30524
|
+
# @return [Fixnum]
|
30525
|
+
attr_accessor :end
|
30526
|
+
|
30527
|
+
# A BCP 47 language code for this span.
|
30528
|
+
# Corresponds to the JSON property `languageCode`
|
30529
|
+
# @return [String]
|
30530
|
+
attr_accessor :language_code
|
30531
|
+
|
30532
|
+
# Optional field containing any information that was predicted about the
|
30533
|
+
# specific locale(s) of the span.
|
30534
|
+
# Corresponds to the JSON property `locales`
|
30535
|
+
# @return [Google::Apis::AiplatformV1::NlpSaftLangIdLocalesResult]
|
30536
|
+
attr_accessor :locales
|
30537
|
+
|
30538
|
+
# A probability associated with this prediction.
|
30539
|
+
# Corresponds to the JSON property `probability`
|
30540
|
+
# @return [Float]
|
30541
|
+
attr_accessor :probability
|
30542
|
+
|
30543
|
+
# Start and end byte offsets, inclusive, within the given input string. A value
|
30544
|
+
# of -1 implies that this field is not set. Both fields must either be set with
|
30545
|
+
# a nonnegative value or both are unset. If both are unset then this
|
30546
|
+
# LanguageSpan applies to the entire input.
|
30547
|
+
# Corresponds to the JSON property `start`
|
30548
|
+
# @return [Fixnum]
|
30549
|
+
attr_accessor :start
|
30550
|
+
|
30551
|
+
def initialize(**args)
|
30552
|
+
update!(**args)
|
30553
|
+
end
|
30554
|
+
|
30555
|
+
# Update properties of this object
|
30556
|
+
def update!(**args)
|
30557
|
+
@end = args[:end] if args.key?(:end)
|
30558
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
30559
|
+
@locales = args[:locales] if args.key?(:locales)
|
30560
|
+
@probability = args[:probability] if args.key?(:probability)
|
30561
|
+
@start = args[:start] if args.key?(:start)
|
30562
|
+
end
|
30563
|
+
end
|
30564
|
+
|
30565
|
+
#
|
30566
|
+
class NlpSaftLanguageSpanSequence
|
30567
|
+
include Google::Apis::Core::Hashable
|
30568
|
+
|
30569
|
+
# A sequence of LanguageSpan objects, each assigning a language to a subspan of
|
30570
|
+
# the input.
|
30571
|
+
# Corresponds to the JSON property `languageSpans`
|
30572
|
+
# @return [Array<Google::Apis::AiplatformV1::NlpSaftLanguageSpan>]
|
30573
|
+
attr_accessor :language_spans
|
30574
|
+
|
30575
|
+
# The probability of this sequence of LanguageSpans.
|
30576
|
+
# Corresponds to the JSON property `probability`
|
30577
|
+
# @return [Float]
|
30578
|
+
attr_accessor :probability
|
30579
|
+
|
30580
|
+
def initialize(**args)
|
30581
|
+
update!(**args)
|
30582
|
+
end
|
30583
|
+
|
30584
|
+
# Update properties of this object
|
30585
|
+
def update!(**args)
|
30586
|
+
@language_spans = args[:language_spans] if args.key?(:language_spans)
|
30587
|
+
@probability = args[:probability] if args.key?(:probability)
|
30588
|
+
end
|
30589
|
+
end
|
30590
|
+
|
30591
|
+
# This is proto2's version of MessageSet.
|
30592
|
+
class Proto2BridgeMessageSet
|
30593
|
+
include Google::Apis::Core::Hashable
|
30594
|
+
|
30595
|
+
def initialize(**args)
|
30596
|
+
update!(**args)
|
30597
|
+
end
|
30598
|
+
|
30599
|
+
# Update properties of this object
|
30600
|
+
def update!(**args)
|
30601
|
+
end
|
30602
|
+
end
|
30603
|
+
|
30604
|
+
# Wire-format for a Status object
|
30605
|
+
class UtilStatusProto
|
30606
|
+
include Google::Apis::Core::Hashable
|
30607
|
+
|
30608
|
+
# The canonical error code (see codes.proto) that most closely corresponds to
|
30609
|
+
# this status. This may be missing, and in the common case of the generic space,
|
30610
|
+
# it definitely will be.
|
30611
|
+
# Corresponds to the JSON property `canonicalCode`
|
30612
|
+
# @return [Fixnum]
|
30613
|
+
attr_accessor :canonical_code
|
30614
|
+
|
30615
|
+
# Numeric code drawn from the space specified below. Often, this is the
|
30616
|
+
# canonical error space, and code is drawn from google3/util/task/codes.proto
|
30617
|
+
# Corresponds to the JSON property `code`
|
30618
|
+
# @return [Fixnum]
|
30619
|
+
attr_accessor :code
|
30620
|
+
|
30621
|
+
# Detail message
|
30622
|
+
# Corresponds to the JSON property `message`
|
30623
|
+
# @return [String]
|
30624
|
+
attr_accessor :message
|
30625
|
+
|
30626
|
+
# This is proto2's version of MessageSet.
|
30627
|
+
# Corresponds to the JSON property `messageSet`
|
30628
|
+
# @return [Google::Apis::AiplatformV1::Proto2BridgeMessageSet]
|
30629
|
+
attr_accessor :message_set
|
30630
|
+
|
30631
|
+
# The following are usually only present when code != 0 Space to which this
|
30632
|
+
# status belongs
|
30633
|
+
# Corresponds to the JSON property `space`
|
30634
|
+
# @return [String]
|
30635
|
+
attr_accessor :space
|
30636
|
+
|
30637
|
+
def initialize(**args)
|
30638
|
+
update!(**args)
|
30639
|
+
end
|
30640
|
+
|
30641
|
+
# Update properties of this object
|
30642
|
+
def update!(**args)
|
30643
|
+
@canonical_code = args[:canonical_code] if args.key?(:canonical_code)
|
30644
|
+
@code = args[:code] if args.key?(:code)
|
30645
|
+
@message = args[:message] if args.key?(:message)
|
30646
|
+
@message_set = args[:message_set] if args.key?(:message_set)
|
30647
|
+
@space = args[:space] if args.key?(:space)
|
30648
|
+
end
|
30649
|
+
end
|
28167
30650
|
end
|
28168
30651
|
end
|
28169
30652
|
end
|