From 75c3f6404dfcefa7a3fe661aa6bb95cb75164962 Mon Sep 17 00:00:00 2001 From: marknguyen1302 Date: Fri, 26 Jul 2024 15:35:02 +0700 Subject: [PATCH] fix: transform anthropic response (#925) --- cortex-js/src/domain/abstracts/oai.abstract.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cortex-js/src/domain/abstracts/oai.abstract.ts b/cortex-js/src/domain/abstracts/oai.abstract.ts index ae1dc95e4..eef2e1c16 100644 --- a/cortex-js/src/domain/abstracts/oai.abstract.ts +++ b/cortex-js/src/domain/abstracts/oai.abstract.ts @@ -56,7 +56,7 @@ export abstract class OAIEngineExtension extends EngineExtension { if (line.trim().length > 0) { const transformedLine = transformResponse(line); if (transformedLine) { - transformedLines.push(transformedLine); + transformedLines.push(`data: ${transformedLine}\n\n`); } } }