fix(AI Agent Node): Move model retrieval into try/catch to fix continueOnFail handling (#13165)

This commit is contained in:
oleg
2025-02-13 15:47:41 +01:00
committed by GitHub
parent ba95f97d10
commit 47c5688618
5 changed files with 602 additions and 172 deletions

View File

@@ -524,16 +524,16 @@ export class ChainLlm implements INodeType {
const items = this.getInputData();
const returnData: INodeExecutionData[] = [];
const llm = (await this.getInputConnectionData(
NodeConnectionType.AiLanguageModel,
0,
)) as BaseLanguageModel;
const outputParsers = await getOptionalOutputParsers(this);
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
try {
let prompt: string;
const llm = (await this.getInputConnectionData(
NodeConnectionType.AiLanguageModel,
0,
)) as BaseLanguageModel;
const outputParsers = await getOptionalOutputParsers(this);
if (this.getNode().typeVersion <= 1.3) {
prompt = this.getNodeParameter('prompt', itemIndex) as string;
} else {