Skip to content

Commit

Permalink
feat: set encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Googlefan committed Jun 6, 2024
1 parent 04444e3 commit ee80346
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/chat/llama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async function* generate(chat: Chat[], system?: string) {
})),
),
});
res.body.setEncoding("utf-8");
const stream = (await res.body.blob()).stream();
const reader = stream.getReader();
while (true) {
Expand Down

0 comments on commit ee80346

Please sign in to comment.