Skip to content

Commit

Permalink
fix: yieldStreamNode<Buffer>
Browse files Browse the repository at this point in the history
  • Loading branch information
ctjlewis committed Jun 17, 2023
1 parent 7dc72f1 commit a195f93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/streaming/streams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ export const EventStream: OpenAIStream = (
* Feed the parser with decoded chunks from the raw stream.
*/
for await (const chunk of isNodeJsStream
? yieldStreamNode<Uint8Array>(stream as NodeJS.ReadableStream)
: yieldStream(stream as ReadableStream<Uint8Array>)) {
? yieldStreamNode<Buffer>(stream as NodeJS.ReadableStream)
: yieldStream(stream as ReadableStream<Uint8Array>)
) {
const decoded = DECODER.decode(chunk);

try {
Expand Down

1 comment on commit a195f93

@vercel
Copy link

@vercel vercel bot commented on a195f93 Jun 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.