Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Candidate

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

Overview

A response candidate generated from the model.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Candidate

Returns a new instance of GoogleCloudAiplatformV1beta1Candidate.



147
148
149
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 147

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

Instance Attribute Details

#avg_logprobsFloat

Output only. Average log probability score of the candidate. Corresponds to the JSON property avgLogprobs

Returns:

  • (Float)


99
100
101
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 99

def avg_logprobs
  @avg_logprobs
end

#citation_metadataGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1CitationMetadata

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



104
105
106
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 104

def 
  @citation_metadata
end

#contentGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1Content

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



112
113
114
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 112

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)


118
119
120
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 118

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)


124
125
126
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 124

def finish_reason
  @finish_reason
end

#grounding_metadataGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GroundingMetadata

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



129
130
131
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 129

def 
  @grounding_metadata
end

#indexFixnum

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

Returns:

  • (Fixnum)


134
135
136
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 134

def index
  @index
end

#logprobs_resultGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1LogprobsResult

Logprobs Result Corresponds to the JSON property logprobsResult



139
140
141
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 139

def logprobs_result
  @logprobs_result
end

#safety_ratingsArray<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1SafetyRating>

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



145
146
147
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 145

def safety_ratings
  @safety_ratings
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



152
153
154
155
156
157
158
159
160
161
162
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 152

def update!(**args)
  @avg_logprobs = args[:avg_logprobs] if args.key?(:avg_logprobs)
  @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)
  @logprobs_result = args[:logprobs_result] if args.key?(:logprobs_result)
  @safety_ratings = args[:safety_ratings] if args.key?(:safety_ratings)
end