#[non_exhaustive]pub enum CompletionReason {
Unknown,
Stop,
Length,
ToolCalls,
ContentFilter,
}Expand description
Portable semantic reason for generation completion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unknown
Provider supplied no portable classification.
Stop
The model ended normally.
Length
An output limit was reached.
ToolCalls
The model requested one or more tools.
ContentFilter
Provider safety filtering ended generation.
Trait Implementations§
Source§impl Clone for CompletionReason
impl Clone for CompletionReason
impl Copy for CompletionReason
Source§impl Debug for CompletionReason
impl Debug for CompletionReason
impl Eq for CompletionReason
Source§impl PartialEq for CompletionReason
impl PartialEq for CompletionReason
impl StructuralPartialEq for CompletionReason
Auto Trait Implementations§
impl Freeze for CompletionReason
impl RefUnwindSafe for CompletionReason
impl Send for CompletionReason
impl Sync for CompletionReason
impl Unpin for CompletionReason
impl UnsafeUnpin for CompletionReason
impl UnwindSafe for CompletionReason
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