token

package
v0.46.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateTokenCount

func EstimateTokenCount(text string) int

EstimateTokenCount はテキストのトークン数を推定 英語: 約4文字 = 1トークン 日本語: 約1-2文字 = 1トークン 混在を考慮して約2.5文字 = 1トークン

func GetModelTokenLimit

func GetModelTokenLimit(model string) int

GetModelTokenLimit はモデルのトークン上限を取得

func IsTokenLimitError

func IsTokenLimitError(err error) bool

IsTokenLimitError はエラーがトークン上限エラーかどうかを判定

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL