pub enum ProviderStopReason {
EndTurn,
ToolUse,
MaxTokens,
StopSequence,
ContentFilter,
Other,
}Expand description
Typed stop reason — the canonical vocabulary every provider family maps onto.
The historical free-form string let each host forward its vendor’s spelling verbatim, so the
same event arrived as end_turn, stop, STOP or FINISH_REASON_STOP depending on who was
calling. None of those decode here: a vendor word is a host-side mapping input, and Other is
the honest landing place for anything the six do not cover. Other is deliberately not a
pass-through — it carries no vendor text, because a string the kernel keeps is a string
something will eventually branch on.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for ProviderStopReason
impl Clone for ProviderStopReason
Source§fn clone(&self) -> ProviderStopReason
fn clone(&self) -> ProviderStopReason
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProviderStopReason
Source§impl Debug for ProviderStopReason
impl Debug for ProviderStopReason
Source§impl<'de> Deserialize<'de> for ProviderStopReason
impl<'de> Deserialize<'de> for ProviderStopReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ProviderStopReason
impl Display for ProviderStopReason
impl Eq for ProviderStopReason
Source§impl Hash for ProviderStopReason
impl Hash for ProviderStopReason
Source§impl Ord for ProviderStopReason
impl Ord for ProviderStopReason
Source§fn cmp(&self, other: &ProviderStopReason) -> Ordering
fn cmp(&self, other: &ProviderStopReason) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ProviderStopReason
impl PartialEq for ProviderStopReason
Source§impl PartialOrd for ProviderStopReason
impl PartialOrd for ProviderStopReason
Source§impl Serialize for ProviderStopReason
impl Serialize for ProviderStopReason
impl StructuralPartialEq for ProviderStopReason
Auto Trait Implementations§
impl Freeze for ProviderStopReason
impl RefUnwindSafe for ProviderStopReason
impl Send for ProviderStopReason
impl Sync for ProviderStopReason
impl Unpin for ProviderStopReason
impl UnsafeUnpin for ProviderStopReason
impl UnwindSafe for ProviderStopReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more