We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 393d0cf commit 8aa454cCopy full SHA for 8aa454c
.changeset/tall-donuts-divide.md
@@ -0,0 +1,5 @@
1
+---
2
+"@thirdweb-dev/service-utils": patch
3
4
+
5
+feat: add promptTokens and completionTokens fields to usage
packages/service-utils/src/core/usage.ts
@@ -76,5 +76,7 @@ export const usageEventSchema = z.object({
76
onRampId: z.string().optional(),
77
evmRequestParams: z.string().optional(),
78
providerIp: z.string().optional(),
79
+ promptTokens: z.number().int().nonnegative().optional(),
80
+ completionTokens: z.number().int().nonnegative().optional(),
81
});
82
export type UsageEvent = z.infer<typeof usageEventSchema>;
0 commit comments