pub struct BaseReasoningParser { /* private fields */ }Expand description
Base reasoning parser implementation.
This parser handles the common logic for detecting reasoning blocks
delimited by start and end tokens (e.g.,
Implementations§
Source§impl BaseReasoningParser
impl BaseReasoningParser
Sourcepub fn new(config: ParserConfig) -> Self
pub fn new(config: ParserConfig) -> Self
Create a new BaseReasoningParser with the given configuration.
Sourcepub fn with_model_type(self, model_type: String) -> Self
pub fn with_model_type(self, model_type: String) -> Self
Create with custom model type identifier.
Trait Implementations§
Source§impl Clone for BaseReasoningParser
impl Clone for BaseReasoningParser
Source§fn clone(&self) -> BaseReasoningParser
fn clone(&self) -> BaseReasoningParser
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 BaseReasoningParser
impl Debug for BaseReasoningParser
Source§impl ReasoningParser for BaseReasoningParser
impl ReasoningParser for BaseReasoningParser
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
Auto Trait Implementations§
impl Freeze for BaseReasoningParser
impl RefUnwindSafe for BaseReasoningParser
impl Send for BaseReasoningParser
impl Sync for BaseReasoningParser
impl Unpin for BaseReasoningParser
impl UnsafeUnpin for BaseReasoningParser
impl UnwindSafe for BaseReasoningParser
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