Candidate

@Serializable
data class Candidate(val content: Content, val finishReason: String, val index: Int, val safetyRatings: List<SafetyRating>, val citationMetadata: CitationMetadata? = null, val tokenCount: Int? = null, val groundingAttributions: List<GroundingAttribution> = emptyList())

Represents a candidate entity with associated content and metadata.

Constructors

Link copied to clipboard
constructor(content: Content, finishReason: String, index: Int, safetyRatings: List<SafetyRating>, citationMetadata: CitationMetadata? = null, tokenCount: Int? = null, groundingAttributions: List<GroundingAttribution> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard

The io.github.ugaikit.gemini4kt.Content associated with this candidate, containing the actual content details.

Link copied to clipboard
val finishReason: String

A string describing the reason why the processing of this candidate was finished.

Link copied to clipboard
val index: Int

The index of this candidate in a sequence or batch, indicating its order or position.

Link copied to clipboard

A list of io.github.ugaikit.gemini4kt.SafetyRating objects, each representing a safety rating assigned to this candidate's content.

Link copied to clipboard
val tokenCount: Int? = null