model_to_tokenizer: Gets the name of the tokenizer used by a model

View source: R/model_to_tokenizer.R

model_to_tokenizerR Documentation

Gets the name of the tokenizer used by a model

Description

Gets the name of the tokenizer used by a model

Usage

model_to_tokenizer(model)

Arguments

model

the model to use, e.g., ⁠gpt-4o⁠

Value

the tokenizer used by the model

Examples

model_to_tokenizer("gpt-4o")
model_to_tokenizer("gpt-4-1106-preview")
model_to_tokenizer("text-davinci-002")
model_to_tokenizer("text-embedding-ada-002")
model_to_tokenizer("text-embedding-3-small")

rtiktoken documentation built on April 15, 2025, 1:35 a.m.