mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
Merge branch 'main' of https://github.com/jina-ai/node-DeepResearch
This commit is contained in:
@@ -15,7 +15,7 @@ export class TokenTracker extends EventEmitter {
|
|||||||
const asyncLocalContext = process.asyncLocalContext as any;
|
const asyncLocalContext = process.asyncLocalContext as any;
|
||||||
this.on('usage', () => {
|
this.on('usage', () => {
|
||||||
if (asyncLocalContext.available()) {
|
if (asyncLocalContext.available()) {
|
||||||
asyncLocalContext.ctx.chargeAmount = this.getTotalUsage();
|
asyncLocalContext.ctx.chargeAmount = this.getTotalUsage().totalTokens;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user