enum

Gemini::FinishReason

Inherits Enum < Comparable < Value < Object

Defines the reason why the model stopped generating tokens.

API Reference

Constants

FinishReasonUnspecified = 0
Stop = 1
MaxTokens = 2
Safety = 3
Recitation = 4
Language = 5
Other = 6
Blocklist = 7
ProhibitedContent = 8
SPII = 9
MalformedFunctionCall = 10

Instance methods

blocklist?

Returns true if this enum value equals Blocklist

Source
finish_reason_unspecified?

Returns true if this enum value equals FinishReasonUnspecified

Source
language?

Returns true if this enum value equals Language

Source
malformed_function_call?

Returns true if this enum value equals MalformedFunctionCall

Source
max_tokens?

Returns true if this enum value equals MaxTokens

Source
other?

Returns true if this enum value equals Other

Source
prohibited_content?

Returns true if this enum value equals ProhibitedContent

Source
recitation?

Returns true if this enum value equals Recitation

Source
safety?

Returns true if this enum value equals Safety

Source
spii?

Returns true if this enum value equals SPII

Source
stop?

Returns true if this enum value equals Stop

Source