pub enum FinishReason {
Show 14 variants
FinishReasonUnspecified,
Stop,
MaxTokens,
Safety,
Recitation,
Language,
Other,
Blocklist,
ProhibitedContent,
Spii,
MalformedFunctionCall,
ImageSafety,
UnexpectedToolCall,
TooManyToolCalls,
}
Expand description
Reason why generation finished
Variants§
FinishReasonUnspecified
Default value. This value is unused.
Stop
Natural stop point of the model or provided stop sequence.
MaxTokens
The maximum number of tokens as specified in the request was reached.
Safety
The response candidate content was flagged for safety reasons.
Recitation
The response candidate content was flagged for recitation reasons.
Language
The response candidate content was flagged for using an unsupported language.
Other
Unknown reason.
Blocklist
Token generation stopped because the content contains forbidden terms.
ProhibitedContent
Token generation stopped for potentially containing prohibited content.
Spii
Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).
MalformedFunctionCall
The function call generated by the model is invalid.
ImageSafety
Token generation stopped because generated images contain safety violations.
UnexpectedToolCall
Model generated a tool call but no tools were enabled in the request.
TooManyToolCalls
Model called too many tools consecutively, thus the system exited execution.
Trait Implementations§
Source§impl Clone for FinishReason
impl Clone for FinishReason
Source§fn clone(&self) -> FinishReason
fn clone(&self) -> FinishReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more