struct

Gemini::GenerateContentResponse::Candidate

Inherits JSON::Serializable < Struct < Value < Object

A response candidate generated from the model.

API Reference

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

after_initialize
Source
content

Generated content returned from the model. (Output only)

Source
content?

Generated content returned from the model. (Output only)

Source
finish_reason

The reason why the model stopped generating tokens. (Optional, Output only) If empty, the model has not stopped generating tokens.

Source
index

Index of the candidate in the list of response candidates. (Output only)

Source
safety_ratings

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

Source
token_count

Token count for this candidate. (Output only)

Source