File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
backend/src/llm-apis/vercel-ai-sdk Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments