pkoukk/tiktoken-go

go version of tiktoken

48
/ 100
Emerging

Implements BPE tokenization for OpenAI models with pluggable dictionary loaders—supporting runtime downloads, cached dictionaries via `TIKTOKEN_CACHE_DIR`, or offline embedded encodings. Provides both encoding-level (cl100k_base, p50k_base) and model-specific APIs (gpt-4, gpt-3.5-turbo), with built-in helpers for counting tokens in chat completion messages compatible with the go-openai SDK.

895 stars. No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 2 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 20 / 25

How are scores calculated?

Stars

895

Forks

102

Language

Go

License

MIT

Last pushed

Sep 10, 2025

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/pkoukk/tiktoken-go"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.