Skip to content

Commit

Permalink
Fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere committed Apr 17, 2024
1 parent e01196c commit af59c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/streaming-fetcher/Stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Stream<T> implements AsyncIterable<T> {
}

private async *iterMessages(): AsyncGenerator<T, void> {
const sse = Boolean(this.response?.headers?.get("content-type") === "text/event-stream");
const sse = Boolean(this.response?.headers?.get("content-type")?.includes("text/event-stream"));
const stream: StreamUtils<{}> = sse ? StreamUtils.fromSSEResponse(this.response, null as any):StreamUtils.fromReadableStream(this.response.body , null as any);

for await (const obj of stream) {
Expand Down

0 comments on commit af59c9d

Please sign in to comment.