struct Gemini::GenerateContentResponse::Candidate
- Gemini::GenerateContentResponse::Candidate
- Struct
- Value
- Object
Overview
A response candidate generated from the model.
Included Modules
- JSON::Serializable
Defined in:
gemini/response.crConstructors
Instance Method Summary
- #after_initialize
-
#content : Gemini::Content
Generated content returned from the model.
-
#content? : Gemini::Content | Nil
Generated content returned from the model.
-
#finish_reason : FinishReason | Nil
The reason why the model stopped generating tokens.
-
#index : Int32
Index of the candidate in the list of response candidates.
-
#safety_ratings : Array(SafetyRating)
List of ratings for the safety of a response candidate.
-
#token_count : Int32
Token count for this candidate.
Constructor Detail
Instance Method Detail
def finish_reason : FinishReason | Nil
#
The reason why the model stopped generating tokens. (Optional, Output only) If empty, the model has not stopped generating tokens.
def safety_ratings : Array(SafetyRating)
#
List of ratings for the safety of a response candidate. There is at most one rating per category.