pub fn new(max_tokens: usize, engine_definition: &EngineDefinition) -> Option<Self> {
        if max_tokens <= engine_definition.max_tokens() {
            Some(Self(max_tokens))
        } else {
            None
        }
    }
/// Creates a new maximum number of tokens. Ensured to be valid for the given engine definition.
Creates a new maximum number of tokens. Ensured to be valid for the given engine definition.
Creates a new maximum number of tokens . Ensured to be valid for the given engine definition .
pub fn new(max_tokens: usize, engine_definition: &EngineDefinition) -> Option<Self> {
        if max_tokens <= engine_definition.max_tokens() {
            Some(Self(max_tokens))
        } else {
            None
        }
    }
pub fn new ( max_tokens : usize , engine_definition : & EngineDefinition ) -> Option < Self > { if max_tokens <= engine_definition . max_tokens ( ) { Some ( Self ( max_tokens ) ) } else { None } }
Creates a new maximum number of tokens.
Creates a new maximum number of tokens .
max_tokens
usize
engine_definition
&EngineDefinition
max_tokens
usize
engine_definition
&EngineDefinition