Candidate class final
A response candidate generated from the model.
- Inheritance
-
- Object
- ProtoMessage
- Candidate
Constructors
-
Candidate({int index = 0, Content? content, double avgLogprobs = 0, LogprobsResult? logprobsResult, Candidate_FinishReason finishReason = Candidate_FinishReason.$default, List<
SafetyRating> safetyRatings = const [], String? finishMessage, CitationMetadata? citationMetadata, GroundingMetadata? groundingMetadata, UrlContextMetadata? urlContextMetadata}) -
Candidate.fromJson(Map<
String, dynamic> json) -
factory
Properties
- avgLogprobs → double
-
Output only. Average log probability score of the candidate.
final
- citationMetadata → CitationMetadata?
-
Output only. Source attribution of the generated content.
final
- content → Content?
-
Output only. Content parts of the candidate.
final
- finishMessage → String?
-
Output only. Describes the reason the mode stopped generating tokens in
more detail. This is only filled when
finish_reasonis set.final - finishReason → Candidate_FinishReason
-
Output only. The reason why the model stopped generating tokens.
If empty, the model has not stopped generating the tokens.
final
- groundingMetadata → GroundingMetadata?
-
Output only. Metadata specifies sources used to ground generated content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
Output only. Index of the candidate.
final
- logprobsResult → LogprobsResult?
-
Output only. Log-likelihood scores for the response tokens and top tokens
final
- qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
safetyRatings
→ List<
SafetyRating> -
Output only. List of ratings for the safety of a response candidate.
final
- urlContextMetadata → UrlContextMetadata?
-
Output only. Metadata related to url context retrieval tool.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String