You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tokenization service interface is prompt/tokenizer, using the Tokenize.srv definition. prompt_bridge selects the tokenizer plugin from input.model_family and executes tokenization locally or through the provider implementation.
To add a new Offline Tokenizer provider, implement a plugin inheriting from prompt::TokenizeBaseClass and register it. Add its configuration to your YAML file and list it in tokenizer_family_names and tokenizer_family_plugins.
Notes
The service can encode text to tokens or decode tokens to text, depending on the encode flag.
The current bundled tokenizer implementation is prompt::OpenAITokenize, which uses cpp-tiktoken locally rather than a REST endpoint.
Use the success and error fields to check for errors.