usageTokens

This commit is contained in:
DirkSchlossmacher
2023-11-13 18:33:49 +01:00
parent 83ed6bfc0b
commit 0dfabd60cc
2 changed files with 2 additions and 31 deletions

View File

@@ -170,6 +170,8 @@ export class ChatGPTApi implements LLMApi {
},
onmessage(msg) {
if (msg.data === "[DONE]" || finished) {
const usageTokens = json.usage?;
console.log("usageTokens:", usageTokens);
return finish();
}
const text = msg.data;