@n8n/n8n-nodes-langchain 0.15.1 → 0.16.1

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 (81) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/AzureOpenAiApi.credentials.js +1 -1
  3. package/dist/credentials/AzureOpenAiApi.credentials.js.map +1 -1
  4. package/dist/known/credentials.json +1 -0
  5. package/dist/known/nodes.json +4 -0
  6. package/dist/nodes/agents/Agent/Agent.node.js +22 -33
  7. package/dist/nodes/agents/Agent/Agent.node.js.map +1 -1
  8. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.d.ts +1 -1
  9. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js +2 -2
  10. package/dist/nodes/agents/Agent/agents/ConversationalAgent/execute.js.map +1 -1
  11. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.d.ts +1 -1
  12. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js +2 -2
  13. package/dist/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.js.map +1 -1
  14. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.d.ts +1 -1
  15. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js +2 -2
  16. package/dist/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.js.map +1 -1
  17. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.d.ts +1 -1
  18. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js +2 -2
  19. package/dist/nodes/agents/Agent/agents/ReActAgent/execute.js.map +1 -1
  20. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js +92 -19
  21. package/dist/nodes/agents/Agent/agents/SqlAgent/description.js.map +1 -1
  22. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.d.ts +1 -1
  23. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js +28 -4
  24. package/dist/nodes/agents/Agent/agents/SqlAgent/execute.js.map +1 -1
  25. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.d.ts +1 -1
  26. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js +13 -3
  27. package/dist/nodes/agents/Agent/agents/SqlAgent/other/handlers/sqlite.js.map +1 -1
  28. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.d.ts +1 -1
  29. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js +2 -0
  30. package/dist/nodes/agents/Agent/agents/SqlAgent/other/prompts.js.map +1 -1
  31. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js +4 -2
  32. package/dist/nodes/agents/OpenAiAssistant/OpenAiAssistant.node.js.map +1 -1
  33. package/dist/nodes/chains/ChainLLM/ChainLlm.node.js +1 -1
  34. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.d.ts +5 -0
  35. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js +54 -0
  36. package/dist/nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.js.map +1 -0
  37. package/dist/nodes/embeddings/EmbeddingsOllama/ollama.svg +1 -0
  38. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js +4 -91
  39. package/dist/nodes/llms/LMChatOllama/LmChatOllama.node.js.map +1 -1
  40. package/dist/nodes/llms/LMOllama/LmOllama.node.js +4 -91
  41. package/dist/nodes/llms/LMOllama/LmOllama.node.js.map +1 -1
  42. package/dist/nodes/llms/LMOllama/description.d.ts +4 -0
  43. package/dist/nodes/llms/LMOllama/description.js +97 -0
  44. package/dist/nodes/llms/LMOllama/description.js.map +1 -0
  45. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js +21 -3
  46. package/dist/nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.js.map +1 -1
  47. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js +20 -2
  48. package/dist/nodes/memory/MemoryMotorhead/MemoryMotorhead.node.js.map +1 -1
  49. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js +21 -3
  50. package/dist/nodes/memory/MemoryRedisChat/MemoryRedisChat.node.js.map +1 -1
  51. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js +27 -8
  52. package/dist/nodes/memory/MemoryXata/MemoryXata.node.js.map +1 -1
  53. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +20 -2
  54. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
  55. package/dist/nodes/memory/descriptions.d.ts +3 -0
  56. package/dist/nodes/memory/descriptions.js +34 -0
  57. package/dist/nodes/memory/descriptions.js.map +1 -0
  58. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js +34 -18
  59. package/dist/nodes/output_parser/OutputParserStructured/OutputParserStructured.node.js.map +1 -1
  60. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js +3 -1
  61. package/dist/nodes/vendors/OpenAi/actions/assistant/message.operation.js.map +1 -1
  62. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js +2 -2
  63. package/dist/nodes/vendors/OpenAi/actions/file/upload.operation.js.map +1 -1
  64. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js +11 -1
  65. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +1 -1
  66. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js +1 -1
  67. package/dist/nodes/vendors/OpenAi/actions/versionDescription.js.map +1 -1
  68. package/dist/types/credentials.json +1 -1
  69. package/dist/types/nodes.json +30 -29
  70. package/dist/utils/descriptions.d.ts +3 -0
  71. package/dist/utils/descriptions.js +33 -0
  72. package/dist/utils/descriptions.js.map +1 -0
  73. package/dist/utils/helpers.d.ts +5 -0
  74. package/dist/utils/helpers.js +59 -1
  75. package/dist/utils/helpers.js.map +1 -1
  76. package/dist/utils/logWrapper.d.ts +1 -1
  77. package/dist/utils/logWrapper.js +22 -20
  78. package/dist/utils/logWrapper.js.map +1 -1
  79. package/dist/utils/sharedFields.js +7 -2
  80. package/dist/utils/sharedFields.js.map +1 -1
  81. package/package.json +5 -4
