MCPcopy Create free account
hub / github.com/diillson/chatcli / getTokenEstimatorForCurrentLLM

Method getTokenEstimatorForCurrentLLM

cli/cli_llm.go:534–540  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

532}
533
534func (cli *ChatCLI) getTokenEstimatorForCurrentLLM() func(string) int {
535 // Função padrão - estimativa conservadora
536 return func(text string) int {
537 // Aproximadamente 4 caracteres por token para a maioria dos modelos
538 return len(text) / 4
539 }
540}
541
542// refreshClientOnAuthError checks if the error is a 401/auth error from an OAuth provider.
543// If so, it invalidates the auth cache, refreshes credentials, and recreates the client.

Callers 1

processFileCommandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected