From d03d9276f923d541f9c9ef86b8dc232f2737e30b Mon Sep 17 00:00:00 2001 From: oleg Date: Fri, 23 Feb 2024 09:08:51 +0100 Subject: [PATCH] feat(AI Agent Node): Allow use of Azure Chat model for OpenAI Functions agent (#8725) Signed-off-by: Oleg Ivaniv --- .../credentials/AzureOpenAiApi.credentials.ts | 2 +- .../@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts b/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts index 0828a3e204..28608524c8 100644 --- a/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts +++ b/packages/@n8n/nodes-langchain/credentials/AzureOpenAiApi.credentials.ts @@ -28,7 +28,7 @@ export class AzureOpenAiApi implements ICredentialType { name: 'apiVersion', type: 'string', required: true, - default: '2023-05-15', + default: '2023-07-01-preview', }, ]; diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts index 271bf6c05d..1e3b19cfe2 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/Agent.node.ts @@ -94,7 +94,10 @@ function getInputs( { type: NodeConnectionType.AiLanguageModel, filter: { - nodes: ['@n8n/n8n-nodes-langchain.lmChatOpenAi'], + nodes: [ + '@n8n/n8n-nodes-langchain.lmChatOpenAi', + '@n8n/n8n-nodes-langchain.lmChatAzureOpenAi', + ], }, }, {