Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadOrGenerateCA ¶
func LoadOrGenerateCA(dataDir string) (tls.Certificate, error)
LoadOrGenerateCA loads the CA cert/key from dataDir, or generates a new pair.
Types ¶
type PriceLookup ¶
type PriceLookup interface {
// Cost calculates cost from parsed usage data and request-level modifiers.
// multiplier applies to all token costs (e.g. 6.0 for fast mode, 1.1 for data residency).
// cacheTTL1h switches cache write rate from 1.25x to 2x input price.
Cost(providerName, model string, result *wire.Result, multiplier float64, cacheTTL1h bool) *float64
Normalize(gateway, model string) string
}
PriceLookup calculates cost and normalizes model names. Can be nil.
Click to show internal directories.
Click to hide internal directories.