mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
Update api.chat.ts
This commit is contained in:
parent
55dc81eb1f
commit
8b828c75f0
@ -34,13 +34,13 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
|
||||
|
||||
const result = await streamText(messages, context.cloudflare.env, options);
|
||||
|
||||
return stream.switchSource(result.toAIStream());
|
||||
return stream.switchSource(result.toDataStream());
|
||||
},
|
||||
};
|
||||
|
||||
const result = await streamText(messages, context.cloudflare.env, options);
|
||||
|
||||
stream.switchSource(result.toAIStream());
|
||||
stream.switchSource(result.toDataStream());
|
||||
|
||||
return new Response(stream.readable, {
|
||||
status: 200,
|
||||
|
Loading…
Reference in New Issue
Block a user