Function get_instruction_token_count

Source
pub fn get_instruction_token_count(model: &Model) -> Result<usize>
Expand description

Calculates the number of tokens used by the instruction template.

§Arguments

  • model - The AI model to use for token counting

§Returns

  • Result<usize> - The number of tokens used or an error