get_parser

Function get_parser 

Source
pub fn get_parser(model_tags: &[String]) -> Box<dyn ToolCallParser>
Expand description

Pick a parser for a model based on its tags list.

Tags are scanned in the listed order and the first recognised format:* tag wins. Models with no recognised tag — the common case — receive the identity-passthrough StandardJsonParser.

The returned trait object is Send because ToolCallParser requires Send; this lets NormalizingStream live on a tokio task without adding a separate bound.