[router] add json tool parser (#9516)

This commit is contained in:
Simo Lin
2025-08-22 12:13:04 -07:00
committed by GitHub
parent 110a65989b
commit f556ac8bd8
4 changed files with 1049 additions and 9 deletions

View File

@@ -1,8 +1,8 @@
/// Tool parser module for handling function/tool calls in model outputs
///
/// This module provides infrastructure for parsing tool calls from various model formats.
/// Phase 1 focuses on core infrastructure: types, traits, registry, and partial JSON parsing.
pub mod errors;
pub mod json_parser;
pub mod partial_json;
pub mod registry;
pub mod state;
@@ -14,6 +14,7 @@ mod tests;
// Re-export commonly used types
pub use errors::{ToolParserError, ToolParserResult};
pub use json_parser::JsonParser;
pub use registry::ParserRegistry;
pub use state::{ParsePhase, ParseState};
pub use traits::{PartialJsonParser, ToolParser};