struct

Arcana::AI::Pricing::Cost

Inherits JSON::Serializable < Struct < Value < Object

What a call costs.

Constructors

new(provider : String, model : String, priced_as : String, lines : Array(Arcana::AI::Pricing::Line), rates : String, excluded : Array(String) = [] of String)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
reported(provider : String, model : String, total : BigDecimal, item : String = "call") : Cost

A cost the provider reported itself (Runware's includeCost, or a service that prices its own work), as one line: one item at total. Its rates say who reported it.

Source

Instance methods

complete?

Does the total cover every charge for the call?

Source
currency
Source
excluded

Charges the total leaves out because they aren't set per call, such as code-execution container time, billed by the hour.

Source
lines
Source
model

The model the provider reported.

Source
priced_as

The table's ID for it, when that differs (an alias or a dated snapshot).

Source
provider
Source
rates

The table the rates came from: its version.

Source
total
Source