mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
chore: Upgrade LangChain packages to latest versions (no-changelog) (#11771)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -32,7 +32,9 @@ export class N8nStructuredOutputParser extends StructuredOutputParser<
|
||||
[{ json: { action: 'parse', text } }],
|
||||
]);
|
||||
try {
|
||||
const parsed = await super.parse(text);
|
||||
const jsonString = text.includes('```') ? text.split(/```(?:json)?/)[1] : text;
|
||||
const json = JSON.parse(jsonString.trim());
|
||||
const parsed = await this.schema.parseAsync(json);
|
||||
|
||||
const result = (get(parsed, [STRUCTURED_OUTPUT_KEY, STRUCTURED_OUTPUT_OBJECT_KEY]) ??
|
||||
get(parsed, [STRUCTURED_OUTPUT_KEY, STRUCTURED_OUTPUT_ARRAY_KEY]) ??
|
||||
|
||||
Reference in New Issue
Block a user