pub enum NormalizationErrorKind {
MalformedToolCallJson {
raw: String,
},
UnclosedToolCallTag {
partial: String,
},
MalformedFunctionXml {
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).
MalformedFunctionXml
Found a complete <tool_call>...</tool_call> block whose body began
with <function= (the Qwen3/Hermes inner-XML dialect) but did not
match that dialect’s <function=NAME><parameter=KEY>VALUE</parameter>...</function>
shape.
raw holds the body bytes between the open and close tags.
Trait Implementations§
Source§impl Clone for NormalizationErrorKind
impl Clone for NormalizationErrorKind
Source§fn clone(&self) -> NormalizationErrorKind
fn clone(&self) -> NormalizationErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NormalizationErrorKind
impl Debug for NormalizationErrorKind
Source§impl PartialEq for NormalizationErrorKind
impl PartialEq for NormalizationErrorKind
Source§fn eq(&self, other: &NormalizationErrorKind) -> bool
fn eq(&self, other: &NormalizationErrorKind) -> bool
self and other values to be equal, and is used by ==.