pub enum NormalizationErrorKind {
MalformedToolCallJson {
raw: String,
},
UnclosedToolCallTag {
partial: String,
},
UnknownMarkup {
raw: String,
},
}Expand description
Discriminates the kind of malformation a parser detected.
Each variant carries enough context that a developer reading a log line can identify the offending bytes without rerunning the model.
Variants§
MalformedToolCallJson
Found a complete <tool_call>...</tool_call> block but its body did
not parse as a JSON object with at least a name field.
raw holds the body bytes between the open and close tags.
UnclosedToolCallTag
The stream ended while we were still inside an open <tool_call>
tag. partial is the JSON body collected so far (which may be
empty if only the open tag was seen).
UnknownMarkup
A dialect-specific marker was recognised but its surrounding shape did not match any known schema. Reserved for future parsers.
Trait Implementations§
Source§impl Clone for NormalizationErrorKind
impl Clone for NormalizationErrorKind
Source§fn clone(&self) -> NormalizationErrorKind
fn clone(&self) -> NormalizationErrorKind
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 NormalizationErrorKind
impl Debug for NormalizationErrorKind
Source§impl PartialEq for NormalizationErrorKind
impl PartialEq for NormalizationErrorKind
impl Eq for NormalizationErrorKind
impl StructuralPartialEq for NormalizationErrorKind
Auto Trait Implementations§
impl Freeze for NormalizationErrorKind
impl RefUnwindSafe for NormalizationErrorKind
impl Send for NormalizationErrorKind
impl Sync for NormalizationErrorKind
impl Unpin for NormalizationErrorKind
impl UnwindSafe for NormalizationErrorKind
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