@@ -1,2 +1,2 @@
1
1
  export declare const SQL_PREFIX = "You are an agent designed to interact with an SQL database.\nGiven an input question, create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.\nUnless the user specifies a specific number of examples they wish to obtain, always limit your query to at most {top_k} results using the LIMIT clause.\nYou can order the results by a relevant column to return the most interesting examples in the database.\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\nYou have access to tools for interacting with the database.\nOnly use the below tools. Only use the information returned by the below tools to construct your final answer.\nYou MUST double check your query before executing it. If you get an error while executing a query, rewrite the query and try again.\n\nDO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n\nIf the question does not seem related to the database, just return \"I don't know\" as the answer.";
2
- export declare const SQL_SUFFIX = "Begin!\n\nQuestion: {input}\nThought: I should look at the tables in the database to see what I can query.\n{agent_scratchpad}";
2
+ export declare const SQL_SUFFIX = "Begin!\nChat History:\n{chatHistory}\n\nQuestion: {input}\nThought: I should look at the tables in the database to see what I can query.\n{agent_scratchpad}";
@@ -14,6 +14,8 @@ DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the databa
14
14
 
15
15
  If the question does not seem related to the database, just return "I don't know" as the answer.`;
16
16
  exports.SQL_SUFFIX = `Begin!
17
+ Chat History:
18
+ {chatHistory}
17
19
 
18
20
  Question: {input}
19
21
  Thought: I should look at the tables in the database to see what I can query.
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../../../../nodes/agents/Agent/agents/SqlAgent/other/prompts.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;;;;;;;;;;;iGAWuE,CAAC;AAErF,QAAA,UAAU,GAAG;;;;mBAIP,CAAC"}
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../../../../nodes/agents/Agent/agents/SqlAgent/other/prompts.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;;;;;;;;;;;iGAWuE,CAAC;AAErF,QAAA,UAAU,GAAG;;;;;;mBAMP,CAAC"}
@@ -5,6 +5,7 @@ const agents_1 = require("langchain/agents");
5
5
  const openai_1 = require("openai");
6
6
  const openai_assistant_1 = require("langchain/experimental/openai_assistant");
7
7
  const n8n_workflow_1 = require("n8n-workflow");
8
+ const helpers_1 = require("../../../utils/helpers");
8
9
  const utils_1 = require("./utils");
