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.
|
2025-08-27 06:05:53 -07:00
|
|
|
// Core modules
|
2025-08-21 22:08:56 -07:00
|
|
|
pub mod errors;
|
|
|
|
|
pub mod partial_json;
|
2025-08-25 20:40:06 -07:00
|
|
|
pub mod python_literal_parser;
|
2025-08-21 22:08:56 -07:00
|
|
|
pub mod registry;
|
|
|
|
|
pub mod state;
|
|
|
|
|
pub mod traits;
|
|
|
|
|
pub mod types;
|
|
|
|
|
|
2025-08-27 06:05:53 -07:00
|
|
|
// Parser implementations
|
|
|
|
|
pub mod parsers;
|
|
|
|
|
|
2025-08-21 22:08:56 -07:00
|
|
|
#[cfg(test)]
|
|
|
|
|
mod tests;
|
|
|
|
|
|
|
|
|
|
// Re-export commonly used types
|
|
|
|
|
pub use errors::{ToolParserError, ToolParserResult};
|
|
|
|
|
pub use registry::ParserRegistry;
|
|
|
|
|
pub use state::{ParsePhase, ParseState};
|
|
|
|
|
pub use traits::{PartialJsonParser, ToolParser};
|
|
|
|
|
pub use types::{FunctionCall, PartialToolCall, StreamResult, TokenConfig, ToolCall};
|
2025-08-27 06:05:53 -07:00
|
|
|
|
|
|
|
|
// Re-export parsers for convenience
|
2025-08-27 06:18:24 -07:00
|
|
|
pub use parsers::{
|
2025-08-27 11:04:55 -07:00
|
|
|
DeepSeekParser, JsonParser, KimiK2Parser, LlamaParser, MistralParser, PythonicParser,
|
|
|
|
|
QwenParser, Step3Parser,
|
2025-08-27 06:18:24 -07:00
|
|
|
};
|