Versions in this module Expand all Collapse all v0 v0.5.1 May 12, 2026 v0.1.0 May 12, 2026 Changes in this version + var CommonModelPricing = map[string]ModelPricing + func CalculateSavings(tokensSaved int, model string) float64 + func CalculateTokensSaved(original, filtered string) int + func EstimateTokens(text string) int + func EstimateTokensFast(text string) int + func EstimateTokensPrecise(text string) int + func HasModelPricing(model string) bool + func RegisterModelPricing(model string, input, output float64) + func WarmupBPETokenizer() + type BPETokenizer struct + func (b *BPETokenizer) Count(text string) int + type BatchProcessor struct + func NewBatchProcessor(coordinator Processor, workers int) *BatchProcessor + func (bp *BatchProcessor) ProcessBatch(inputs []string) []BatchResult + type BatchResult struct + Error error + Index int + Output string + Stats interface{} + type CommandRunner interface + LookPath func(name string) (string, error) + Run func(ctx context.Context, args []string) (output string, exitCode int, err error) + type LimitedWriter struct + Dropped int64 + N int64 + W io.Writer + func (lw *LimitedWriter) Write(p []byte) (n int, err error) + type ModelPricing struct + InputPerMillion float64 + Model string + OutputPerMillion float64 + func GetModelPricing(model string) ModelPricing + type OSCommandRunner struct + Env []string + func NewOSCommandRunner() *OSCommandRunner + func (r *OSCommandRunner) LookPath(name string) (string, error) + func (r *OSCommandRunner) Run(ctx context.Context, args []string) (string, int, error) + type Processor interface + Process func(string) (string, interface{}, error)