Std.Ai.Trace
Types
type alias Trace
Values
forResponse : String -> String -> Provider.PriceBook -> Provider.ChatResponse -> Trace
Build a trace row from a chat response and a price book: the token counts come
record : Db -> Trace -> Task Error ()
Append a trace row.
setup : Db -> Task Error ()
Create the trace table if absent. Idempotent.
spanCount : Db -> String -> Task Error Int
How many model calls a run recorded.
totalCost : Db -> String -> Task Error String
The total cost of a run, summed EXACTLY across its model calls, as a decimal