Skip to content

Commit

Permalink
🐛 Fix generate token usage type (#100)
Browse files Browse the repository at this point in the history
* 🐛 Fix generate token usage type

* 🍻 Remove tutu
  • Loading branch information
lowczarc authored Nov 15, 2023
1 parent 75a8b55 commit 86bb86a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ export class Generation extends Readable implements Promise<string> {
return new Promise<GenerationResult>((resolve, reject) => {
this.on("error", reject);
this.on("infos", (data) => {
resolve(data);
resolve({
result: data.result,
tokenUsage: data.token_usage,
ressources: data.ressources,
});
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polyfire-js",
"version": "0.2.12",
"version": "0.2.13",
"main": "index.js",
"types": "index.d.ts",
"author": "Lancelot Owczarczak <[email protected]>",
Expand Down

0 comments on commit 86bb86a

Please sign in to comment.