pub struct MiniMaxParser { /* private fields */ }Expand description
MiniMax M2 reasoning parser.
The MiniMax-M2 template always injects <think> in the prefill, so the model
outputs reasoning content directly. Uses always_in_reasoning=true.
Implementations§
Source§impl MiniMaxParser
impl MiniMaxParser
Trait Implementations§
Source§impl Default for MiniMaxParser
impl Default for MiniMaxParser
Source§impl ReasoningParser for MiniMaxParser
impl ReasoningParser for MiniMaxParser
Source§fn detect_and_parse_reasoning(
&mut self,
text: &str,
) -> Result<ParserResult, ParseError>
fn detect_and_parse_reasoning( &mut self, text: &str, ) -> Result<ParserResult, ParseError>
Detects and parses reasoning from the input text (one-time parsing). Read more
Source§fn parse_reasoning_streaming_incremental(
&mut self,
text: &str,
) -> Result<ParserResult, ParseError>
fn parse_reasoning_streaming_incremental( &mut self, text: &str, ) -> Result<ParserResult, ParseError>
Parses reasoning incrementally from streaming input. Read more
Source§fn model_type(&self) -> &str
fn model_type(&self) -> &str
Get the model type this parser is designed for.
Source§fn is_in_reasoning(&self) -> bool
fn is_in_reasoning(&self) -> bool
Check if the parser is currently in reasoning mode. Read more
Source§fn mark_reasoning_started(&mut self)
fn mark_reasoning_started(&mut self)
Mark that reasoning has already started (e.g.
<think> was injected in the prefill). Read moreSource§fn mark_think_start_stripped(&mut self)
fn mark_think_start_stripped(&mut self)
Mark that the
<think> start token was already consumed (in the prefill). Read moreAuto Trait Implementations§
impl Freeze for MiniMaxParser
impl RefUnwindSafe for MiniMaxParser
impl Send for MiniMaxParser
impl Sync for MiniMaxParser
impl Unpin for MiniMaxParser
impl UnsafeUnpin for MiniMaxParser
impl UnwindSafe for MiniMaxParser
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