Candidate class final

Response candidate generated from a GenerativeModel.

Constructors

Candidate(Content content, List<SafetyRating>? safetyRatings, CitationMetadata? citationMetadata, FinishReason? finishReason, String? finishMessage, {GroundingMetadata? groundingMetadata, UrlContextMetadata? urlContextMetadata})

Properties

citationMetadata → CitationMetadata?
Citation information for model-generated candidate.
final
content → Content
Generated content returned from the model.
final
finishMessage → String?
Message for finish reason.
final
finishReason → FinishReason?
The reason why the model stopped generating tokens.
final
groundingMetadata → GroundingMetadata?
Metadata returned to the client when grounding is enabled.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
safetyRatings → List<SafetyRating>?
List of ratings for the safety of a response candidate.
final
text → String?
The concatenation of the text parts of content, if any.
no setter
urlContextMetadata → UrlContextMetadata?
Metadata returned to the client when the UrlContext tool is enabled.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited