pub enum StopReasonV2 {
EndTurn,
MaxTokens,
ToolUse,
StopSequence,
Cancelled,
Error,
}Expand description
Re-exports of the v2 wire types per ADR 0015. v2 is shipped as
part of inferd-client 0.2 so consumers building against v2 can
reach the proto types without a separate inferd-proto dep.
Why a v2 generation ended. Carried on done frames.
Variants§
EndTurn
Model emitted the end-of-turn token cleanly. Equivalent to v1’s end.
MaxTokens
max_tokens reached.
ToolUse
Model emitted a complete tool_use block; consumer must
execute the tool and send a follow-up request with a
tool_result content block.
StopSequence
Generation hit a configured stop sequence (reserved for v2.x; v2.0 daemons may not emit this).
Cancelled
Caller disconnected or otherwise cancelled.
Error
Generation aborted; partial output was already emitted.
Trait Implementations§
Source§impl Clone for StopReasonV2
impl Clone for StopReasonV2
Source§fn clone(&self) -> StopReasonV2
fn clone(&self) -> StopReasonV2
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 moreSource§impl Debug for StopReasonV2
impl Debug for StopReasonV2
Source§impl<'de> Deserialize<'de> for StopReasonV2
impl<'de> Deserialize<'de> for StopReasonV2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StopReasonV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StopReasonV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StopReasonV2
impl PartialEq for StopReasonV2
Source§fn eq(&self, other: &StopReasonV2) -> bool
fn eq(&self, other: &StopReasonV2) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StopReasonV2
impl Serialize for StopReasonV2
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for StopReasonV2
impl Eq for StopReasonV2
impl StructuralPartialEq for StopReasonV2
Auto Trait Implementations§
impl Freeze for StopReasonV2
impl RefUnwindSafe for StopReasonV2
impl Send for StopReasonV2
impl Sync for StopReasonV2
impl Unpin for StopReasonV2
impl UnsafeUnpin for StopReasonV2
impl UnwindSafe for StopReasonV2
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