fix(core): Improve model sub-nodes error handling (#11418)

This commit is contained in:
Eugene
2024-11-08 10:17:11 +01:00
committed by GitHub
parent b496bf3147
commit 57467d0285
24 changed files with 310 additions and 56 deletions

View File

@@ -10,6 +10,7 @@ import {
import { ChatGroq } from '@langchain/groq';
import { getConnectionHintNoticeField } from '../../../utils/sharedFields';
import { N8nLlmTracing } from '../N8nLlmTracing';
import { makeN8nLlmFailedAttemptHandler } from '../n8nLlmFailedAttemptHandler';
export class LmChatGroq implements INodeType {
description: INodeTypeDescription = {
@@ -144,6 +145,7 @@ export class LmChatGroq implements INodeType {
maxTokens: options.maxTokensToSample,
temperature: options.temperature,
callbacks: [new N8nLlmTracing(this)],
onFailedAttempt: makeN8nLlmFailedAttemptHandler(this),
});
return {