module

Crig::Providers::Gemini

Constants

EMBEDDING_001 = "gemini-embedding-001"
EMBEDDING_004 = "text-embedding-004"
GEMINI_2_0_FLASH = "gemini-2.0-flash"
GEMINI_2_0_FLASH_LITE = "gemini-2.0-flash-lite"
GEMINI_2_5_FLASH = "gemini-2.5-flash"
GEMINI_2_5_FLASH_IMAGE = "gemini-2.5-flash-image"
GEMINI_2_5_FLASH_PREVIEW_04_17 = "gemini-2.5-flash-preview-04-17"
GEMINI_2_5_PRO_EXP_03_25 = "gemini-2.5-pro-exp-03-25"
GEMINI_2_5_PRO_PREVIEW_03_25 = "gemini-2.5-pro-preview-03-25"
GEMINI_2_5_PRO_PREVIEW_05_06 = "gemini-2.5-pro-preview-05-06"
GEMINI_2_5_PRO_PREVIEW_06_05 = "gemini-2.5-pro-preview-06-05"
GEMINI_3_1_FLASH_LITE_PREVIEW = "gemini-3.1-flash-lite-preview"
GEMINI_3_FLASH_PREVIEW = "gemini-3-flash-preview"
GEMINI_API_BASE_URL = "https://generativelanguage.googleapis.com"
TEXT_DOCUMENT_MEDIA_TYPES = {Crig::Completion::DocumentMediaType::TXT, Crig::Completion::DocumentMediaType::RTF, Crig::Completion::DocumentMediaType::HTML, Crig::Completion::DocumentMediaType::CSS, Crig::Completion::DocumentMediaType::MARKDOWN, Crig::Completion::DocumentMediaType::CSV, Crig::Completion::DocumentMediaType::XML, Crig::Completion::DocumentMediaType::Javascript, Crig::Completion::DocumentMediaType::Python}
TRANSCRIPTION_PREAMBLE = "Translate the provided audio exactly. Do not add additional information."

Class methods

completion_endpoint(model : String) : String
Source
create_request_body(completion_request : Crig::Completion::Request::CompletionRequest) : GenerateContentRequest
Source
extract_schema_from_composition(composition : JSON::Any | Nil) : Hash(String, JSON::Any) | Nil
Source
extract_type(type_value : JSON::Any) : String | Nil
Source
extract_type_from_composition(composition : JSON::Any | Nil) : String | Nil
Source
flatten_schema(schema : JSON::Any) : JSON::Any
Source
infer_type(object : Hash(String, JSON::Any)) : String
Source
parse_ref_path(ref_str : String) : String
Source
resolve_refs(value : JSON::Any, defs : Hash(String, JSON::Any)) : JSON::Any
Source
resolve_request_model(default_model : String, completion_request : Crig::Completion::Request::CompletionRequest) : String
Source
streaming_endpoint(model : String) : String
Source

Nested types