struct Gemini::GenerateContentResponse
- Gemini::GenerateContentResponse
- Struct
- Value
- Object
Overview
Response from the model supporting multiple candidate responses.
Included Modules
- JSON::Serializable
Defined in:
gemini/response.crConstructors
Instance Method Summary
- #after_initialize
-
#candidates : Array(Candidate)
Candidate responses from the model.
- #model_version : String | Nil
-
#parts
A quick accessor equivalent to
#candidates.first.content!.parts
-
#prompt_feedback : PromptFeedback
Returns the prompt's feedback related to the content filters.
-
#text
A quick accessor equivalent to
#candidates.first.content!.parts.first.text
-
#to_s
Alias for
#text
-
#usage_metadata : UsageMetadata
Metadata on the generation requests' token usage.
Constructor Detail
Instance Method Detail
def prompt_feedback : PromptFeedback
#
Returns the prompt's feedback related to the content filters.
def usage_metadata : UsageMetadata
#
Metadata on the generation requests' token usage. (Output only)