@chinmaymk/aikit / extractUsageFromAnthropicEvent
Function: extractUsageFromAnthropicEvent()
extractUsageFromAnthropicEvent(
event):undefined|GenerationUsage
Defined in: providers/anthropic-transformers.ts:125
Parameters
event
type
"message_delta"
delta
{ stop_reason?: string; stop_sequence?: null | string; }
delta.stop_reason?
string
delta.stop_sequence?
null | string
usage?
{ output_tokens: number; }
usage.output_tokens
number
Returns
undefined | GenerationUsage