Documentation
¶
Overview ¶
Package tokenizer adapts embedded text encodings for local CLI token inspection.
Index ¶
Constants ¶
View Source
const DefaultEncoding = "o200k_base"
DefaultEncoding is the encoding used when the caller makes no selection.
View Source
const MaxInputBytes = 1 << 20
MaxInputBytes bounds this local utility's input and result allocations. It does not limit API requests or guarantee short execution for unbroken text.
Variables ¶
View Source
var Licenses string
Licenses retains the tokenizer dependencies' distribution notices in the binary.
Functions ¶
func IsSupportedEncoding ¶
IsSupportedEncoding checks an exact encoding name without loading vocabulary data.
func SupportedEncodings ¶
func SupportedEncodings() []string
SupportedEncodings returns exact encoding names in presentation order.
Types ¶
type Result ¶
Result preserves the encoding's exact token IDs and byte fragments when inspected. A fragment can contain only part of a UTF-8 character.
Click to show internal directories.
Click to hide internal directories.