Skip to content

Commit 7489fd5

Browse files
committed
Fix imports and types to solve test errors
1 parent 35f5062 commit 7489fd5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/chat/src/lib/classes/TextLineStream.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
22

3+
import { TransformStream } from "stream/web";
4+
35
interface TextLineStreamOptions {
46
/** Allow splitting by solo \r */
57
allowCR: boolean;

packages/chat/src/lib/doc-gpt-chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ async function* readStreamAsEvents(stream: ReadableStream<Uint8Array>): AsyncGen
327327
async function* readStreamAsTextLines(stream: ReadableStream<Uint8Array>): AsyncGenerator<string> {
328328
const linesReader = stream
329329
.pipeThrough(new TextDecoderStream())
330-
.pipeThrough(new TextLineStream())
330+
.pipeThrough(new TextLineStream() as ReadableWritablePair<string | undefined, string>)
331331
.getReader();
332332
while (true) {
333333
const { value, done } = await linesReader.read();

0 commit comments

Comments
 (0)