Skip to content

Commit

Permalink
fix(claude): adjust the claude stream output result
Browse files Browse the repository at this point in the history
  • Loading branch information
UNICKCHENG committed Sep 1, 2023
1 parent bbdbd0f commit 801e0ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6,872 deletions.
4 changes: 3 additions & 1 deletion libs/claude/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export async function iteratorToStream(response: any) {
content = content.substring(recorder.length);
recorder += content;
}
controller.enqueue(text_encoder(generateStreamResponse(content, task_id)));
for(const chunk of content) {
controller.enqueue(text_encoder(generateStreamResponse(chunk, task_id)));
}
}
},
})
Expand Down
Loading

0 comments on commit 801e0ad

Please sign in to comment.