@n8n/n8n-nodes-langchain 1.91.1 → 1.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/credentials/AnthropicApi.credentials.js +8 -1
  2. package/dist/credentials/AnthropicApi.credentials.js.map +1 -1
  3. package/dist/credentials/AzureEntraCognitiveServicesOAuth2Api.credentials.js +150 -0
  4. package/dist/credentials/AzureEntraCognitiveServicesOAuth2Api.credentials.js.map +1 -0
  5. package/dist/known/credentials.json +10 -0
  6. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js +23 -0
  7. package/dist/nodes/agents/Agent/agents/ToolsAgent/description.js.map +1 -1
  8. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js +28 -13
  9. package/dist/nodes/agents/Agent/agents/ToolsAgent/execute.js.map +1 -1
  10. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +39 -21
  11. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js.map +1 -1
  12. package/dist/nodes/chains/ChainLLM/methods/config.js +24 -0
  13. package/dist/nodes/chains/ChainLLM/methods/config.js.map +1 -1
  14. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js +55 -15
  15. package/dist/nodes/chains/ChainRetrievalQA/ChainRetrievalQa.node.js.map +1 -1
  16. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js +54 -11
  17. package/dist/nodes/chains/ChainSummarization/V2/ChainSummarizationV2.node.js.map +1 -1
  18. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js +66 -24
  19. package/dist/nodes/chains/InformationExtractor/InformationExtractor.node.js.map +1 -1
  20. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js +86 -27
  21. package/dist/nodes/chains/SentimentAnalysis/SentimentAnalysis.node.js.map +1 -1
  22. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js +81 -47
  23. package/dist/nodes/chains/TextClassifier/TextClassifier.node.js.map +1 -1
  24. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js +5 -1
  25. package/dist/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.js.map +1 -1
  26. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js +3 -1
  27. package/dist/nodes/llms/LMChatAnthropic/methods/searchModels.js.map +1 -1
  28. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js +63 -123
  29. package/dist/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.js.map +1 -1
  30. package/dist/nodes/llms/LmChatAzureOpenAi/credentials/N8nOAuth2TokenCredential.js +61 -0
  31. package/dist/nodes/llms/LmChatAzureOpenAi/credentials/N8nOAuth2TokenCredential.js.map +1 -0
  32. package/dist/nodes/llms/LmChatAzureOpenAi/credentials/api-key.js +53 -0
  33. package/dist/nodes/llms/LmChatAzureOpenAi/credentials/api-key.js.map +1 -0
  34. package/dist/nodes/llms/LmChatAzureOpenAi/credentials/oauth2.js +54 -0
  35. package/dist/nodes/llms/LmChatAzureOpenAi/credentials/oauth2.js.map +1 -0
  36. package/dist/nodes/llms/LmChatAzureOpenAi/properties.js +155 -0
  37. package/dist/nodes/llms/LmChatAzureOpenAi/properties.js.map +1 -0
  38. package/dist/nodes/llms/LmChatAzureOpenAi/types.js +42 -0
  39. package/dist/nodes/llms/LmChatAzureOpenAi/types.js.map +1 -0
  40. package/dist/types/credentials.json +2 -1
  41. package/dist/types/nodes.json +8 -8
  42. package/package.json +10 -7
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var properties_exports = {};
20
+ __export(properties_exports, {
21
+ properties: () => properties
22
+ });
23
+ module.exports = __toCommonJS(properties_exports);
24
+ var import_n8n_workflow = require("n8n-workflow");
25
+ var import_sharedFields = require("../../../utils/sharedFields");
26
+ var import_types = require("./types");
27
+ const properties = [
28
+ // eslint-disable-next-line n8n-nodes-base/node-param-default-missing
29
+ {
30
+ displayName: "Authentication",
31
+ name: "authentication",
32
+ type: "options",
33
+ default: import_types.AuthenticationType.ApiKey,
34
+ options: [
35
+ {
36
+ name: "API Key",
37
+ value: import_types.AuthenticationType.ApiKey
38
+ },
39
+ {
40
+ name: "Azure Entra ID (OAuth2)",
41
+ value: import_types.AuthenticationType.EntraOAuth2
42
+ }
43
+ ]
44
+ },
45
+ (0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiChain, import_n8n_workflow.NodeConnectionTypes.AiAgent]),
46
+ {
47
+ displayName: 'If using JSON response format, you must include word "json" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.',
48
+ name: "notice",
49
+ type: "notice",
50
+ default: "",
51
+ displayOptions: {
52
+ show: {
53
+ "/options.responseFormat": ["json_object"]
54
+ }
55
+ }
56
+ },
57
+ {
58
+ displayName: "Model (Deployment) Name",
59
+ name: "model",
60
+ type: "string",
61
+ description: "The name of the model(deployment) to use (e.g., gpt-4, gpt-35-turbo)",
62
+ required: true,
63
+ default: ""
64
+ },
65
+ {
66
+ displayName: "Options",
67
+ name: "options",
68
+ placeholder: "Add Option",
69
+ description: "Additional options to add",
70
+ type: "collection",
71
+ default: {},
72
+ options: [
73
+ {
74
+ displayName: "Frequency Penalty",
75
+ name: "frequencyPenalty",
76
+ default: 0,
77
+ typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
78
+ description: "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
79
+ type: "number"
80
+ },
81
+ {
82
+ displayName: "Maximum Number of Tokens",
83
+ name: "maxTokens",
84
+ default: -1,
85
+ description: "The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768). Use -1 for default.",
86
+ type: "number",
87
+ typeOptions: {
88
+ maxValue: 128e3
89
+ }
90
+ },
91
+ {
92
+ displayName: "Response Format",
93
+ name: "responseFormat",
94
+ default: "text",
95
+ type: "options",
96
+ options: [
97
+ {
98
+ name: "Text",
99
+ value: "text",
100
+ description: "Regular text response"
101
+ },
102
+ {
103
+ name: "JSON",
104
+ value: "json_object",
105
+ description: "Enables JSON mode, which should guarantee the message the model generates is valid JSON"
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ displayName: "Presence Penalty",
111
+ name: "presencePenalty",
112
+ default: 0,
113
+ typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
114
+ description: "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics",
115
+ type: "number"
116
+ },
117
+ {
118
+ displayName: "Sampling Temperature",
119
+ name: "temperature",
120
+ default: 0.7,
121
+ typeOptions: { maxValue: 2, minValue: 0, numberPrecision: 1 },
122
+ // Max temp can be 2
123
+ description: "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
124
+ type: "number"
125
+ },
126
+ {
127
+ displayName: "Timeout (Ms)",
128
+ name: "timeout",
129
+ default: 6e4,
130
+ description: "Maximum amount of time a request is allowed to take in milliseconds",
131
+ type: "number"
132
+ },
133
+ {
134
+ displayName: "Max Retries",
135
+ name: "maxRetries",
136
+ default: 2,
137
+ description: "Maximum number of retries to attempt on failure",
138
+ type: "number"
139
+ },
140
+ {
141
+ displayName: "Top P",
142
+ name: "topP",
143
+ default: 1,
144
+ typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
145
+ description: "Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.",
146
+ type: "number"
147
+ }
148
+ ]
149
+ }
150
+ ];
151
+ // Annotate the CommonJS export names for ESM import in node:
152
+ 0 && (module.exports = {
153
+ properties
154
+ });
155
+ //# sourceMappingURL=properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/llms/LmChatAzureOpenAi/properties.ts"],"sourcesContent":["import type { INodeProperties } from 'n8n-workflow';\nimport { NodeConnectionTypes } from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport { AuthenticationType } from './types';\n\nexport const properties: INodeProperties[] = [\n\t// eslint-disable-next-line n8n-nodes-base/node-param-default-missing\n\t{\n\t\tdisplayName: 'Authentication',\n\t\tname: 'authentication',\n\t\ttype: 'options',\n\t\tdefault: AuthenticationType.ApiKey,\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'API Key',\n\t\t\t\tvalue: AuthenticationType.ApiKey,\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Azure Entra ID (OAuth2)',\n\t\t\t\tvalue: AuthenticationType.EntraOAuth2,\n\t\t\t},\n\t\t],\n\t},\n\tgetConnectionHintNoticeField([NodeConnectionTypes.AiChain, NodeConnectionTypes.AiAgent]),\n\t{\n\t\tdisplayName:\n\t\t\t'If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.',\n\t\tname: 'notice',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\t'/options.responseFormat': ['json_object'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Model (Deployment) Name',\n\t\tname: 'model',\n\t\ttype: 'string',\n\t\tdescription: 'The name of the model(deployment) to use (e.g., gpt-4, gpt-35-turbo)',\n\t\trequired: true,\n\t\tdefault: '',\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\n\t\tdescription: 'Additional options to add',\n\t\ttype: 'collection',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Frequency Penalty',\n\t\t\t\tname: 'frequencyPenalty',\n\t\t\t\tdefault: 0,\n\t\t\t\ttypeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },\n\t\t\t\tdescription:\n\t\t\t\t\t\"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim\",\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Maximum Number of Tokens',\n\t\t\t\tname: 'maxTokens',\n\t\t\t\tdefault: -1,\n\t\t\t\tdescription:\n\t\t\t\t\t'The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768). Use -1 for default.',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmaxValue: 128000,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Response Format',\n\t\t\t\tname: 'responseFormat',\n\t\t\t\tdefault: 'text',\n\t\t\t\ttype: 'options',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\tdescription: 'Regular text response',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'JSON',\n\t\t\t\t\t\tvalue: 'json_object',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Enables JSON mode, which should guarantee the message the model generates is valid JSON',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Presence Penalty',\n\t\t\t\tname: 'presencePenalty',\n\t\t\t\tdefault: 0,\n\t\t\t\ttypeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },\n\t\t\t\tdescription:\n\t\t\t\t\t\"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics\",\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Sampling Temperature',\n\t\t\t\tname: 'temperature',\n\t\t\t\tdefault: 0.7,\n\t\t\t\ttypeOptions: { maxValue: 2, minValue: 0, numberPrecision: 1 }, // Max temp can be 2\n\t\t\t\tdescription:\n\t\t\t\t\t'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Timeout (Ms)',\n\t\t\t\tname: 'timeout',\n\t\t\t\tdefault: 60000,\n\t\t\t\tdescription: 'Maximum amount of time a request is allowed to take in milliseconds',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Max Retries',\n\t\t\t\tname: 'maxRetries',\n\t\t\t\tdefault: 2,\n\t\t\t\tdescription: 'Maximum number of retries to attempt on failure',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Top P',\n\t\t\t\tname: 'topP',\n\t\t\t\tdefault: 1,\n\t\t\t\ttypeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },\n\t\t\t\tdescription:\n\t\t\t\t\t'Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t],\n\t},\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAoC;AAEpC,0BAA6C;AAE7C,mBAAmC;AAE5B,MAAM,aAAgC;AAAA;AAAA,EAE5C;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS,gCAAmB;AAAA,IAC5B,SAAS;AAAA,MACR;AAAA,QACC,MAAM;AAAA,QACN,OAAO,gCAAmB;AAAA,MAC3B;AAAA,MACA;AAAA,QACC,MAAM;AAAA,QACN,OAAO,gCAAmB;AAAA,MAC3B;AAAA,IACD;AAAA,EACD;AAAA,MACA,kDAA6B,CAAC,wCAAoB,SAAS,wCAAoB,OAAO,CAAC;AAAA,EACvF;AAAA,IACC,aACC;AAAA,IACD,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,gBAAgB;AAAA,MACf,MAAM;AAAA,QACL,2BAA2B,CAAC,aAAa;AAAA,MAC1C;AAAA,IACD;AAAA,EACD;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,SAAS;AAAA,EACV;AAAA,EACA;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,MAAM;AAAA,IACN,SAAS,CAAC;AAAA,IACV,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa,EAAE,UAAU,GAAG,UAAU,IAAI,iBAAiB,EAAE;AAAA,QAC7D,aACC;AAAA,QACD,MAAM;AAAA,MACP;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aACC;AAAA,QACD,MAAM;AAAA,QACN,aAAa;AAAA,UACZ,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SAAS;AAAA,UACR;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACA;AAAA,YACC,MAAM;AAAA,YACN,OAAO;AAAA,YACP,aACC;AAAA,UACF;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa,EAAE,UAAU,GAAG,UAAU,IAAI,iBAAiB,EAAE;AAAA,QAC7D,aACC;AAAA,QACD,MAAM;AAAA,MACP;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa,EAAE,UAAU,GAAG,UAAU,GAAG,iBAAiB,EAAE;AAAA;AAAA,QAC5D,aACC;AAAA,QACD,MAAM;AAAA,MACP;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,MAAM;AAAA,MACP;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,QACb,MAAM;AAAA,MACP;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa,EAAE,UAAU,GAAG,UAAU,GAAG,iBAAiB,EAAE;AAAA,QAC5D,aACC;AAAA,QACD,MAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var types_exports = {};
20
+ __export(types_exports, {
21
+ AuthenticationType: () => AuthenticationType,
22
+ AzureOpenAIErrorType: () => AzureOpenAIErrorType
23
+ });
24
+ module.exports = __toCommonJS(types_exports);
25
+ var AuthenticationType = /* @__PURE__ */ ((AuthenticationType2) => {
26
+ AuthenticationType2["ApiKey"] = "azureOpenAiApi";
27
+ AuthenticationType2["EntraOAuth2"] = "azureEntraCognitiveServicesOAuth2Api";
28
+ return AuthenticationType2;
29
+ })(AuthenticationType || {});
30
+ var AzureOpenAIErrorType = /* @__PURE__ */ ((AzureOpenAIErrorType2) => {
31
+ AzureOpenAIErrorType2["AuthenticationError"] = "AuthenticationError";
32
+ AzureOpenAIErrorType2["ConfigurationError"] = "ConfigurationError";
33
+ AzureOpenAIErrorType2["APIError"] = "APIError";
34
+ AzureOpenAIErrorType2["UnknownError"] = "UnknownError";
35
+ return AzureOpenAIErrorType2;
36
+ })(AzureOpenAIErrorType || {});
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ AuthenticationType,
40
+ AzureOpenAIErrorType
41
+ });
42
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../nodes/llms/LmChatAzureOpenAi/types.ts"],"sourcesContent":["import type { OAuth2CredentialData } from '@n8n/client-oauth2';\n/**\n * Common interfaces for Azure OpenAI configuration\n */\n\n/**\n * Basic Azure OpenAI API configuration options\n */\nexport interface AzureOpenAIConfig {\n\tapiVersion: string;\n\tresourceName: string;\n\tendpoint?: string;\n}\n\n/**\n * Configuration for API Key authentication\n */\nexport interface AzureOpenAIApiKeyConfig extends AzureOpenAIConfig {\n\tapiKey: string;\n}\n\n/**\n * Azure OpenAI node options\n */\nexport interface AzureOpenAIOptions {\n\tfrequencyPenalty?: number;\n\tmaxTokens?: number;\n\tmaxRetries?: number;\n\ttimeout?: number;\n\tpresencePenalty?: number;\n\ttemperature?: number;\n\ttopP?: number;\n\tresponseFormat?: 'text' | 'json_object';\n}\n\n/**\n * Base model configuration that can be passed to AzureChatOpenAI constructor\n */\nexport interface AzureOpenAIBaseModelConfig {\n\tazureOpenAIApiInstanceName: string;\n\tazureOpenAIApiVersion: string;\n\tazureOpenAIEndpoint?: string;\n}\n\n/**\n * API Key model configuration that can be passed to AzureChatOpenAI constructor\n */\nexport interface AzureOpenAIApiKeyModelConfig extends AzureOpenAIBaseModelConfig {\n\tazureOpenAIApiKey: string;\n\tazureADTokenProvider?: undefined;\n}\n\n/**\n * OAuth2 model configuration that can be passed to AzureChatOpenAI constructor\n */\nexport interface AzureOpenAIOAuth2ModelConfig extends AzureOpenAIBaseModelConfig {\n\tazureOpenAIApiKey?: undefined;\n\tazureADTokenProvider: () => Promise<string>;\n}\n\n/**\n * Authentication types supported by Azure OpenAI node\n */\nexport const enum AuthenticationType {\n\tApiKey = 'azureOpenAiApi',\n\tEntraOAuth2 = 'azureEntraCognitiveServicesOAuth2Api',\n}\n\n/**\n * Error types for Azure OpenAI node\n */\nexport const enum AzureOpenAIErrorType {\n\tAuthenticationError = 'AuthenticationError',\n\tConfigurationError = 'ConfigurationError',\n\tAPIError = 'APIError',\n\tUnknownError = 'UnknownError',\n}\n\n/**\n * OAuth2 credential type used by Azure OpenAI node\n */\ntype TokenData = OAuth2CredentialData['oauthTokenData'] & {\n\texpires_on: number;\n\text_expires_on: number;\n};\nexport type AzureEntraCognitiveServicesOAuth2ApiCredential = OAuth2CredentialData & {\n\tcustomScopes: boolean;\n\tauthentication: string;\n\tapiVersion: string;\n\tendpoint: string;\n\tresourceName: string;\n\ttenantId: string;\n\toauthTokenData: TokenData;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+DO,IAAW,qBAAX,kBAAWA,wBAAX;AACN,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,iBAAc;AAFG,SAAAA;AAAA,GAAA;AAQX,IAAW,uBAAX,kBAAWC,0BAAX;AACN,EAAAA,sBAAA,yBAAsB;AACtB,EAAAA,sBAAA,wBAAqB;AACrB,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,kBAAe;AAJE,SAAAA;AAAA,GAAA;","names":["AuthenticationType","AzureOpenAIErrorType"]}
@@ -1,6 +1,7 @@
1
1
  [
2
- {"name":"anthropicApi","displayName":"Anthropic","documentationUrl":"anthropic","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"x-api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://api.anthropic.com","url":"/v1/messages","method":"POST","headers":{"anthropic-version":"2023-06-01"},"body":{"model":"claude-3-haiku-20240307","messages":[{"role":"user","content":"Hey"}],"max_tokens":1}}},"supportedNodes":["lmChatAnthropic"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatAnthropic/anthropic.svg"},
2
+ {"name":"anthropicApi","displayName":"Anthropic","documentationUrl":"anthropic","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"string","default":"https://api.anthropic.com","description":"Override the default base URL for the API"}],"authenticate":{"type":"generic","properties":{"headers":{"x-api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials?.url}}","url":"/v1/messages","method":"POST","headers":{"anthropic-version":"2023-06-01"},"body":{"model":"claude-3-haiku-20240307","messages":[{"role":"user","content":"Hey"}],"max_tokens":1}}},"supportedNodes":["lmChatAnthropic"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatAnthropic/anthropic.svg"},
3
3
  {"name":"azureOpenAiApi","displayName":"Azure Open AI","documentationUrl":"azureopenai","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Resource Name","name":"resourceName","type":"string","required":true,"default":""},{"displayName":"API Version","name":"apiVersion","type":"string","required":true,"default":"2023-07-01-preview"},{"displayName":"Endpoint","name":"endpoint","type":"string","placeholder":"https://westeurope.api.cognitive.microsoft.com"}],"authenticate":{"type":"generic","properties":{"headers":{"api-key":"={{$credentials.apiKey}}"}}},"supportedNodes":["embeddingsAzureOpenAi","lmChatAzureOpenAi"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsAzureOpenAi/azure.svg"},
4
+ {"name":"azureEntraCognitiveServicesOAuth2Api","displayName":"Azure Entra ID (Azure Active Directory) API","extends":["oAuth2Api"],"documentationUrl":"azureEntraCognitiveServicesOAuth2Api","properties":[{"displayName":"Grant Type","name":"grantType","type":"hidden","default":"authorizationCode"},{"displayName":"Resource Name","name":"resourceName","type":"string","required":true,"default":""},{"displayName":"API Version","name":"apiVersion","type":"string","required":true,"default":"2024-12-01-preview"},{"displayName":"Endpoint","name":"endpoint","type":"string","placeholder":"https://westeurope.api.cognitive.microsoft.com"},{"displayName":"Tenant ID","name":"tenantId","type":"string","default":"common","description":"Enter your Azure Tenant ID (Directory ID) or keep \"common\" for multi-tenant apps. Using a specific Tenant ID is generally recommended and required for certain authentication flows.","placeholder":"e.g., xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx or common"},{"displayName":"Authorization URL","name":"authUrl","type":"string","default":"https://login.microsoftonline.com/$TENANT_ID/oauth2/authorize"},{"displayName":"Access Token URL","name":"accessTokenUrl","type":"string","default":"https://login.microsoftonline.com/$TENANT_ID/oauth2/token"},{"displayName":"Client ID","name":"clientId","type":"string","required":true,"default":"","description":"Client ID obtained from the Azure AD App Registration"},{"displayName":"Client Secret","name":"clientSecret","type":"string","required":true,"typeOptions":{"password":true},"default":"","description":"Client Secret obtained from the Azure AD App Registration"},{"displayName":"Additional Body Properties","name":"additionalBodyProperties","type":"hidden","default":"{\"grant_type\": \"client_credentials\", \"resource\": \"https://cognitiveservices.azure.com/\"}"},{"displayName":"Authentication","name":"authentication","type":"hidden","default":"body"},{"displayName":"Custom Scopes","name":"customScopes","type":"boolean","default":false,"description":"Define custom scopes. You might need this if the default scopes are not sufficient or if you want to minimize permissions. Ensure you include \"openid\" and \"offline_access\"."},{"displayName":"Auth URI Query Parameters","name":"authQueryParameters","type":"hidden","default":"","description":"For some services additional query parameters have to be set which can be defined here","placeholder":""},{"displayName":"Enabled Scopes","name":"enabledScopes","type":"string","displayOptions":{"show":{"customScopes":[true]}},"default":"openid offline_access","placeholder":"openid offline_access","description":"Space-separated list of scopes to request."},{"displayName":"Scope","name":"scope","type":"hidden","default":"={{ $self.customScopes ? $self.enabledScopes : \"openid offline_access\"}}"}],"supportedNodes":["lmChatAzureOpenAi"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatAzureOpenAi/azure.svg"},
4
5
  {"name":"cohereApi","displayName":"CohereApi","documentationUrl":"cohere","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://api.cohere.ai","url":"/v1/models?page_size=1"}},"supportedNodes":["embeddingsCohere","lmCohere"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsCohere/cohere.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsCohere/cohere.dark.svg"}},
5
6
  {"name":"deepSeekApi","displayName":"DeepSeek","documentationUrl":"deepseek","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://api.deepseek.com"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChatDeepSeek"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatDeepSeek/deepseek.svg"},
6
7
  {"name":"googlePalmApi","displayName":"Google Gemini(PaLM) Api","documentationUrl":"google","properties":[{"displayName":"Host","name":"host","required":true,"type":"string","default":"https://generativelanguage.googleapis.com"},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.host}}/v1beta/models"}},"supportedNodes":["embeddingsGoogleGemini","lmChatGoogleGemini"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsGoogleGemini/google.svg"},