Skip to content

Commit ab7e271

Browse files
committed
fix: add response to message table
1 parent 881a8a9 commit ab7e271

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backend/src/llm-apis/vercel-ai-sdk/ai-sdk.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ export const promptAiSdkStream = async function* (
119119
if (chunk.type !== 'text-delta') {
120120
const flushed = stopSequenceHandler.flush()
121121
if (flushed) {
122+
content += flushed
122123
yield {
123124
type: 'text',
124125
text: flushed,
@@ -181,6 +182,7 @@ export const promptAiSdkStream = async function* (
181182

182183
const stopSequenceResult = stopSequenceHandler.process(chunk.text)
183184
if (stopSequenceResult.text) {
185+
content += stopSequenceResult.text
184186
yield {
185187
type: 'text',
186188
text: stopSequenceResult.text,
@@ -190,6 +192,7 @@ export const promptAiSdkStream = async function* (
190192
}
191193
const flushed = stopSequenceHandler.flush()
192194
if (flushed) {
195+
content += flushed
193196
yield {
194197
type: 'text',
195198
text: flushed,

0 commit comments

Comments
 (0)