Table of Contents

Enum GeminiFinishReason

Defines the reason why the model stopped generating tokens.

public enum GeminiFinishReason
Extension Methods

Fields

[EnumMember(Value = "BLOCKLIST")] BlockList = 7

Token generation stopped because the content contains forbidden terms.

[EnumMember(Value = "LANGUAGE")] Language = 5

The response candidate content was flagged for using an unsupported language.

[EnumMember(Value = "MALFORMED_FUNCTION_CALL")] MalformedFunctionCall = 10

The function call generated by the model is invalid.

[EnumMember(Value = "MAX_TOKENS")] MaxTokens = 2

The maximum number of tokens as specified in the request was reached.

[EnumMember(Value = "OTHER")] Other = 6

Unknown reason.

[EnumMember(Value = "PROHIBITED_CONTENT")] ProhibitedContent = 8

Token generation stopped for potentially containing prohibited content.

[EnumMember(Value = "RECITATION")] Recitation = 4

The candidate content was flagged for recitation reasons.

[EnumMember(Value = "SPII")] SPII = 9

Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).

[EnumMember(Value = "SAFETY")] Safety = 3

The candidate content was flagged for safety reasons.

[EnumMember(Value = "STOP")] Stop = 1

Natural stop point of the model or provided stop sequence.

[EnumMember(Value = "FINISH_REASON_UNSPECIFIED")] Unspecified = 0

Default value. This value is unused.