mod.rs 854 Bytes
Newer Older
1
2
3
/// Tool parser module for handling function/tool calls in model outputs
///
/// This module provides infrastructure for parsing tool calls from various model formats.
4
// Core modules
5
pub mod errors;
6
pub mod factory;
7
8
9
10
11
pub mod partial_json;
pub mod state;
pub mod traits;
pub mod types;

12
13
14
// Parser implementations
pub mod parsers;

15
16
17
18
19
#[cfg(test)]
mod tests;

// Re-export commonly used types
pub use errors::{ToolParserError, ToolParserResult};
20
pub use factory::{PooledToolParser, ToolParserFactory, ToolParserRegistry};
21
pub use traits::{PartialJsonParser, ToolParser};
22
pub use types::{FunctionCall, PartialToolCall, StreamingParseResult, ToolCall};
23
24

// Re-export parsers for convenience
25
pub use parsers::{
26
27
    DeepSeekParser, Glm4MoeParser, GptOssParser, JsonParser, KimiK2Parser, LlamaParser,
    MistralParser, PythonicParser, QwenParser, Step3Parser,
28
};