pub enum DisableStreaming {
Bool(bool),
ToolCalling,
}Expand description
Disable streaming options.
Mirrors Python’s disable_streaming: bool | Literal["tool_calling"] field.
Variants§
Bool(bool)
Boolean value: true = always disable, false = never disable.
ToolCalling
Literal “tool_calling”: disable only when tools are present.
Implementations§
Source§impl DisableStreaming
impl DisableStreaming
Sourcepub fn should_disable(&self, has_tools: bool) -> bool
pub fn should_disable(&self, has_tools: bool) -> bool
Check if streaming should be bypassed.
§Arguments
has_tools- Whether tools are present in the current call.
Trait Implementations§
Source§impl Clone for DisableStreaming
impl Clone for DisableStreaming
Source§fn clone(&self) -> DisableStreaming
fn clone(&self) -> DisableStreaming
Returns a duplicate of the value. Read more
1.0.0 · 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 DisableStreaming
impl Debug for DisableStreaming
Source§impl Default for DisableStreaming
impl Default for DisableStreaming
Source§impl<'de> Deserialize<'de> for DisableStreaming
impl<'de> Deserialize<'de> for DisableStreaming
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<bool> for DisableStreaming
impl From<bool> for DisableStreaming
Source§impl PartialEq for DisableStreaming
impl PartialEq for DisableStreaming
Source§impl Serialize for DisableStreaming
impl Serialize for DisableStreaming
impl StructuralPartialEq for DisableStreaming
Auto Trait Implementations§
impl Freeze for DisableStreaming
impl RefUnwindSafe for DisableStreaming
impl Send for DisableStreaming
impl Sync for DisableStreaming
impl Unpin for DisableStreaming
impl UnwindSafe for DisableStreaming
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