Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Candidate

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

A response candidate generated from the model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Candidate

Returns a new instance of GoogleCloudAiplatformV1Candidate.



3074
3075
3076
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3074

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

Instance Attribute Details

#citation_metadataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1CitationMetadata

A collection of source attributions for a piece of content. Corresponds to the JSON property citationMetadata



3036
3037
3038
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3036

def 
  @citation_metadata
end

#contentGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

The base structured datatype containing multi-part content of a message. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn. Corresponds to the JSON property content



3044
3045
3046
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3044

def content
  @content
end

#finish_messageString

Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when finish_reason is set. Corresponds to the JSON property finishMessage

Returns:

  • (String)


3050
3051
3052
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3050

def finish_message
  @finish_message
end

#finish_reasonString

Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens. Corresponds to the JSON property finishReason

Returns:

  • (String)


3056
3057
3058
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3056

def finish_reason
  @finish_reason
end

#grounding_metadataGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GroundingMetadata

Metadata returned to client when grounding is enabled. Corresponds to the JSON property groundingMetadata



3061
3062
3063
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3061

def 
  @grounding_metadata
end

#indexFixnum

Output only. Index of the candidate. Corresponds to the JSON property index

Returns:

  • (Fixnum)


3066
3067
3068
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3066

def index
  @index
end

#safety_ratingsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1SafetyRating>

Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. Corresponds to the JSON property safetyRatings



3072
3073
3074
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3072

def safety_ratings
  @safety_ratings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3079
3080
3081
3082
3083
3084
3085
3086
3087
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3079

def update!(**args)
  @citation_metadata = args[:citation_metadata] if args.key?(:citation_metadata)
  @content = args[:content] if args.key?(:content)
  @finish_message = args[:finish_message] if args.key?(:finish_message)
  @finish_reason = args[:finish_reason] if args.key?(:finish_reason)
  @grounding_metadata = args[:grounding_metadata] if args.key?(:grounding_metadata)
  @index = args[:index] if args.key?(:index)
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
end