pub enum Stop {
String(String),
StringArray(Vec<String>),
TokenIdArray(Vec<u32>),
}Expand description
OpenAI stop configuration, with Dynamo’s token-id stop extension.
The standard OpenAI shape accepts a string or string array. Dynamo also
accepts an integer array, e.g. "stop": [576], to express token-id stop
conditions for tokenized in/out workflows. Strings like "token_id:576"
remain ordinary string stops; the token_id:<id> format is only an output
display format for logprobs.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Stop
impl<'de> Deserialize<'de> for Stop
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 From<StopConfiguration> for Stop
impl From<StopConfiguration> for Stop
Source§fn from(value: StopConfiguration) -> Self
fn from(value: StopConfiguration) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Stop
Auto Trait Implementations§
impl Freeze for Stop
impl RefUnwindSafe for Stop
impl Send for Stop
impl Sync for Stop
impl Unpin for Stop
impl UnsafeUnpin for Stop
impl UnwindSafe for Stop
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