Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MrlolDev committed Dec 15, 2023
1 parent a03a812 commit 8f7f4e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/text/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default {
const cost = 0;
let resultLength = 0;
for await (const item of streamingResp.stream) {
res.result = item.candidates[0].content.parts[0].text;
res.result = item.candidates[0].content.parts[0].text || "";
resultLength = item.usageMetadata?.candidates_token_count || 0;
promptLength = item.usageMetadata?.prompt_token_count || 0;
event.emit("data", res);
Expand Down

0 comments on commit 8f7f4e1

Please # to comment.