pub struct GoogleTokenizer { /* private fields */ }Expand description
Tokenizer for Google Gemini models
Implementations§
Source§impl GoogleTokenizer
impl GoogleTokenizer
Sourcepub fn new(config: ModelConfig) -> Result<Self, TokenError>
pub fn new(config: ModelConfig) -> Result<Self, TokenError>
Trait Implementations§
Source§impl Tokenizer for GoogleTokenizer
impl Tokenizer for GoogleTokenizer
Source§fn count_tokens(&self, text: &str) -> Result<usize>
fn count_tokens(&self, text: &str) -> Result<usize>
Count the number of tokens in the given text
Source§fn get_model_info(&self) -> ModelInfo
fn get_model_info(&self) -> ModelInfo
Get information about the model
Auto Trait Implementations§
impl Freeze for GoogleTokenizer
impl RefUnwindSafe for GoogleTokenizer
impl Send for GoogleTokenizer
impl Sync for GoogleTokenizer
impl Unpin for GoogleTokenizer
impl UnsafeUnpin for GoogleTokenizer
impl UnwindSafe for GoogleTokenizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more