Skip to main content

get_parser

Function get_parser 

Source
pub fn get_parser(dialect: Option<&DialectSpec>) -> Box<dyn ToolCallParser>
Expand description

Pick a parser for a resolved dialect.

Some(spec) — from the model’s persisted spec or the dialect_for_tags fallback — yields a DelimitedToolCallParser configured with it; None yields 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.