Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::Candidate.
A response candidate generated from the model.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#citation_metadata
def citation_metadata() -> ::Google::Cloud::AIPlatform::V1::CitationMetadata
Returns
- (::Google::Cloud::AIPlatform::V1::CitationMetadata) — Output only. Source attribution of the generated content.
#content
def content() -> ::Google::Cloud::AIPlatform::V1::Content
Returns
- (::Google::Cloud::AIPlatform::V1::Content) — Output only. Content parts of the candidate.
#finish_message
def finish_message() -> ::String
Returns
-
(::String) — Output only. Describes the reason the mode stopped generating tokens in
more detail. This is only filled when
finish_reason
is set.
#finish_reason
def finish_reason() -> ::Google::Cloud::AIPlatform::V1::Candidate::FinishReason
Returns
- (::Google::Cloud::AIPlatform::V1::Candidate::FinishReason) — Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
#index
def index() -> ::Integer
Returns
- (::Integer) — Output only. Index of the candidate.
#safety_ratings
def safety_ratings() -> ::Array<::Google::Cloud::AIPlatform::V1::SafetyRating>
Returns
-
(::Array<::Google::Cloud::AIPlatform::V1::SafetyRating>) — Output only. List of ratings for the safety of a response candidate.
There is at most one rating per category.