Documentation
¶
Overview ¶
Package openmodels knows where the tokenizers of the models providers serve are published: the repositories of the Hugging Face hub the makers of open models keep them in, and the tiktoken encodings of OpenAI's models. Every provider plugin answers the tokenizers host through it with the ids its own API writes
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenAI ¶
func OpenAI(model string) []tokenizers.Source
The tiktoken encoding of an OpenAI model, framed as OpenAI's cookbook counts its chat models; gpt-oss reads o200k_harmony, its conversation framed by the chat template its repository carries, so the encoding counts it as text alone
func Sources ¶
func Sources(id string) []tokenizers.Source
The tokenizers of a model by its id as a provider writes it, the most exact first: with its maker's account before it or not, in any case, with a tag of how it is served after a colon. The repositories of its family, the id itself as a repository of its maker's account on the hub where no family has the id whole, and for OpenAI's models the tiktoken encoding they read; none for a model whose tokenizer is not published
Types ¶
This section is empty.