tieredpricing

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tier

type Tier struct {
	Name        string  `json:"name"`
	MinTokens   int64   `json:"min_tokens"`
	MaxTokens   int64   `json:"max_tokens"`
	InputPrice  float64 `json:"input_price"`
	OutputPrice float64 `json:"output_price"`
}

type TieredPricing

type TieredPricing struct {
	// contains filtered or unexported fields
}

func NewTieredPricing

func NewTieredPricing(model string) *TieredPricing

func (*TieredPricing) AddTier

func (p *TieredPricing) AddTier(tier Tier)

func (*TieredPricing) Calculate

func (p *TieredPricing) Calculate(inputTokens, outputTokens int64) float64

func (*TieredPricing) GetTiers

func (p *TieredPricing) GetTiers() []Tier

Jump to

Keyboard shortcuts

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