Class Candidate
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
A response candidate generated from the model.
public class Candidate
- Inheritance
-
Candidate
- Inherited Members
- Extension Methods
Properties
AvgLogprobs
Output only. Average log probability score of the candidate.
[JsonPropertyName("avgLogprobs")]
public double? AvgLogprobs { get; set; }
Property Value
CitationMetadata
Output only. Citation information for model-generated candidate. This field may be populated with recitation information for any text included in the Content. These are passages that are "recited" from copyrighted material in the foundational LLM's training data.
[JsonPropertyName("citationMetadata")]
public CitationMetadata? CitationMetadata { get; set; }
Property Value
Content
Output only. Generated content returned from the model.
[JsonPropertyName("content")]
public Content? Content { get; set; }
Property Value
ContinuationToken
Base64-encoded token returned when FinishReason is CONTINUATION. Pass it as GenerateContentRequest.ContinuationToken to resume the response.
[JsonPropertyName("continuationToken")]
public string? ContinuationToken { get; set; }
Property Value
FinishMessage
Output only. Describes the reason the model stopped generating tokens.
[JsonPropertyName("finishMessage")]
public string? FinishMessage { get; set; }
Property Value
FinishReason
Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens.
[JsonPropertyName("finishReason")]
public FinishReason? FinishReason { get; set; }
Property Value
GroundingAttributions
Output only. Attribution information for sources that contributed to a grounded answer.
This field is populated for GenerateAnswer calls.
[JsonPropertyName("groundingAttributions")]
public List<GroundingAttribution>? GroundingAttributions { get; set; }
Property Value
GroundingMetadata
Output only. Grounding metadata for the candidate.
This field is populated for GenerateContent calls.
[JsonPropertyName("groundingMetadata")]
public GroundingMetadata? GroundingMetadata { get; set; }
Property Value
Index
Output only. Index of the candidate in the list of response candidates.
[JsonPropertyName("index")]
public int? Index { get; set; }
Property Value
- int?
LogprobsResult
Output only. Log-likelihood scores for the response tokens and top tokens
[JsonPropertyName("logprobsResult")]
public LogprobsResult? LogprobsResult { get; set; }
Property Value
SafetyRatings
List of ratings for the safety of a response candidate. There is at most one rating per category.
[JsonPropertyName("safetyRatings")]
public List<SafetyRating>? SafetyRatings { get; set; }
Property Value
TokenCount
Output only. Token count for this candidate.
[JsonPropertyName("tokenCount")]
public int? TokenCount { get; set; }
Property Value
- int?
UrlContextMetadata
Output only. Metadata related to url context retrieval tool.
[JsonPropertyName("urlContextMetadata")]
public UrlContextMetadata? UrlContextMetadata { get; set; }