Skip to content

Commit

Permalink
core[patch]: Parse text delta content fields in StringOutputParser
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Jul 29, 2024
1 parent e09b66f commit 090f714
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions langchain-core/src/output_parsers/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class StringOutputParser extends BaseTransformOutputParser<string> {
): string {
switch (content.type) {
case "text":
case "text_delta":
if ("text" in content) {
// Type guard for MessageContentText
return this._textContentToString(content as MessageContentText);
Expand Down

0 comments on commit 090f714

Please sign in to comment.