Skip to content

Commit b4dfdc4

Browse files
committed
CR Comment
1 parent cb62edf commit b4dfdc4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/instrumentation-together/src/instrumentation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,10 +525,10 @@ export class TogetherInstrumentation extends InstrumentationBase {
525525
const cachedTokens = (
526526
result.usage as unknown as Record<string, unknown>
527527
).cached_tokens;
528-
if (cachedTokens) {
528+
if (typeof cachedTokens === "number") {
529529
span.setAttribute(
530530
ATTR_GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS,
531-
cachedTokens as number,
531+
cachedTokens,
532532
);
533533
}
534534
}

0 commit comments

Comments
 (0)