Skip to main content

json_number_to_u64

Function json_number_to_u64 

Source
pub fn json_number_to_u64(value: &Value) -> Option<u64>
Expand description

Reads a JSON number as u64, accepting an unsigned literal directly or a non-negative signed literal. This is the one home for the provider token-count parser that the OpenAI server, chat codec, and HTTP runner each re-grew.