Candidate

@Serializable
data class Candidate(val content: Content, val finishReason: String? = null, val index: Int? = null, val safetyRatings: List<SafetyRating>? = null, val citationMetadata: CitationMetadata? = null, val tokenCount: Int? = null, val avgLogprobs: Double? = null, val logprobsResult: LogprobsResult? = null, val groundingAttributions: List<GroundingAttribution> = emptyList(), val groundingMetadata: GroundingMetadata? = null, val urlContextMetadata: UrlContextMetadata? = null)

Represents a candidate entity with associated content and metadata.

Constructors

Link copied to clipboard
constructor(content: Content, finishReason: String? = null, index: Int? = null, safetyRatings: List<SafetyRating>? = null, citationMetadata: CitationMetadata? = null, tokenCount: Int? = null, avgLogprobs: Double? = null, logprobsResult: LogprobsResult? = null, groundingAttributions: List<GroundingAttribution> = emptyList(), groundingMetadata: GroundingMetadata? = null, urlContextMetadata: UrlContextMetadata? = null)

Properties

Link copied to clipboard
val avgLogprobs: Double?
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
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
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?