struct
AI::Google::LanguageModelProviderOptions
- AI::Google::LanguageModelProviderOptions
- Struct
- Value
- Object
Overview
Google-specific provider options for language model generation.
These options are passed via provider_options["google"] in CallOptions.
Included Modules
- JSON::Serializable
Defined in:
ai/google/google_generative_ai_options.crConstructors
- .new(pull : JSON::PullParser)
- .new(response_modalities : Array(String) | Nil = nil, thinking_config : ThinkingConfig | Nil = nil, cached_content : String | Nil = nil, structured_outputs : Bool | Nil = nil, safety_settings : Array(SafetySetting) | Nil = nil, threshold : String | Nil = nil, audio_timestamp : Bool | Nil = nil, labels : Hash(String, String) | Nil = nil, media_resolution : String | Nil = nil, image_config : ResponseImageConfig | Nil = nil, retrieval_config : RetrievalConfig | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#audio_timestamp : Bool | Nil
Enables timestamp understanding for audio-only files.
-
#cached_content : String | Nil
Cached content reference.
-
#image_config : ResponseImageConfig | Nil
Image configuration for Gemini image generation.
-
#labels : Hash(String, String) | Nil
Labels for billing reports (Vertex AI only).
-
#media_resolution : String | Nil
Media resolution setting.
-
#response_modalities : Array(String) | Nil
Response modalities (e.g., ["TEXT", "IMAGE"]).
-
#retrieval_config : RetrievalConfig | Nil
Retrieval config for location-based grounding.
-
#safety_settings : Array(SafetySetting) | Nil
Safety settings for blocking unsafe content.
-
#structured_outputs : Bool | Nil
Enable structured output (default true).
-
#thinking_config : ThinkingConfig | Nil
Thinking configuration for models that support it.
-
#threshold : String | Nil
Standalone threshold for harm blocking (applies to all categories).
Constructor Detail
Instance Method Detail
Cached content reference. Format: cachedContents/{cachedContent}
Enable structured output (default true). Set to false to disable JSON schema validation in response.
Standalone threshold for harm blocking (applies to all categories). Use safetySettings for per-category control.