Class: Google::Apis::AiplatformV1::LearningServingLlmMessageMetadata

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

LINT.IfChange This metadata contains additional information required for debugging.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LearningServingLlmMessageMetadata

Returns a new instance of LearningServingLlmMessageMetadata.



32989
32990
32991
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32989

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#classifier_summaryGoogle::Apis::AiplatformV1::LearningGenaiRootClassifierOutputSummary

Summary of classifier output. We attach this to all messages regardless of whether classification rules triggered or not. Corresponds to the JSON property classifierSummary



32859
32860
32861
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32859

def classifier_summary
  @classifier_summary
end

#codey_outputGoogle::Apis::AiplatformV1::LearningGenaiRootCodeyOutput

Top-level wrapper used to store all things codey-related. Corresponds to the JSON property codeyOutput



32864
32865
32866
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32864

def codey_output
  @codey_output
end

#current_stream_text_lengthFixnum

Corresponds to the JSON property currentStreamTextLength

Returns:

  • (Fixnum)


32869
32870
32871
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32869

def current_stream_text_length
  @current_stream_text_length
end

#deletedBoolean Also known as: deleted?

Whether the corresponding message has been deleted. Corresponds to the JSON property deleted

Returns:

  • (Boolean)


32874
32875
32876
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32874

def deleted
  @deleted
end

#filter_metaArray<Google::Apis::AiplatformV1::LearningGenaiRootFilterMetadata>

Metadata for filters that triggered. Corresponds to the JSON property filterMeta



32880
32881
32882
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32880

def filter_meta
  @filter_meta
end

#final_message_scoreGoogle::Apis::AiplatformV1::LearningGenaiRootScore

This score is finally used for ranking the message. This will be same as the score present in Message.score field. Corresponds to the JSON property finalMessageScore



32886
32887
32888
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32886

def final_message_score
  @final_message_score
end

#finish_reasonString

NOT YET IMPLEMENTED. Corresponds to the JSON property finishReason

Returns:

  • (String)


32891
32892
32893
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32891

def finish_reason
  @finish_reason
end

#grounding_metadataGoogle::Apis::AiplatformV1::LearningGenaiRootGroundingMetadata

Corresponds to the JSON property groundingMetadata



32896
32897
32898
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32896

def 
  @grounding_metadata
end

#is_codeBoolean Also known as: is_code?

Applies to streaming response message only. Whether the message is a code. Corresponds to the JSON property isCode

Returns:

  • (Boolean)


32901
32902
32903
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32901

def is_code
  @is_code
end

#is_fallbackBoolean Also known as: is_fallback?

Applies to Response message only. Indicates whether the message is a fallback and the response would have otherwise been empty. Corresponds to the JSON property isFallback

Returns:

  • (Boolean)


32908
32909
32910
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32908

def is_fallback
  @is_fallback
end

#langid_resultGoogle::Apis::AiplatformV1::NlpSaftLangIdResult

Result from nlp_saft DetectLanguage method. Currently the predicted language code and language probability is used. Corresponds to the JSON property langidResult



32915
32916
32917
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32915

def langid_result
  @langid_result
end

#languageString

Detected language. Corresponds to the JSON property language

Returns:

  • (String)


32920
32921
32922
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32920

def language
  @language
end

#lm_prefixString

The LM prefix used to generate this response. Corresponds to the JSON property lmPrefix

Returns:

  • (String)


32925
32926
32927
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32925

def lm_prefix
  @lm_prefix
end

#original_textString

The original text generated by LLM. This is the raw output for debugging purposes. Corresponds to the JSON property originalText

Returns:

  • (String)


32931
32932
32933
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32931

def original_text
  @original_text
end

#per_stream_decoded_token_countFixnum

NOT YET IMPLEMENTED. Applies to streaming only. Number of tokens decoded / emitted by the model as part of this stream. This may be different from token_count, which contains number of tokens returned in this response after any response rewriting / truncation. Corresponds to the JSON property perStreamDecodedTokenCount

Returns:

  • (Fixnum)


32939
32940
32941
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32939

def per_stream_decoded_token_count
  @per_stream_decoded_token_count
end

#rai_outputsArray<Google::Apis::AiplatformV1::LearningGenaiRootRaiOutput>

