Values.TokenUsageSourceThe tokens used in a message API inference call.
type nonrec t = {inputTokens : TokenUsageInputTokensInteger.t option;The number of tokens sent in the request to the model.
*)outputTokens : TokenUsageOutputTokensInteger.t option;The number of tokens that the model generated for the request.
*)totalTokens : TokenUsageTotalTokensInteger.t option;The total of input tokens and tokens generated by the model.
*)cacheReadInputTokens : TokenUsageCacheReadInputTokensInteger.t option;The number of input tokens read from the cache for the request.
*)cacheWriteInputTokens : TokenUsageCacheWriteInputTokensInteger.t option;The number of input tokens written to the cache for the request.
*)cacheDetails : CacheDetailsList.t option;Detailed breakdown of cache writes by TTL. Empty if no cache creation occurred. Sorted by TTL duration (1h before 5m).
*)}val to_value :
t ->
[> `Structure of
(string
* [> `Integer of TokenUsageInputTokensInteger.t
| `List of
[> `Structure of
(string
* [> `Enum of string
| `Integer of CacheDetailInputTokensInteger.t ])
list ]
list ])
list ]