Sycophant. Pricing
(sycophant v0.5.0)
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.
Types
@type t() :: %Sycophant.Pricing{ __type__: binary(), components: [ %Sycophant.Pricing.Component{ __type__: binary(), id: nil | binary(), kind: nil | binary(), meter: nil | binary(), notes: nil | binary(), per: nil | integer(), rate: nil | number(), size_class: nil | binary(), tool: nil | binary(), unit: nil | binary() } ], currency: nil | binary() }
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.