mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(AI Agent Node): Move model retrieval into try/catch to fix continueOnFail handling (#13165)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user