Skip to main content

parser_for_item

Function parser_for_item 

Source
fn parser_for_item<'a>(
    item: &OutputItem,
) -> Option<fn(Pin<Box<LinesStream<StreamReader<BoxStream<'a, Result<Bytes, Error>>, Bytes>>>>) -> ResponseStreamType<'a>>
Expand description

Which parser the rest of the round belongs to, going by the item it just announced, or None for an item that says nothing about it.

Reasoning and search items accompany a tool-call round and a text answer alike, so only a function call or a message decides. Reading the item rather than the first delta is what keeps a tool call that streams no arguments classifiable at all.