Table of Contents

Class GeminiCandidate

A response candidate generated from the model.

public class GeminiCandidate : IAppendableData<GeminiCandidate>
Inheritance
GeminiCandidate
Implements
Extension Methods

Fields

AvgLogprobs

(No description provided)

public float AvgLogprobs

Field Value

float

CitationMetadata

Citation information for model-generated candidate.

public GeminiCitationMetadata CitationMetadata

Field Value

GeminiCitationMetadata

Remarks

This field may be populated with recitation information for any text included in Content.
These are passages that are "recited" from copyrighted material in the foundational LLM's training data.

Content

Generated content returned from the model.

public GeminiContent Content

Field Value

GeminiContent

FinishReason

The reason why the model stopped generating tokens.

public GeminiFinishReason FinishReason

Field Value

GeminiFinishReason

GroundingAttributions

Attribution information for sources that contributed to a grounded answer.

public GeminiGroundingAttribution[] GroundingAttributions

Field Value

GeminiGroundingAttribution[]

Remarks

This field is populated for GenerateAnswer calls.

Only available in the beta API.

Index

Index of the candidate in the list of candidates.

public int Index

Field Value

int

LogprobsResult

Log-likelihood scores for the response tokens and top tokens

public GeminiLogprobsResult LogprobsResult

Field Value

GeminiLogprobsResult

SafetyRatings

List of ratings for the safety of a response candidate There is at most one rating per category.

public GeminiSafetyRating[] SafetyRatings

Field Value

GeminiSafetyRating[]

TokenCount

Token count for this candidate.

public int TokenCount

Field Value

int

Methods

Append(GeminiCandidate)

Appends the data to the current IAppendableData<T>.

public void Append(GeminiCandidate data)

Parameters

data GeminiCandidate

The data to append.