CallStats

org.llm4s.repl.CallStats
@Experimental
final class CallStats

What one model call cost: the model that answered, the tokens the provider reported, how long the call took, and the estimated cost in US dollars when llm4s knows the model's price. Printed as one line:

gpt-4o-mini: 12 prompt + 8 completion = 20 tokens, 312 ms, $0.000007

Value parameters

estimatedCost

the estimated cost in US dollars, when the model's price is known

latency

the time from the request to the last byte of the answer

model

the model that answered, as the provider named it

usage

the token counts, when the provider reports them

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Concrete fields

val estimatedCost: Option[Double]
val latency: FiniteDuration
val model: String
val usage: Option[TokenUsage]