2025-08-21 22:08:56 -07:00
|
|
|
/// Tool parser module for handling function/tool calls in model outputs
|
|
|
|
|
///
|
|
|
|
|
/// This module provides infrastructure for parsing tool calls from various model formats.
|
|
|
|
|
pub mod errors;
|
2025-08-22 12:13:04 -07:00
|
|
|
pub mod json_parser;
|
2025-08-25 20:43:36 -07:00
|
|
|
pub mod llama_parser;
|
2025-08-25 20:09:51 -07:00
|
|
|
pub mod mistral_parser;
|
2025-08-21 22:08:56 -07:00
|
|
|
pub mod partial_json;
|
2025-08-25 20:40:06 -07:00
|
|
|
pub mod python_literal_parser;
|
|
|
|
|
pub mod pythonic_parser;
|
2025-08-25 20:32:05 -07:00
|
|
|
pub mod qwen_parser;
|
2025-08-21 22:08:56 -07:00
|
|
|
pub mod registry;
|
|
|
|
|
pub mod state;
|
|
|
|
|
pub mod traits;
|
|
|
|
|
pub mod types;
|
|
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
|
mod tests;
|
|
|
|
|
|
|
|
|
|
// Re-export commonly used types
|
|
|
|
|
pub use errors::{ToolParserError, ToolParserResult};
|
2025-08-22 12:13:04 -07:00
|
|
|
pub use json_parser::JsonParser;
|
2025-08-25 20:43:36 -07:00
|
|
|
pub use llama_parser::LlamaParser;
|
2025-08-25 20:09:51 -07:00
|
|
|
pub use mistral_parser::MistralParser;
|
2025-08-25 20:40:06 -07:00
|
|
|
pub use pythonic_parser::PythonicParser;
|
2025-08-25 20:32:05 -07:00
|
|
|
pub use qwen_parser::QwenParser;
|
2025-08-21 22:08:56 -07:00
|
|
|
pub use registry::ParserRegistry;
|
|
|
|
|
pub use state::{ParsePhase, ParseState};
|
|
|
|
|
pub use traits::{PartialJsonParser, ToolParser};
|
|
|
|
|
pub use types::{FunctionCall, PartialToolCall, StreamResult, TokenConfig, ToolCall};
|