From 090f714c97adfc4886c053b79a3a1769e54220de Mon Sep 17 00:00:00 2001 From: bracesproul Date: Mon, 29 Jul 2024 09:08:46 -0700 Subject: [PATCH] core[patch]: Parse text delta content fields in StringOutputParser --- langchain-core/src/output_parsers/string.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/langchain-core/src/output_parsers/string.ts b/langchain-core/src/output_parsers/string.ts index 59476cd9baa7..41a30fba50c8 100644 --- a/langchain-core/src/output_parsers/string.ts +++ b/langchain-core/src/output_parsers/string.ts @@ -63,6 +63,7 @@ export class StringOutputParser extends BaseTransformOutputParser { ): string { switch (content.type) { case "text": + case "text_delta": if ("text" in content) { // Type guard for MessageContentText return this._textContentToString(content as MessageContentText);