9
10
  class OpenAiAssistant {
10
11
  constructor() {
@@ -14,7 +15,7 @@ class OpenAiAssistant {
14
15
  hidden: true,
15
16
  icon: 'fa:robot',
16
17
  group: ['transform'],
17
- version: 1,
18
+ version: [1, 1.1],
18
19
  description: 'Utilizes Assistant API from Open AI.',
19
20
  subtitle: 'Open AI Assistant',
20
21
  defaults: {
@@ -302,7 +303,8 @@ class OpenAiAssistant {
302
303
  }
303
304
  async execute() {
304
305
  var _a, _b, _c, _d;
305
- const tools = (await this.getInputConnectionData("ai_tool", 0));
306
+ const nodeVersion = this.getNode().typeVersion;
307
+ const tools = await (0, helpers_1.getConnectedTools)(this, nodeVersion > 1);
306
308
  const credentials = await this.getCredentials('openAiApi');
307
309
  const items = this.getInputData();
308
310
  const returnData = [];
@@ -1 +1 @@
1
- {"version":3,"file":"OpenAiAssistant.node.js","sourceRoot":"","sources":["../../../../nodes/agents/OpenAiAssistant/OpenAiAssistant.node.ts"],"names":[],"mappings":";;;AAAA,6CAAiD;AACjD,mCAAgD;AAChD,8EAAkF;AAElF,+CAAsE;AAQtE,mCAAsD;AAEtD,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAA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AQ,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC;gBACzC,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE;gBACvC,OAAO,EAAE,MAAA,OAAO,CAAC,OAAO,mCAAI,KAAK;aACjC,CAAC,CAAC;YAEH,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;CACD;AAnXD,0CAmXC"}
1
+ {"version":3,"file":"OpenAiAssistant.node.js","sourceRoot":"","sources":["../../../../nodes/agents/OpenAiAssistant/OpenAiAssistant.node.ts"],"names":[],"mappings":";;;AAAA,6CAAiD;AACjD,mCAAgD;AAChD,8EAAkF;AAClF,+CAAsE;AAQtE,oDAA2D;AAC3D,mCAAsD;AAEtD,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC;YACjB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,mBAAmB;YAC7B,QAAQ,EAAE;gBACT,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,SAAS;aAChB;YACD,KAAK,EAAE;gBACN,KAAK,EAAE,CAAC,WAAW,CAAC;gBACpB,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,QAAQ,CAAC;iBACd;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,wGAAwG;yBAC7G;qBACD;iBACD;aACD;YACD,MAAM,EAAE;gBACP,EAAE,IAAI,QAAyB,EAAE;gBAC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,CAAC,CAAC;IACjD,CAAC;CACD;AApXD,0CAoXC"}
@@ -389,7 +389,7 @@ class ChainLlm {
389
389
  const outputParsers = await (0, helpers_1.getOptionalOutputParsers)(this);
390
390
  for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
391
391
  let prompt;
392
- if (this.getNode().typeVersion <= 1.2) {
392
+ if (this.getNode().typeVersion <= 1.3) {
393
393
  prompt = this.getNodeParameter('prompt', itemIndex);
394
394
  }
395
395
  else {
@@ -0,0 +1,5 @@
1
+ import { type IExecuteFunctions, type INodeType, type INodeTypeDescription, type SupplyData } from 'n8n-workflow';
2
+ export declare class EmbeddingsOllama implements INodeType {
3
+ description: INodeTypeDescription;
4
+ supplyData(this: IExecuteFunctions, itemIndex: number): Promise<SupplyData>;
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmbeddingsOllama = void 0;
4
+ const ollama_1 = require("langchain/embeddings/ollama");
5
+ const logWrapper_1 = require("../../../utils/logWrapper");
6
+ const sharedFields_1 = require("../../../utils/sharedFields");
7
+ const description_1 = require("../../llms/LMOllama/description");
8
+ class EmbeddingsOllama {
9
+ constructor() {
10
+ this.description = {
11
+ displayName: 'Embeddings Ollama',
12
+ name: 'embeddingsOllama',
13
+ icon: 'file:ollama.svg',
14
+ group: ['transform'],
15
+ version: 1,
16
+ description: 'Use Ollama Embeddings',
17
+ defaults: {
18
+ name: 'Embeddings Ollama',
19
+ },
20
+ ...description_1.ollamaDescription,
21
+ codex: {
22
+ categories: ['AI'],
23
+ subcategories: {
24
+ AI: ['Embeddings'],
25
+ },
26
+ resources: {
27
+ primaryDocumentation: [
28
+ {
29
+ url: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsollama/',
30
+ },
31
+ ],
32
+ },
33
+ },
34
+ inputs: [],
35
+ outputs: ["ai_embedding"],
36
+ outputNames: ['Embeddings'],
37
+ properties: [(0, sharedFields_1.getConnectionHintNoticeField)(["ai_vectorStore"]), description_1.ollamaModel],
38
+ };
39
+ }
40
+ async supplyData(itemIndex) {
41
+ this.logger.verbose('Supply data for embeddings Ollama');
42
+ const modelName = this.getNodeParameter('model', itemIndex);
43
+ const credentials = await this.getCredentials('ollamaApi');
44
+ const embeddings = new ollama_1.OllamaEmbeddings({
45
+ baseUrl: credentials.baseUrl,
46
+ model: modelName,
47
+ });
48
+ return {
49
+ response: (0, logWrapper_1.logWrapper)(embeddings, this),
50
+ };
51
+ }
52
+ }
53
+ exports.EmbeddingsOllama = EmbeddingsOllama;
54
+ //# sourceMappingURL=EmbeddingsOllama.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmbeddingsOllama.node.js","sourceRoot":"","sources":["../../../../nodes/embeddings/EmbeddingsOllama/EmbeddingsOllama.node.ts"],"names":[],"mappings":";;;AAQA,wDAA+D;AAC/D,0DAAuD;AACvD,8DAA2E;AAC3E,iEAAiF;AAEjF,MAAa,gBAAgB;IAA7B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,GAAG,+BAAiB;YACpB,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,YAAY,CAAC;iBAClB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,wGAAwG;yBAC7G;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,gBAAgC;YACzC,WAAW,EAAE,CAAC,YAAY,CAAC;YAC3B,UAAU,EAAE,CAAC,IAAA,2CAA4B,EAAC,kBAAkC,CAAC,EAAE,yBAAW,CAAC;SAC3F,CAAC;IAgBH,CAAC;IAdA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QACzD,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAW,CAAC;QACtE,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAE3D,MAAM,UAAU,GAAG,IAAI,yBAAgB,CAAC;YACvC,OAAO,EAAE,WAAW,CAAC,OAAiB;YACtC,KAAK,EAAE,SAAS;SAChB,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,UAAU,EAAE,IAAI,CAAC;SACtC,CAAC;IACH,CAAC;CACD;AA/CD,4CA+CC"}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="241.333" height="341.333" version="1.0" viewBox="0 0 181 256"><g fill="#7D7D87"><path d="M37.7 19.5c-5.2 1.8-8.3 4.9-11.7 11.6-4.5 8.9-6.2 19.2-5.8 35.5l.3 14.2-5.8 6.1c-14.8 15.5-18.5 38.7-9.2 57.4l3.4 6.9-2 4.4c-3.4 8.2-5 16.4-5 26.3 0 10.8 1.8 19 5.8 26.2l2.6 4.8-2.1 4.9c-1.2 2.7-2.6 7.1-3.2 9.8-1.4 6.2-1.5 22.1-.1 25.7 1 2.6 1.4 2.7 7.6 2.7 7.3 0 7 .4 5.3-8.6-1.5-8.2.2-18.8 4.2-26.6 3.7-7 3.8-10.4.5-14.8-4.7-6.4-6.8-13.6-6.9-24-.1-10.3 1.4-16 6.6-26.1 3.1-6.1 2.9-8.7-1-12.2-1.1-1-3.1-4.2-4.3-7-1.9-4.2-2.4-6.9-2.3-14.2 0-11.4 2.5-18.3 9.5-26 7-7.6 14.2-11 23.9-11.2 4.1 0 7.8-.2 8.2-.2.4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 6-7.6 12-7.1 20.1.5 7.6 3.5 12.9 10.6 18.3 6.2 4.7 12.7 6.3 25.7 6.3 17.2 0 25.8-3.6 32.9-13.8 4.2-5.9 4.8-15.5 1.6-23-2.9-6.8-11.1-14.3-18.8-17.3-8-3.1-20.7-3.6-28.4-1m25.7 10c16.1 7.1 19.4 23.2 6.6 31.8-4.9 3.3-9.4 4.3-19.6 4.3s-14.7-1-19.6-4.3c-17.8-12-3.2-35.6 21.1-34.3 3.9.2 8.6 1.2 11.5 2.5"/><path d="M83.8 140.1c-2.5 1.4-2.2 4.4.7 6.7 2 1.6 2.4 2.6 1.9 4.9-.7 3.6 1.5 5.8 5.1 4.9 2.1-.5 2.5-1.2 2.5-4.6 0-2.9.5-4.2 2-5 2.7-1.5 2.7-6.6 0-7.5-1-.3-2.8-.1-4 .5-1.4.7-2.6.8-3.9 0-2.3-1.2-2.2-1.2-4.3.1m-44.1-18.9c-.9.7-2.3 3-3.2 5-2.1 5.3-.1 10.3 4.7 11.6 4.3 1.1 6 .6 9.2-2.7 4-4.1 4.3-8.1 1.1-11.9-2.1-2.5-3.4-3.2-6.4-3.2-2 0-4.5.6-5.4 1.2m89.8 2c-3.2 3.8-2.9 7.8 1.1 11.9 3.2 3.3 4.9 3.8 9.2 2.7 4.9-1.3 6.8-6.2 4.6-11.8-1.9-4.7-3.8-6-8.7-6-2.7 0-4.1.7-6.2 3.2"/></g></svg>
@@ -4,6 +4,7 @@ exports.LmChatOllama = void 0;
4
4
  const ollama_1 = require("langchain/chat_models/ollama");
5
5
  const logWrapper_1 = require("../../../utils/logWrapper");
6
6
  const sharedFields_1 = require("../../../utils/sharedFields");
7
+ const description_1 = require("../LMOllama/description");
7
8
  class LmChatOllama {
8
9
  constructor() {
9
10
  this.description = {
@@ -32,99 +33,11 @@ class LmChatOllama {
32
33
  inputs: [],
33
34
  outputs: ["ai_languageModel"],
34
35
  outputNames: ['Model'],
35
- credentials: [
36
- {
37
- name: 'ollamaApi',
38
- required: true,
39
- },
40
- ],
41
- requestDefaults: {
42
- ignoreHttpStatusErrors: true,
43
- baseURL: '={{ $credentials.baseUrl.replace(new RegExp("/$"), "") }}',
44
- },
36
+ ...description_1.ollamaDescription,
45
37
  properties: [
46
38
  (0, sharedFields_1.getConnectionHintNoticeField)(["ai_chain", "ai_agent"]),
47
- {
48
- displayName: 'Model',
49
- name: 'model',
50
- type: 'options',
51
- default: 'llama2',
52
- description: 'The model which will generate the completion. To download models, visit <a href="https://ollama.ai/library">Ollama Models Library</a>.',
53
- typeOptions: {
54
- loadOptions: {
55
- routing: {
56
- request: {
57
- method: 'GET',
58
- url: '/api/tags',
59
- },
60
- output: {
61
- postReceive: [
62
- {
63
- type: 'rootProperty',
64
- properties: {
65
- property: 'models',
66
- },
67
- },
68
- {
69
- type: 'setKeyValue',
70
- properties: {
71
- name: '={{$responseItem.name}}',
72
- value: '={{$responseItem.name}}',
73
- },
74
- },
75
- {
76
- type: 'sort',
77
- properties: {
78
- key: 'name',
79
- },
80
- },
81
- ],
82
- },
83
- },
84
- },
85
- },
86
- routing: {
87
- send: {
88
- type: 'body',
89
- property: 'model',
90
- },
91
- },
92
- required: true,
93
- },
94
- {
95
- displayName: 'Options',
96
- name: 'options',
97
- placeholder: 'Add Option',
98
- description: 'Additional options to add',
99
- type: 'collection',
100
- default: {},
101
- options: [
102
- {
103
- displayName: 'Sampling Temperature',
104
- name: 'temperature',
105
- default: 0.7,
106
- typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
107
- description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
108
- type: 'number',
109
- },
110
- {
111
- displayName: 'Top K',
112
- name: 'topK',
113
- default: -1,
114
- typeOptions: { maxValue: 1, minValue: -1, numberPrecision: 1 },
115
- description: 'Used to remove "long tail" low probability responses. Defaults to -1, which disables it.',
116
- type: 'number',
117
- },
118
- {
119
- displayName: 'Top P',
120
- name: 'topP',
121
- default: 1,
122
- typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
123
- 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.',
124
- type: 'number',
125
- },
126
- ],
127
- },
39
+ description_1.ollamaModel,
40
+ description_1.ollamaOptions,
128
41
  ],
129
42
  };
130
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LmChatOllama.node.js","sourceRoot":"","sources":["../../../../nodes/llms/LMChatOllama/LmChatOllama.node.ts"],"names":[],"mappings":";;;AASA,yDAA0D;AAE1D,0DAAuD;AACvD,8DAA2E;AAE3E,MAAa,YAAY;IAAzB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAEhC,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,iBAAiB,CAAC;iBACvB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,oGAAoG;yBACzG;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,oBAAoC;YAC7C,WAAW,EAAE,CAAC,OAAO,CAAC;YACtB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,sBAAsB,EAAE,IAAI;gBAC5B,OAAO,EAAE,2DAA2D;aACpE;YACD,UAAU,EAAE;gBACX,IAAA,2CAA4B,EAAC,wBAAwD,CAAC;gBACtF;oBACC,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,OAAO,EAA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AAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,iBAAiB,CAAC;iBACvB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,oGAAoG;yBACzG;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,oBAAoC;YAC7C,WAAW,EAAE,CAAC,OAAO,CAAC;YACtB,GAAG,+BAAiB;YACpB,UAAU,EAAE;gBACX,IAAA,2CAA4B,EAAC,wBAAwD,CAAC;gBACtF,yBAAW;gBACX,2BAAa;aACb;SACD,CAAC;IAkBH,CAAC;IAhBA,KAAK,CAAC,UAAU,CAA0B,SAAiB;QAC1D,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAE3D,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAW,CAAC;QACtE,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAW,CAAC;QAE1E,MAAM,KAAK,GAAG,IAAI,mBAAU,CAAC;YAC5B,OAAO,EAAE,WAAW,CAAC,OAAiB;YACtC,KAAK,EAAE,SAAS;YAChB,GAAG,OAAO;SACV,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,IAAA,uBAAU,EAAC,KAAK,EAAE,IAAI,CAAC;SACjC,CAAC;IACH,CAAC;CACD;AAtDD,oCAsDC"}
@@ -4,6 +4,7 @@ exports.LmOllama = void 0;
4
4
  const ollama_1 = require("langchain/llms/ollama");
5
5
  const logWrapper_1 = require("../../../utils/logWrapper");
6
6
  const sharedFields_1 = require("../../../utils/sharedFields");
7
+ const description_1 = require("./description");
7
8
  class LmOllama {
8
9
  constructor() {
9
10
  this.description = {
@@ -32,99 +33,11 @@ class LmOllama {
32
33
  inputs: [],
33
34
  outputs: ["ai_languageModel"],
34
35
  outputNames: ['Model'],
35
- credentials: [
36
- {
37
- name: 'ollamaApi',
38
- required: true,
39
- },
40
- ],
41
- requestDefaults: {
42
- ignoreHttpStatusErrors: true,
43
- baseURL: '={{ $credentials.baseUrl.replace(new RegExp("/$"), "") }}',
44
- },
36
+ ...description_1.ollamaDescription,
45
37
  properties: [
46
38
  (0, sharedFields_1.getConnectionHintNoticeField)(["ai_chain", "ai_agent"]),
47
- {
48
- displayName: 'Model',
49
- name: 'model',
50
- type: 'options',
51
- default: 'llama2',
52
- description: 'The model which will generate the completion. To download models, visit <a href="https://ollama.ai/library">Ollama Models Library</a>.',
53
- typeOptions: {
54
- loadOptions: {
55
- routing: {
56
- request: {
57
- method: 'GET',
58
- url: '/api/tags',
59
- },
60
- output: {
61
- postReceive: [
62
- {
63
- type: 'rootProperty',
64
- properties: {
65
- property: 'models',
66
- },
67
- },
68
- {
69
- type: 'setKeyValue',
70
- properties: {
71
- name: '={{$responseItem.name}}',
72
- value: '={{$responseItem.name}}',
73
- },
74
- },
75
- {
76
- type: 'sort',
77
- properties: {
78
- key: 'name',
79
- },
80
- },
81
- ],
82
- },
83
- },
84
- },
85
- },
86
- routing: {
87
- send: {
88
- type: 'body',
89
- property: 'model',
90
- },
91
- },
92
- required: true,
93
- },
94
- {
95
- displayName: 'Options',
96
- name: 'options',
97
- placeholder: 'Add Option',
98
- description: 'Additional options to add',
99
- type: 'collection',
100
- default: {},
101
- options: [
102
- {
103
- displayName: 'Sampling Temperature',
104
- name: 'temperature',
105
- default: 0.7,
106
- typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
107
- description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
108
- type: 'number',
109
- },
110
- {
111
- displayName: 'Top K',
112
- name: 'topK',
113
- default: -1,
114
- typeOptions: { maxValue: 1, minValue: -1, numberPrecision: 1 },
115
- description: 'Used to remove "long tail" low probability responses. Defaults to -1, which disables it.',
116
- type: 'number',
117
- },
118
- {
119
- displayName: 'Top P',
120
- name: 'topP',
121
- default: 1,
122
- typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
123
- 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.',
124
- type: 'number',
125
- },
126
- ],
127
- },
39
+ description_1.ollamaModel,
40
+ description_1.ollamaOptions,
128
41
  ],
129
42
  };
130
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LmOllama.node.js","sourceRoot":"","sources":["../../../../nodes/llms/LMOllama/LmOllama.node.ts"],"names":[],"mappings":";;;AASA,kDAA+C;AAC/C,0DAAuD;AACvD,8DAA2E;AAE3E,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,cAAc;YAE3B,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE;gBACT,IAAI,EAAE,cAAc;aACpB;YACD,KAAK,EAAE;gBACN,UAAU,EAAE,CAAC,IAAI,CAAC;gBAClB,aAAa,EAAE;oBACd,EAAE,EAAE,CAAC,iBAAiB,CAAC;iBACvB;gBACD,SAAS,EAAE;oBACV,oBAAoB,EAAE;wBACrB;4BACC,GAAG,EAAE,gGAAgG;yBACrG;qBACD;iBACD;aACD;YAED,MAAM,EAAE,EAAE;YAEV,OAAO,EAAE,oBAAoC;YAC7C,WAAW,EAAE,CAAC,OAAO,CAAC;YACtB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,WAAW;oBACjB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,sBAAsB,E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AI,CAAC;SACjC,CAAC;IACH,CAAC;CACD;AAtDD,4BAsDC"}
@@ -0,0 +1,4 @@
1
+ import type { INodeProperties, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare const ollamaDescription: Partial<INodeTypeDescription>;
3
+ export declare const ollamaModel: INodeProperties;
4
+ export declare const ollamaOptions: INodeProperties;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ollamaOptions = exports.ollamaModel = exports.ollamaDescription = void 0;
4
+ exports.ollamaDescription = {
5
+ credentials: [
6
+ {
7
+ name: 'ollamaApi',
8
+ required: true,
9
+ },
10
+ ],
11
+ requestDefaults: {
12
+ ignoreHttpStatusErrors: true,
13
+ baseURL: '={{ $credentials.baseUrl.replace(new RegExp("/$"), "") }}',
14
+ },
15
+ };
16
+ exports.ollamaModel = {
17
+ displayName: 'Model',
18
+ name: 'model',
19
+ type: 'options',
20
+ default: 'llama2',
21
+ description: 'The model which will generate the completion. To download models, visit <a href="https://ollama.ai/library">Ollama Models Library</a>.',
22
+ typeOptions: {
23
+ loadOptions: {
24
+ routing: {
25
+ request: {
26
+ method: 'GET',
27
+ url: '/api/tags',
28
+ },
29
+ output: {
30
+ postReceive: [
31
+ {
32
+ type: 'rootProperty',
33
+ properties: {
34
+ property: 'models',
35
+ },
36
+ },
37
+ {
38
+ type: 'setKeyValue',
39
+ properties: {
40
+ name: '={{$responseItem.name}}',
41
+ value: '={{$responseItem.name}}',
42
+ },
43
+ },
44
+ {
45
+ type: 'sort',
46
+ properties: {
47
+ key: 'name',
48
+ },
49
+ },
50
+ ],
51
+ },
52
+ },
53
+ },
54
+ },
55
+ routing: {
56
+ send: {
57
+ type: 'body',
58
+ property: 'model',
59
+ },
60
+ },
61
+ required: true,
62
+ };
63
+ exports.ollamaOptions = {
64
+ displayName: 'Options',
65
+ name: 'options',
66
+ placeholder: 'Add Option',
67
+ description: 'Additional options to add',
68
+ type: 'collection',
69
+ default: {},
70
+ options: [
71
+ {
72
+ displayName: 'Sampling Temperature',
73
+ name: 'temperature',
74
+ default: 0.7,
75
+ typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
76
+ description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
77
+ type: 'number',
78
+ },
79
+ {
80
+ displayName: 'Top K',
81
+ name: 'topK',
82
+ default: -1,
83
+ typeOptions: { maxValue: 1, minValue: -1, numberPrecision: 1 },
84
+ description: 'Used to remove "long tail" low probability responses. Defaults to -1, which disables it.',
85
+ type: 'number',
86
+ },
87
+ {
88
+ displayName: 'Top P',
89
+ name: 'topP',
90
+ default: 1,
91
+ typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
92
+ 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.',
93
+ type: 'number',
94
+ },
95
+ ],
96
+ };
97
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../nodes/llms/LMOllama/description.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAkC;IAC/D,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,IAAI;SACd;KACD;IACD,eAAe,EAAE;QAChB,sBAAsB,EAAE,IAAI;QAC5B,OAAO,EAAE,2DAA2D;KACpE;CACD,CAAC;AAEW,QAAA,WAAW,GAAoB;IAC3C,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,QAAQ;IACjB,WAAW,EACV,wIAAwI;IACzI,WAAW,EAAE;QACZ,WAAW,EAAE;YACZ,OAAO,EAAE;gBACR,OAAO,EAAE;oBACR,MAAM,EAAE,KAAK;oBACb,GAAG,EAAE,WAAW;iBAChB;gBACD,MAAM,EAAE;oBACP,WAAW,EAAE;wBACZ;4BACC,IAAI,EAAE,cA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AE,eAAe,EAAE,CAAC,EAAE;YAC7D,WAAW,EACV,8KAA8K;YAC/K,IAAI,EAAE,QAAQ;SACd;KACD;CACD,CAAC"}
@@ -4,6 +4,8 @@ exports.MemoryBufferWindow = void 0;
4
4
  const memory_1 = require("langchain/memory");
5
5
  const logWrapper_1 = require("../../../utils/logWrapper");
6
6
  const sharedFields_1 = require("../../../utils/sharedFields");
7
+ const descriptions_1 = require("../descriptions");
8
+ const helpers_1 = require("../../../utils/helpers");
7
9
  class MemoryChatBufferSingleton {
8
10
  constructor() {
9
11
  this.memoryBuffer = new Map();
@@ -49,7 +51,7 @@ class MemoryBufferWindow {
49
51
  name: 'memoryBufferWindow',
50
52
  icon: 'fa:database',
51
53
  group: ['transform'],
52
- version: [1, 1.1],
54
+ version: [1, 1.1, 1.2],
53
55
  description: 'Stores in n8n memory, so no credentials required',
54
56
  defaults: {
55
57
  name: 'Window Buffer Memory',
@@ -96,6 +98,15 @@ class MemoryBufferWindow {
96
98
  },
97
99
  },
98
100
  },
101
+ {
102
+ ...descriptions_1.sessionIdOption,
103
+ displayOptions: {
104
+ show: {
105
+ '@version': [{ _cnd: { gte: 1.2 } }],
106
+ },
107
+ },
108
+ },
109
+ descriptions_1.sessionKeyProperty,
99
110
  {
100
111
  displayName: 'Context Window Length',
101
112
  name: 'contextWindowLength',
@@ -107,11 +118,18 @@ class MemoryBufferWindow {
107
118
  };
108
119
  }
109
120
  async supplyData(itemIndex) {
110
- const sessionKey = this.getNodeParameter('sessionKey', itemIndex);
111
121
  const contextWindowLength = this.getNodeParameter('contextWindowLength', itemIndex);
112
122
  const workflowId = this.getWorkflow().id;
113
123
  const memoryInstance = MemoryChatBufferSingleton.getInstance();
114
- const memory = await memoryInstance.getMemory(`${workflowId}__${sessionKey}`, {
124
+ const nodeVersion = this.getNode().typeVersion;
125
+ let sessionId;
126
+ if (nodeVersion >= 1.2) {
127
+ sessionId = (0, helpers_1.getSessionId)(this, itemIndex);
128
+ }
129
+ else {
130
+ sessionId = this.getNodeParameter('sessionKey', itemIndex);
131
+ }
132
+ const memory = await memoryInstance.getMemory(`${workflowId}__${sessionId}`, {
115
133
  k: contextWindowLength,
116
134
  inputKey: 'input',
117
135
  memoryKey: 'chat_history',
@@ -1 +1 @@
1
- {"version":3,"file":"MemoryBufferWindow.node.js","sourceRoot":"","sources":["../../../../nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.ts"],"names":[],"mappings":";;;AASA,6CAAsD;AACtD,0DAAuD;AACvD,8DAA2E;AAE3E,MAAM,yBAAyB;IAQ9B;QACC,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;IAC/B,CAAC;IAEM,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC,yBAAyB,CAAC,QAAQ,EAAE,CAAC;YACzC,yBAAyB,CAAC,QAAQ,GAAG,IAAI,yBAAyB,EAAE,CAAC;QACtE,CAAC;QACD,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,SAAS,CACrB,UAAkB,EAClB,YAAqC;QAErC,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAEjC,IAAI,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvD,IAAI,cAAc,EAAE,CAAC;YACpB,cAAc,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC;QAC3C,CAAC;aAAM,CAAC;YACP,MAAM,SAAS,GAAG,IAAI,2BAAkB,CAAC,YAAY,CAAC,CAAC;YAEvD,cAAc,GAAG;gBAChB,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,IAAI,IAAI,EAAE;gBACnB,aAAa,EAAE,IAAI,IAAI,EAAE;aACzB,CAAC;YACF,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,cAAc,CAAC,MAAM,CAAC;IAC9B,CAAC;IAEO,KAAK,CAA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"}
1
+ {"version":3,"file":"MemoryBufferWindow.node.js","sourceRoot":"","sources":["../../../../nodes/memory/MemoryBufferWindow/MemoryBufferWindow.node.ts"],"names":[],"mappings":";;;AASA,6CAAsD;AACtD,0DAAuD;AACvD,8DAA2E;AAC3E,kDAAsE;AACtE,oDAAsD;AAEtD,MAAM,yBAAyB;IAQ9B;QACC,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAAE,CAAC;IAC/B,CAAC;IAEM,MAAM,CAAC,WAAW;QACxB,IAAI,CAAC,yBAAyB,CAAC,QAAQ,EAAE,CAAC;YACzC,yBAAyB,CAAC,QAAQ,GAAG,IAAI,yBAAyB,EAAE,CAAC;QACtE,CAAC;QACD,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAC3C,CAAC;IAEM,KAAK,CAAC,SAAS,CACrB,UAAkB,EAClB,YAAqC;QAErC,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAEjC,IAAI,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACvD,IAAI,cAAc,EAAE,CAAC;YACpB,cAAc,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC;QAC3C,CAAC;aAAM,CAAC;YACP,MAAM,SAAS,GAAG,IAAI,2BAAkB,CAAC,YAAY,CAAC,CAAC;YAEvD,cAAc,GAAG;gBAChB,MAAM,EAAE,SAAS;gBACjB,OAAO,EAAE,IAAI,IAAI,EAAE;gBACnB,aAAa,EAAE,IAAI,IAAI,EAAE;aACzB,CAAC;YACF,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,cAAc,CAAC,MAAM,CAAC;IAC9B,CAAC;IAEO,KAAK,CAAC,mBAAmB;;QAChC,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAA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