Results of running RAI on the query or this response candidate. One output per rai_config. It will be populated regardless of whether the threshold is exceeded or not. Corresponds to the JSON property raiOutputs



32946
32947
32948
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32946

def rai_outputs
  @rai_outputs
end

#recitation_resultGoogle::Apis::AiplatformV1::LearningGenaiRecitationRecitationResult

The recitation result for one input Corresponds to the JSON property recitationResult



32951
32952
32953
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32951

def recitation_result
  @recitation_result
end

#return_token_countFixnum

NOT YET IMPLEMENTED. Number of tokens returned as part of this candidate. Corresponds to the JSON property returnTokenCount

Returns:

  • (Fixnum)


32956
32957
32958
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32956

def return_token_count
  @return_token_count
end

#scoresArray<Google::Apis::AiplatformV1::LearningGenaiRootScore>

All the different scores for a message are logged here. Corresponds to the JSON property scores



32961
32962
32963
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32961

def scores
  @scores
end

#stream_terminatedBoolean Also known as: stream_terminated?

Whether the response is terminated during streaming return. Only used for streaming requests. Corresponds to the JSON property streamTerminated

Returns:

  • (Boolean)


32967
32968
32969
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32967

def stream_terminated
  @stream_terminated
end

#total_decoded_token_countFixnum

NOT YET IMPLEMENTED. Aggregated number of total tokens decoded so far. For streaming, this is sum of all the tokens decoded so far i.e. aggregated count. Corresponds to the JSON property totalDecodedTokenCount

Returns:

  • (Fixnum)


32974
32975
32976
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32974

def total_decoded_token_count
  @total_decoded_token_count
end

#translated_user_promptsArray<String>

Translated user-prompt used for RAI post processing. This is for internal processing only. We will translate in pre-processor and pass the translated text to the post processor using this field. It will be empty if non of the signals requested need translation. Corresponds to the JSON property translatedUserPrompts

Returns:

  • (Array<String>)


32982
32983
32984
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32982

def translated_user_prompts
  @translated_user_prompts
end

#vertex_rai_resultGoogle::Apis::AiplatformV1::CloudAiNlLlmProtoServiceRaiResult

The RAI results for a given text. Corresponds to the JSON property vertexRaiResult



32987
32988
32989
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32987

def vertex_rai_result
  @vertex_rai_result
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 32994

def update!(**args)
  @classifier_summary = args[:classifier_summary] if args.key?(:classifier_summary)
  @codey_output = args[:codey_output] if args.key?(:codey_output)
  @current_stream_text_length = args[:current_stream_text_length] if args.key?(:current_stream_text_length)
  @deleted = args[:deleted] if args.key?(:deleted)
  @filter_meta = args[:filter_meta] if args.key?(:filter_meta)
  @final_message_score = args[:final_message_score] if args.key?(:final_message_score)
  @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
  @grounding_metadata = args[:grounding_metadata] if args.key?(:grounding_metadata)
  @is_code = args[:is_code] if args.key?(:is_code)
  @is_fallback = args[:is_fallback] if args.key?(:is_fallback)
  @langid_result = args[:langid_result] if args.key?(:langid_result)
  @language = args[:language] if args.key?(:language)
  @lm_prefix = args[:lm_prefix] if args.key?(:lm_prefix)
  @original_text = args[:original_text] if args.key?(:original_text)
  @per_stream_decoded_token_count = args[:per_stream_decoded_token_count] if args.key?(:per_stream_decoded_token_count)
  @rai_outputs = args[:rai_outputs] if args.key?(:rai_outputs)
  @recitation_result = args[:recitation_result] if args.key?(:recitation_result)
  @return_token_count = args[:return_token_count] if args.key?(:return_token_count)
  @scores = args[:scores] if args.key?(:scores)
  @stream_terminated = args[:stream_terminated] if args.key?(:stream_terminated)
  @total_decoded_token_count = args[:total_decoded_token_count] if args.key?(:total_decoded_token_count)
  @translated_user_prompts = args[:translated_user_prompts] if args.key?(:translated_user_prompts)
  @vertex_rai_result = args[:vertex_rai_result] if args.key?(:vertex_rai_result)
end