Discover Packages
github.com/Kubonsang/unity-ctx
internal
bench
package
Version:
v0.8.0
Opens a new window with list of versions in this module.
Published: Jul 10, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func EstimateTokens(utf8Bytes int ) int
type Input struct {
RawBytes int
SummarizeBytes int
HasContextPack bool
ContextPackBytes int
}
type Metric struct {
Bytes int `json:"bytes"`
Tokens int `json:"tokens"`
Ratio float64 `json:"ratio"`
SavedTokens int `json:"saved_tokens"`
}
type Result struct {
RawBytes int `json:"raw_bytes"`
RawTokens int `json:"raw_tokens"`
Summarize Metric `json:"summarize"`
ContextPack *Metric `json:"context_pack,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.