pub struct StepParser;Expand description
Step parser to extract reasoning steps from LLM output
Implementations§
Source§impl StepParser
impl StepParser
Sourcepub fn parse_numbered(text: &str) -> Vec<String>
pub fn parse_numbered(text: &str) -> Vec<String>
Parse numbered steps (1. 2. 3. or Step 1: Step 2:)
Sourcepub fn parse_sentences(text: &str) -> Vec<String>
pub fn parse_sentences(text: &str) -> Vec<String>
Parse steps by sentence boundaries
Sourcepub fn parse_auto(text: &str) -> Vec<String>
pub fn parse_auto(text: &str) -> Vec<String>
Smart parsing that detects format
Auto Trait Implementations§
impl Freeze for StepParser
impl RefUnwindSafe for StepParser
impl Send for StepParser
impl Sync for StepParser
impl Unpin for StepParser
impl UnwindSafe for StepParser
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more