Skip to main content

llama_cpp_bindings/error/
tool_call_format_failure.rs

1use crate::error::bracketed_args_failure::BracketedArgsFailure;
2use crate::error::json_object_failure::JsonObjectFailure;
3use crate::error::key_value_xml_tags_failure::KeyValueXmlTagsFailure;
4use crate::error::paired_quote_failure::PairedQuoteFailure;
5use crate::error::xml_function_tags_failure::XmlFunctionTagsFailure;
6
7/// Top-level failure for the wrapper-side template-override parsers (one variant per supported shape).
8#[derive(Debug, thiserror::Error)]
9pub enum ToolCallFormatFailure {
10    #[error("bracketed-args fallback parser: {0}")]
11    BracketedArgs(#[from] BracketedArgsFailure),
12    #[error("json-object fallback parser: {0}")]
13    JsonObject(#[from] JsonObjectFailure),
14    #[error("key-value-xml-tags fallback parser: {0}")]
15    KeyValueXmlTags(#[from] KeyValueXmlTagsFailure),
16    #[error("paired-quote fallback parser: {0}")]
17    PairedQuote(#[from] PairedQuoteFailure),
18    #[error("xml-function-tags fallback parser: {0}")]
19    XmlFunctionTags(#[from] XmlFunctionTagsFailure),
20}