pub enum StopReason {
EndTurn,
ToolUse,
MaxTokens,
Paused,
Refusal,
Other(String),
}Expand description
Why generation stopped, normalized across providers.
Variants§
EndTurn
Natural end of the turn (stop / end_turn / stop_sequence).
ToolUse
The model wants tools to be called (tool_calls / tool_use).
MaxTokens
Token limit reached (length / max_tokens / model_context_window_exceeded).
Paused
A long-running turn was paused (pause_turn). Send the response back as-is to continue.
Refusal
The model declined for policy reasons (refusal / content_filter).
Other(String)
Any other value returned by the provider.
Trait Implementations§
Source§impl Clone for StopReason
impl Clone for StopReason
Source§impl Debug for StopReason
impl Debug for StopReason
impl Eq for StopReason
Source§impl PartialEq for StopReason
impl PartialEq for StopReason
impl StructuralPartialEq for StopReason
Auto Trait Implementations§
impl Freeze for StopReason
impl RefUnwindSafe for StopReason
impl Send for StopReason
impl Sync for StopReason
impl Unpin for StopReason
impl UnsafeUnpin for StopReason
impl UnwindSafe for StopReason
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more