Skip to main content

normalize_completion_logprobs

Function normalize_completion_logprobs 

Source
pub fn normalize_completion_logprobs(_value: &mut Option<u8>)
Expand description

Preserves completion logprobs unchanged: no default is inserted for None, and explicit values, including invalid ones, are left for validation.

Call after parsing and before the selected logprobs validator. Parsing already maps both a missing key and explicit null to None, and serialization omits the key for None; this operation cannot recover that distinction. It cannot fail and is idempotent. Later engine conversion owns the effective count.