CostRecorded
org.llm4s.trace.TraceEvent.CostRecorded
case class CostRecorded(costUsd: Double, model: String, operation: String, tokenCount: Int, costType: String, timestamp: Instant) extends TraceEvent
Tracks cost in USD for any model operation.
Value parameters
- costType
-
Category: "embedding", "completion", "total"
- costUsd
-
Estimated cost in US dollars
- model
-
Model name used for pricing lookup
- operation
-
Type of operation: "embedding", "completion", "evaluation"
- tokenCount
-
Total tokens consumed
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TraceEventclass Objecttrait Matchableclass Any
Members list
In this article