Enum FinishReason
The reason the model stopped generating tokens. It is also called "finish_reason" in some APIs.
Namespace: Glitch9.AIDevKit
Assembly: Glitch9.AIDevKit.dll
Syntax
[JsonConverter(typeof(FinishReasonConverter))]
public enum FinishReason
Fields
| Name | Description |
|---|---|
| Error | Cohere specific: The generation failed due to an internal error. |
| GuardrailIntervention | Amazon Bedrock specific: when streaming classifiers intervene to handle potential policy violations |
| MaxContext | The model reached the maximum context length. |
| MaxTokens | The maximum number of tokens as specified in the request was reached. |
| None | Default value (Unused). |
| Other | Unknown reason. |
| Pause | The model paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. |
| Recitation | The content was flagged for recitation reasons. |
| Safety | The content was flagged for safety reasons. |
| Stop | Natural stop point of the model or provided stop sequence. |
| Timeout | Cohere specific: The generation was stopped because it exceeded the allowed time limit. |
| ToolCalls | The model called a tool, or function_call. |