Gemini.Types.Enums.FinishReason (GeminiEx v0.10.0)

Copy Markdown View Source

Reasons why generation finished.

Values

  • :unspecified - Default/unknown reason
  • :stop - Natural stopping point (EOS token)
  • :max_tokens - Maximum token limit reached
  • :safety - Blocked due to safety concerns
  • :recitation - Blocked due to recitation/copyright
  • :language - Unsupported language
  • :other - Other/unspecified reason
  • :blocklist - Content matched a blocklist
  • :prohibited_content - Prohibited content detected
  • :spii - Sensitive PII detected
  • :malformed_function_call - Invalid function call format
  • :image_safety - Image safety issue

Summary

Types

t()

@type t() ::
  :unspecified
  | :stop
  | :max_tokens
  | :safety
  | :recitation
  | :language
  | :other
  | :blocklist
  | :prohibited_content
  | :spii
  | :malformed_function_call
  | :image_safety

Functions

from_api(arg1)

@spec from_api(String.t() | nil) :: t() | nil

to_api(atom)

@spec to_api(t()) :: String.t()