refactor(Basic LLM Chain Node): Refactor Basic LLM Chain & add tests (#13850)

This commit is contained in:
oleg
2025-03-14 11:38:22 +01:00
committed by GitHub
parent 311553926a
commit 1bfd128717
24 changed files with 1754 additions and 609 deletions

View File

@@ -1,5 +1,5 @@
/* eslint-disable n8n-nodes-base/node-dirname-against-convention */
import { ChatOpenAI } from '@langchain/openai';
import { AzureChatOpenAI } from '@langchain/openai';
import {
NodeConnectionType,
type INodeType,
@@ -184,7 +184,7 @@ export class LmChatAzureOpenAi implements INodeType {
responseFormat?: 'text' | 'json_object';
};
const model = new ChatOpenAI({
const model = new AzureChatOpenAI({
azureOpenAIApiDeploymentName: modelName,
// instance name only needed to set base url
azureOpenAIApiInstanceName: !credentials.endpoint ? credentials.resourceName : undefined,