@anthropic-ai/sdk
Version:
The official TypeScript library for the Anthropic API
10 lines • 717 B
text/typescript
import type { Span } from '@opentelemetry/api';
/**
* Sets the attributes that are sums over `usage`, the usage of a Message as the API sent it.
* `setResponseAttributes` sets the attributes that one field gives. The compactions' tokens are final
* only from the `message_delta` of a streamed Message on, and are set only when `complete` is true.
*/
export declare function setUsageSumAttributes(span: Span, usage: unknown, complete: boolean): void;
/** The token counts of a usage, or of one of its iterations, that add up to its input tokens. */
export declare const INPUT_TOKEN_COUNTS: readonly ["input_tokens", "cache_read_input_tokens", "cache_creation_input_tokens"];
//# sourceMappingURL=response.d.mts.map