Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Candidate
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Candidate
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
A response candidate generated from the model.
Instance Attribute Summary collapse
-
#avg_logprobs ⇒ Float
Output only.
-
#citation_metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CitationMetadata
A collection of citations that apply to a piece of generated content.
-
#content ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content
The structured data content of a message.
-
#finish_message ⇒ String
Output only.
-
#finish_reason ⇒ String
Output only.
-
#grounding_metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GroundingMetadata
Information about the sources that support the content of a response.
-
#index ⇒ Fixnum
Output only.
-
#logprobs_result ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LogprobsResult
The log probabilities of the tokens generated by the model.
-
#safety_ratings ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SafetyRating>
Output only.
-
#url_context_metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1UrlContextMetadata
Metadata returned when the model uses the
url_contexttool to get information from a user-provided URL.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Candidate
constructor
A new instance of GoogleCloudAiplatformV1beta1Candidate.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Candidate
Returns a new instance of GoogleCloudAiplatformV1beta1Candidate.
4332 4333 4334 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4332 def initialize(**args) update!(**args) end |
Instance Attribute Details
#avg_logprobs ⇒ Float
Output only. The average log probability of the tokens in this candidate. This
is a length-normalized score that can be used to compare the quality of
candidates of different lengths. A higher average log probability suggests a
more confident and coherent response.
Corresponds to the JSON property avgLogprobs
4270 4271 4272 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4270 def avg_logprobs @avg_logprobs end |
#citation_metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CitationMetadata
A collection of citations that apply to a piece of generated content.
Corresponds to the JSON property citationMetadata
4275 4276 4277 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4275 def @citation_metadata end |
#content ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content
The structured data content of a message. A Content message contains a role
field, which indicates the producer of the content, and a parts field, which
contains the multi-part data of the message.
Corresponds to the JSON property content
4282 4283 4284 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4282 def content @content end |
#finish_message ⇒ String
Output only. Describes the reason the model stopped generating tokens in more
detail. This field is returned only when finish_reason is set.
Corresponds to the JSON property finishMessage
4288 4289 4290 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4288 def @finish_message end |
#finish_reason ⇒ String
Output only. The reason why the model stopped generating tokens. If empty, the
model has not stopped generating.
Corresponds to the JSON property finishReason
4294 4295 4296 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4294 def finish_reason @finish_reason end |
#grounding_metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GroundingMetadata
Information about the sources that support the content of a response. When
grounding is enabled, the model returns citations for claims in the response.
This object contains the retrieved sources.
Corresponds to the JSON property groundingMetadata
4301 4302 4303 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4301 def @grounding_metadata end |
#index ⇒ Fixnum
Output only. The 0-based index of this candidate in the list of generated
responses. This is useful for distinguishing between multiple candidates when
candidate_count > 1.
Corresponds to the JSON property index
4308 4309 4310 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4308 def index @index end |
#logprobs_result ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LogprobsResult
The log probabilities of the tokens generated by the model. This is useful for
understanding the model's confidence in its predictions and for debugging. For
example, you can use log probabilities to identify when the model is making a
less confident prediction or to explore alternative responses that the model
considered. A low log probability can also indicate that the model is "
hallucinating" or generating factually incorrect information.
Corresponds to the JSON property logprobsResult
4318 4319 4320 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4318 def logprobs_result @logprobs_result end |
#safety_ratings ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SafetyRating>
Output only. A list of ratings for the safety of a response candidate. There
is at most one rating per category.
Corresponds to the JSON property safetyRatings
4324 4325 4326 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4324 def @safety_ratings end |
#url_context_metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1UrlContextMetadata
Metadata returned when the model uses the url_context tool to get
information from a user-provided URL.
Corresponds to the JSON property urlContextMetadata
4330 4331 4332 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4330 def @url_context_metadata end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4337 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) @url_context_metadata = args[:url_context_metadata] if args.key?(:url_context_metadata) end |