struct AI::Google::LanguageModelProviderOptions

Overview

Google-specific provider options for language model generation.

These options are passed via provider_options["google"] in CallOptions.

Included Modules

Defined in:

ai/google/google_generative_ai_options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]

Instance Method Detail

def audio_timestamp : Bool | Nil #

Enables timestamp understanding for audio-only files.


[View source]
def cached_content : String | Nil #

Cached content reference. Format: cachedContents/{cachedContent}


[View source]
def image_config : ResponseImageConfig | Nil #

Image configuration for Gemini image generation.


[View source]
def labels : Hash(String, String) | Nil #

Labels for billing reports (Vertex AI only).


[View source]
def media_resolution : String | Nil #

Media resolution setting.


[View source]
def response_modalities : Array(String) | Nil #

Response modalities (e.g., ["TEXT", "IMAGE"]).


[View source]
def retrieval_config : RetrievalConfig | Nil #

Retrieval config for location-based grounding.


[View source]
def safety_settings : Array(SafetySetting) | Nil #

Safety settings for blocking unsafe content.


[View source]
def structured_outputs : Bool | Nil #

Enable structured output (default true). Set to false to disable JSON schema validation in response.


[View source]
def thinking_config : ThinkingConfig | Nil #

Thinking configuration for models that support it.


[View source]
def threshold : String | Nil #

Standalone threshold for harm blocking (applies to all categories). Use safetySettings for per-category control.


[View source]