🐛 Fix streaming text selection (#1444)

This commit is contained in:
Baptiste Arnaud
2024-04-12 11:02:28 +02:00
committed by GitHub
parent d608a30e47
commit 3f367800df
10 changed files with 52 additions and 25 deletions

View File

@@ -54,12 +54,17 @@ export const executeClientSideAction = async ({
'streamOpenAiChatCompletion' in clientSideAction ||
'stream' in clientSideAction
) {
const runtime =
'streamOpenAiChatCompletion' in clientSideAction
? clientSideAction.streamOpenAiChatCompletion.runtime
: clientSideAction.runtime
const { error, message } = await streamChat(context)({
messages:
'streamOpenAiChatCompletion' in clientSideAction
? clientSideAction.streamOpenAiChatCompletion?.messages
: undefined,
onMessageStream,
runtime,
})
if (error)
return {