use serde_json::Value;
pub mod config;
pub mod dsml;
pub mod gemma4;
pub mod harmony;
pub mod jail;
pub mod json;
pub mod parsers;
pub mod pythonic;
pub mod response;
pub mod structural_tag;
#[cfg(test)]
pub mod tests;
pub mod tools;
pub mod xml;
#[derive(Debug, Clone)]
pub struct ToolDefinition {
pub name: String,
pub parameters: Option<Value>,
pub strict: Option<bool>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ToolChoice {
None,
Auto,
Required,
Named(String),
}
pub use config::{
JsonParserConfig, KimiK2ParserConfig, MiniMaxM3ParserConfig, ParserConfig, ToolCallConfig,
XmlParserConfig,
};
pub use dsml::try_tool_call_parse_dsml;
pub use gemma4::try_tool_call_parse_gemma4;
pub use harmony::parse_tool_calls_harmony_complete;
pub use json::try_tool_call_parse_json;
pub use parsers::{
detect_and_parse_tool_call, detect_tool_call_start, find_tool_call_end_position,
try_tool_call_parse,
};
pub use pythonic::try_tool_call_parse_pythonic;
pub use response::{
CalledFunction, CalledFunctionStream, ToolCallResponse, ToolCallResponseChunk, ToolCallType,
};
pub use structural_tag::{
DsmlToolCallsConfig, StructuralTagBuilder, StructuralTagSchemaMode, TOOL_NAME_PLACEHOLDER,
ToolCallFormatBuildContext, TriggeredTagsConfig,
};
#[allow(deprecated)]
pub use tools::try_tool_call_parse_aggregate_stream_finalize;
pub use tools::{
try_tool_call_parse_aggregate, try_tool_call_parse_aggregate_finalize,
try_tool_call_parse_stream,
};
pub use xml::try_tool_call_parse_kimi_k2;
pub use xml::try_tool_call_parse_xml;