utils

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountWords

func CountWords(text string) int

CountWords returns the number of words in a string

func EstimateCost

func EstimateCost(model string, inputTokens, outputTokens int) float64

EstimateCost calculates estimated cost based on model and token count

func EstimateTokens

func EstimateTokens(text string) int

EstimateTokens provides a rough estimation of token count This is a simplified version - actual tokenization varies by model

Types

This section is empty.

Jump to

Keyboard shortcuts

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