Candidate class final
A response candidate generated from the model.
- Inheritance
-
- Object
- ProtoMessage
- Candidate
Constructors
-
Candidate({int? index, Content? content, Candidate_FinishReason finishReason = Candidate_FinishReason.$default, String? finishMessage, List<
SafetyRating> safetyRatings = const [], CitationMetadata? citationMetadata, int tokenCount = 0, List<GroundingAttribution> groundingAttributions = const [], GroundingMetadata? groundingMetadata, double avgLogprobs = 0, LogprobsResult? logprobsResult, UrlContextMetadata? urlContextMetadata}) - Candidate.fromJson(Object? j)
-
factory
Properties
- avgLogprobs → double
-
Output only. Average log probability score of the candidate.
final
- citationMetadata → CitationMetadata?
-
Output only. Citation information for model-generated candidate.
final
- content → Content?
-
Output only. Generated content returned from the model.
final
- finishMessage → String?
-
Optional. Output only. Details the reason why the model stopped generating
tokens. This is populated only when
finish_reasonis set.final - finishReason → Candidate_FinishReason
-
Optional. Output only. The reason why the model stopped generating tokens.
final
-
groundingAttributions
→ List<
GroundingAttribution> -
Output only. Attribution information for sources that contributed to a
grounded answer.
final
- groundingMetadata → GroundingMetadata?
-
Output only. Grounding metadata for the candidate.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int?
-
Output only. Index of the candidate in the list of response candidates.
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> -
List of ratings for the safety of a response candidate.
final
- tokenCount → int
-
Output only. Token count for this 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