Sycophant.Pricing
(sycophant v0.4.2)
Copy Markdown
Represents pricing metadata from LLMDB's component-based pricing model.
Attached to Sycophant.Usage as reference data after cost calculation.
Contains the currency and all pricing components (tokens, tools, images, storage).
Summary
Functions
Finds a component by ID.
Converts an LLMDB pricing map (atom-keyed) into a Pricing struct.
Reconstructs a Pricing struct from a serialized map (string-keyed).
Types
@type t() :: %Sycophant.Pricing{ components: [Sycophant.Pricing.Component.t()], currency: String.t() | nil }
Functions
@spec find_component(t(), String.t()) :: Sycophant.Pricing.Component.t() | nil
Finds a component by ID.
Converts an LLMDB pricing map (atom-keyed) into a Pricing struct.
Reconstructs a Pricing struct from a serialized map (string-keyed).