UsageCost class final
Monetary cost of a request, in USD.
Ported from pi's Usage.cost.
Constructors
Properties
- cacheRead → double
-
Cost of tokens read from the prompt cache.
final
- cacheWrite → double
-
Cost of tokens written to the prompt cache.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- input → double
-
Cost of input tokens.
final
- output → double
-
Cost of output tokens.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total → double
-
Total cost.
final
Methods
-
copyWith(
{double? input, double? output, double? cacheRead, double? cacheWrite, double? total}) → UsageCost -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited