Class LocalTokenizer

  • All Implemented Interfaces:

    
    public final class LocalTokenizer
    
                        

    [Experimental] Text Only Local Tokenizer.

    This class provides a local tokenizer for text only token counting.

    LIMITATIONS:

    • Only supports text based tokenization and no multimodal tokenization.
    • Forward compatibility depends on the open-source tokenizer models for future Gemini versions.

    NOTE: The SDK's local tokenizer implementation is experimental and may change in the future. It only supports text based tokenization.