Gemini.Types.Enums (GeminiEx v0.8.4)

View Source

Comprehensive enumeration types for the Gemini API.

This module provides type-safe enums for all API enumeration values, including safety settings, finish reasons, task types, and more.

Usage

alias Gemini.Types.Enums.{HarmCategory, HarmBlockThreshold, TaskType}

# Create safety settings
settings = [
  %{category: HarmCategory.to_api(:harassment), threshold: HarmBlockThreshold.to_api(:medium_and_above)}
]

# Use task types for embeddings
opts = [task_type: TaskType.to_api(:retrieval_document)]