struct

Gemini::GenerateContentResponse

Inherits JSON::Serializable < Struct < Value < Object

Response from the model supporting multiple candidate responses.

API Reference

Constructors

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

Instance methods

after_initialize
Source
candidates

Candidate responses from the model.

Source
model_version
Source
parts

A quick accessor equivalent to #candidates.first.content!.parts

Source
prompt_feedback

Returns the prompt's feedback related to the content filters.

Source
text

A quick accessor equivalent to #candidates.first.content!.parts.first.text

Source
to_s

Alias for #text

Source
usage_metadata

Metadata on the generation requests' token usage. (Output only)

Source

Nested types