mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
refactor(Basic LLM Chain Node): Refactor Basic LLM Chain & add tests (#13850)
This commit is contained in:
@@ -12,15 +12,17 @@ export type N8nOutputParser =
|
||||
|
||||
export { N8nOutputFixingParser, N8nItemListOutputParser, N8nStructuredOutputParser };
|
||||
|
||||
export async function getOptionalOutputParsers(ctx: IExecuteFunctions): Promise<N8nOutputParser[]> {
|
||||
let outputParsers: N8nOutputParser[] = [];
|
||||
export async function getOptionalOutputParser(
|
||||
ctx: IExecuteFunctions,
|
||||
): Promise<N8nOutputParser | undefined> {
|
||||
let outputParser: N8nOutputParser | undefined;
|
||||
|
||||
if (ctx.getNodeParameter('hasOutputParser', 0, true) === true) {
|
||||
outputParsers = (await ctx.getInputConnectionData(
|
||||
outputParser = (await ctx.getInputConnectionData(
|
||||
NodeConnectionType.AiOutputParser,
|
||||
0,
|
||||
)) as N8nOutputParser[];
|
||||
)) as N8nOutputParser;
|
||||
}
|
||||
|
||||
return outputParsers;
|
||||
return outputParser;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user