pub struct ReasoningConfig {
pub start_thinking_token_id: u32,
pub end_thinking_token_id: u32,
pub thinking_ratio: f64,
}Expand description
Configuration for reasoning/thinking token output in the mocker.
When set, the mocker wraps the first portion of each response in thinking
boundary tokens: [start_token, random..., end_token, random...].
Fields§
§start_thinking_token_id: u32§end_thinking_token_id: u32§thinking_ratio: f64Implementations§
Source§impl ReasoningConfig
impl ReasoningConfig
Sourcepub fn num_thinking_tokens(&self, max_output_tokens: usize) -> usize
pub fn num_thinking_tokens(&self, max_output_tokens: usize) -> usize
Number of thinking tokens (including start/end boundaries) for a given osl. Returns 0 if osl < 2 (thinking disabled). Otherwise clamps to [2, osl].
Sourcepub fn num_response_tokens(&self, max_output_tokens: usize) -> usize
pub fn num_response_tokens(&self, max_output_tokens: usize) -> usize
Number of response tokens after the thinking block.
Trait Implementations§
Source§impl Clone for ReasoningConfig
impl Clone for ReasoningConfig
Source§fn clone(&self) -> ReasoningConfig
fn clone(&self) -> ReasoningConfig
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 ReasoningConfig
impl Debug for ReasoningConfig
Source§impl<'de> Deserialize<'de> for ReasoningConfig
impl<'de> Deserialize<'de> for ReasoningConfig
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 Serialize for ReasoningConfig
impl Serialize for ReasoningConfig
Source§impl Validate for ReasoningConfig
impl Validate for ReasoningConfig
Source§impl<'v_a> ValidateArgs<'v_a> for ReasoningConfig
impl<'v_a> ValidateArgs<'v_a> for ReasoningConfig
Auto Trait Implementations§
impl Freeze for ReasoningConfig
impl RefUnwindSafe for ReasoningConfig
impl Send for ReasoningConfig
impl Sync for ReasoningConfig
impl Unpin for ReasoningConfig
impl UnsafeUnpin for ReasoningConfig
impl UnwindSafe for ReasoningConfig
Blanket Implementations§
impl<T> BlockMetadata for T
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