Skip to content

Commit

Permalink
fix: streaming for express
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusschiesser committed May 22, 2024
1 parent f5da662 commit 69c2e16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-cameras-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-llama": patch
---

Fix streaming for Express
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ export const chat = async (req: Request, res: Response) => {
image_url: data?.imageUrl,
},
});
const processedStream = stream.pipeThrough(vercelStreamData.stream);

return streamToResponse(processedStream, res);
return streamToResponse(stream, res, {}, vercelStreamData);
} catch (error) {
console.error("[LlamaIndex]", error);
return res.status(500).json({
Expand Down

0 comments on commit 69c2e16

Please sign in to comment.