LLMProxy.Pricing.Rates (llm_proxy v0.1.0)

Copy Markdown View Source

Per-million-token pricing rates used by LLMProxy cost accounting.

This is an internal contract. Callers pass atom-keyed, typed values only.

Summary

Types

t()

@type t() :: %LLMProxy.Pricing.Rates{
  cache_read: number(),
  cache_write: number(),
  input: number(),
  output: number()
}

Functions

new(attrs \\ [])

@spec new(keyword()) :: t()

put(rates, key, value)

@spec put(t(), :input | :output | :cache_read | :cache_write, number()) :: t()

zero()

@spec zero() :: t()