Skip to main content

parse_logprobs

Function parse_logprobs 

Source
pub fn parse_logprobs(json: &str) -> Result<Vec<LogprobToken>>
Expand description

Extract the token list from any of these shapes: a full Chat Completions response (choices[0].logprobs.content), a logprobs object ({"content": [...]}), or a bare token array.