Skip to main content

output_room

Function output_room 

Source
pub fn output_room(
    window: Option<u64>,
    most: Option<u64>,
    estimate: u64,
) -> Option<u64>
Expand description

The most output a request of estimate tokens may ask of a model with a window of tokens and an output limit of most: most, or what the window leaves after the request and OUTPUT_MARGIN when that is less. None when neither is known; Some(0) when the window leaves no room, which calls for compacting first, not for a request with no room to answer.