@n8n/n8n-nodes-langchain 1.106.2 → 1.107.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 (38) hide show
  1. package/dist/credentials/ZepApi.credentials.js +6 -0
  2. package/dist/credentials/ZepApi.credentials.js.map +1 -1
  3. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js +1 -1
  4. package/dist/nodes/embeddings/EmbeddingsOpenAI/EmbeddingsOpenAi.node.js.map +1 -1
  5. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js +1 -1
  6. package/dist/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.js.map +1 -1
  7. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js +1 -1
  8. package/dist/nodes/llms/LMOpenAi/LmOpenAi.node.js.map +1 -1
  9. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js +1 -1
  10. package/dist/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.js.map +1 -1
  11. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js +1 -1
  12. package/dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js.map +1 -1
  13. package/dist/nodes/llms/LmChatVercelAiGateway/LmChatVercelAiGateway.node.js +1 -1
  14. package/dist/nodes/llms/LmChatVercelAiGateway/LmChatVercelAiGateway.node.js.map +1 -1
  15. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js +1 -1
  16. package/dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js.map +1 -1
  17. package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js +22 -1
  18. package/dist/nodes/mcp/McpClientTool/McpClientTool.node.js.map +1 -1
  19. package/dist/nodes/mcp/McpClientTool/utils.js +4 -2
  20. package/dist/nodes/mcp/McpClientTool/utils.js.map +1 -1
  21. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js +7 -0
  22. package/dist/nodes/memory/MemoryZep/MemoryZep.node.js.map +1 -1
  23. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js +93 -83
  24. package/dist/nodes/vector_store/VectorStoreMongoDBAtlas/VectorStoreMongoDBAtlas.node.js.map +1 -1
  25. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js +7 -0
  26. package/dist/nodes/vector_store/VectorStoreZep/VectorStoreZep.node.js.map +1 -1
  27. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js +6 -0
  28. package/dist/nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.js.map +1 -1
  29. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js +6 -0
  30. package/dist/nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.js.map +1 -1
  31. package/dist/nodes/vector_store/shared/createVectorStoreNode/types.js.map +1 -1
  32. package/dist/nodes/vendors/GoogleGemini/transport/index.js +2 -2
  33. package/dist/nodes/vendors/GoogleGemini/transport/index.js.map +1 -1
  34. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js +1 -1
  35. package/dist/nodes/vendors/OpenAi/actions/text/message.operation.js.map +1 -1
  36. package/dist/types/credentials.json +1 -1
  37. package/dist/types/nodes.json +5 -5
  38. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreZep/VectorStoreZep.node.ts"],"sourcesContent":["import { ZepVectorStore } from '@langchain/community/vectorstores/zep';\nimport { ZepCloudVectorStore } from '@langchain/community/vectorstores/zep_cloud';\nimport type { IDataObject, INodeProperties } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\n\nconst embeddingDimensions: INodeProperties = {\n\tdisplayName: 'Embedding Dimensions',\n\tname: 'embeddingDimensions',\n\ttype: 'number',\n\tdefault: 1536,\n\tdescription: 'Whether to allow using characters from the Unicode surrogate blocks',\n};\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\tembeddingDimensions,\n\t\t\t{\n\t\t\t\tdisplayName: 'Is Auto Embedded',\n\t\t\t\tname: 'isAutoEmbedded',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription: 'Whether to automatically embed documents when they are added',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [embeddingDimensions, metadataFilterField],\n\t},\n];\n\nexport class VectorStoreZep extends createVectorStoreNode<ZepVectorStore | ZepCloudVectorStore>({\n\tmeta: {\n\t\tdisplayName: 'Zep Vector Store',\n\t\tname: 'vectorStoreZep',\n\t\tdescription: 'Work with your data in Zep Vector Store',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'zepApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\ticon: 'file:zep.png',\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',\n\t},\n\tsharedFields: [\n\t\t{\n\t\t\tdisplayName: 'Collection Name',\n\t\t\tname: 'collectionName',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t],\n\tinsertFields,\n\tloadFields: retrieveFields,\n\tretrieveFields,\n\tasync getVectorStoreClient(context, filter, embeddings, itemIndex) {\n\t\tconst collectionName = context.getNodeParameter('collectionName', itemIndex) as string;\n\n\t\tconst options =\n\t\t\t(context.getNodeParameter('options', itemIndex) as {\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await context.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t\tcloud: boolean;\n\t\t}>('zepApi');\n\n\t\tconst zepConfig = {\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tmetadata: filter,\n\t\t};\n\n\t\tif (credentials.cloud) {\n\t\t\treturn new ZepCloudVectorStore(embeddings, zepConfig);\n\t\t} else {\n\t\t\treturn new ZepVectorStore(embeddings, { ...zepConfig, apiUrl: credentials.apiUrl });\n\t\t}\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst collectionName = context.getNodeParameter('collectionName', itemIndex) as string;\n\t\tconst options =\n\t\t\t(context.getNodeParameter('options', itemIndex) as {\n\t\t\t\tisAutoEmbedded?: boolean;\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await context.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t\tcloud: boolean;\n\t\t}>('zepApi');\n\n\t\tconst zepConfig = {\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tisAutoEmbedded: options.isAutoEmbedded ?? true,\n\t\t};\n\n\t\ttry {\n\t\t\tif (credentials.cloud) {\n\t\t\t\tawait ZepCloudVectorStore.fromDocuments(documents, embeddings, zepConfig);\n\t\t\t} else {\n\t\t\t\tawait ZepVectorStore.fromDocuments(documents, embeddings, {\n\t\t\t\t\t...zepConfig,\n\t\t\t\t\tapiUrl: credentials.apiUrl,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst errorCode = (error as IDataObject).code as number;\n\t\t\tconst responseData = (error as IDataObject).responseData as string;\n\t\t\tif (errorCode === 400 && responseData.includes('CreateDocumentCollectionRequest')) {\n\t\t\t\tthrow new NodeOperationError(context.getNode(), `Collection ${collectionName} not found`, {\n\t\t\t\t\titemIndex,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Please check that the collection exists in your vector store, or make sure that collection name contains only alphanumeric characters',\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow new NodeOperationError(context.getNode(), error as Error, { itemIndex });\n\t\t}\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA+B;AAC/B,uBAAoC;AAEpC,0BAAmC;AAEnC,0BAAoC;AAEpC,mCAAsC;AAEtC,MAAM,sBAAuC;AAAA,EAC5C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa;AACd;AAEA,MAAM,eAAkC;AAAA,EACvC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS,CAAC;AAAA,IACV,SAAS;AAAA,MACR;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD;AAEA,MAAM,iBAAoC;AAAA,EACzC;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS,CAAC;AAAA,IACV,SAAS,CAAC,qBAAqB,uCAAmB;AAAA,EACnD;AACD;AAEO,MAAM,2BAAuB,oDAA4D;AAAA,EAC/F,MAAM;AAAA,IACL,aAAa;AAAA,IACb,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,MACZ;AAAA,QACC,MAAM;AAAA,QACN,UAAU;AAAA,MACX;AAAA,IACD;AAAA,IACA,MAAM;AAAA,IACN,SACC;AAAA,EACF;AAAA,EACA,cAAc;AA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AAM,YAAa,MAAsB;AACzC,YAAM,eAAgB,MAAsB;AAC5C,UAAI,cAAc,OAAO,aAAa,SAAS,iCAAiC,GAAG;AAClF,cAAM,IAAI,uCAAmB,QAAQ,QAAQ,GAAG,cAAc,cAAc,cAAc;AAAA,UACzF;AAAA,UACA,aACC;AAAA,QACF,CAAC;AAAA,MACF;AACA,YAAM,IAAI,uCAAmB,QAAQ,QAAQ,GAAG,OAAgB,EAAE,UAAU,CAAC;AAAA,IAC9E;AAAA,EACD;AACD,CAAC,EAAE;AAAC;","names":[]}
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreZep/VectorStoreZep.node.ts"],"sourcesContent":["import { ZepVectorStore } from '@langchain/community/vectorstores/zep';\nimport { ZepCloudVectorStore } from '@langchain/community/vectorstores/zep_cloud';\nimport type { IDataObject, INodeProperties } from 'n8n-workflow';\nimport { NodeOperationError } from 'n8n-workflow';\n\nimport { metadataFilterField } from '@utils/sharedFields';\n\nimport { createVectorStoreNode } from '../shared/createVectorStoreNode/createVectorStoreNode';\n\nconst embeddingDimensions: INodeProperties = {\n\tdisplayName: 'Embedding Dimensions',\n\tname: 'embeddingDimensions',\n\ttype: 'number',\n\tdefault: 1536,\n\tdescription: 'Whether to allow using characters from the Unicode surrogate blocks',\n};\n\nconst insertFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [\n\t\t\tembeddingDimensions,\n\t\t\t{\n\t\t\t\tdisplayName: 'Is Auto Embedded',\n\t\t\t\tname: 'isAutoEmbedded',\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdefault: true,\n\t\t\t\tdescription: 'Whether to automatically embed documents when they are added',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst retrieveFields: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Option',\n\t\tdefault: {},\n\t\toptions: [embeddingDimensions, metadataFilterField],\n\t},\n];\n\nexport class VectorStoreZep extends createVectorStoreNode<ZepVectorStore | ZepCloudVectorStore>({\n\tmeta: {\n\t\tdisplayName: 'Zep Vector Store',\n\t\tname: 'vectorStoreZep',\n\t\thidden: true,\n\t\tdescription: 'Work with your data in Zep Vector Store',\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'zepApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\ticon: 'file:zep.png',\n\t\tdocsUrl:\n\t\t\t'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',\n\t},\n\tsharedFields: [\n\t\t{\n\t\t\tdisplayName: 'This Zep integration is deprecated and will be removed in a future version.',\n\t\t\tname: 'deprecationNotice',\n\t\t\ttype: 'notice',\n\t\t\tdefault: '',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Collection Name',\n\t\t\tname: 'collectionName',\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\trequired: true,\n\t\t},\n\t],\n\tinsertFields,\n\tloadFields: retrieveFields,\n\tretrieveFields,\n\tasync getVectorStoreClient(context, filter, embeddings, itemIndex) {\n\t\tconst collectionName = context.getNodeParameter('collectionName', itemIndex) as string;\n\n\t\tconst options =\n\t\t\t(context.getNodeParameter('options', itemIndex) as {\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await context.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t\tcloud: boolean;\n\t\t}>('zepApi');\n\n\t\tconst zepConfig = {\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tmetadata: filter,\n\t\t};\n\n\t\tif (credentials.cloud) {\n\t\t\treturn new ZepCloudVectorStore(embeddings, zepConfig);\n\t\t} else {\n\t\t\treturn new ZepVectorStore(embeddings, { ...zepConfig, apiUrl: credentials.apiUrl });\n\t\t}\n\t},\n\tasync populateVectorStore(context, embeddings, documents, itemIndex) {\n\t\tconst collectionName = context.getNodeParameter('collectionName', itemIndex) as string;\n\t\tconst options =\n\t\t\t(context.getNodeParameter('options', itemIndex) as {\n\t\t\t\tisAutoEmbedded?: boolean;\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await context.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t\tcloud: boolean;\n\t\t}>('zepApi');\n\n\t\tconst zepConfig = {\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tisAutoEmbedded: options.isAutoEmbedded ?? true,\n\t\t};\n\n\t\ttry {\n\t\t\tif (credentials.cloud) {\n\t\t\t\tawait ZepCloudVectorStore.fromDocuments(documents, embeddings, zepConfig);\n\t\t\t} else {\n\t\t\t\tawait ZepVectorStore.fromDocuments(documents, embeddings, {\n\t\t\t\t\t...zepConfig,\n\t\t\t\t\tapiUrl: credentials.apiUrl,\n\t\t\t\t});\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst errorCode = (error as IDataObject).code as number;\n\t\t\tconst responseData = (error as IDataObject).responseData as string;\n\t\t\tif (errorCode === 400 && responseData.includes('CreateDocumentCollectionRequest')) {\n\t\t\t\tthrow new NodeOperationError(context.getNode(), `Collection ${collectionName} not found`, {\n\t\t\t\t\titemIndex,\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Please check that the collection exists in your vector store, or make sure that collection name contains only alphanumeric characters',\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow new NodeOperationError(context.getNode(), error as Error, { itemIndex });\n\t\t}\n\t},\n}) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA+B;AAC/B,uBAAoC;AAEpC,0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B,EAAE,UAAU,CAAC;AAAA,IAC9E;AAAA,EACD;AACD,CAAC,EAAE;AAAC;","names":[]}
@@ -74,6 +74,12 @@ class VectorStoreZepInsert {
74
74
  ],
75
75
  outputs: [import_n8n_workflow.NodeConnectionTypes.Main],
76
76
  properties: [
77
+ {
78
+ displayName: "This Zep integration is deprecated and will be removed in a future version.",
79
+ name: "deprecationNotice",
80
+ type: "notice",
81
+ default: ""
82
+ },
77
83
  {
78
84
  displayName: "Collection Name",
79
85
  name: "collectionName",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.ts"],"sourcesContent":["import { ZepVectorStore } from '@langchain/community/vectorstores/zep';\nimport type { Document } from '@langchain/core/documents';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport {\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype INodeExecutionData,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nimport type { N8nJsonLoader } from '@utils/N8nJsonLoader';\n\nimport { processDocuments } from '../shared/processDocuments';\n\n// This node is deprecated. Use VectorStoreZep instead.\nexport class VectorStoreZepInsert implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Zep Vector Store: Insert',\n\t\tname: 'vectorStoreZepInsert',\n\t\thidden: true,\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg\n\t\ticon: 'file:zep.png',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Insert data into Zep Vector Store index',\n\t\tdefaults: {\n\t\t\tname: 'Zep: Insert',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'zepApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\tNodeConnectionTypes.Main,\n\t\t\t{\n\t\t\t\tdisplayName: 'Document',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiDocument,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Collection Name',\n\t\t\t\tname: 'collectionName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Specify the document to load in the document loader sub-node',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Embedding Dimensions',\n\t\t\t\t\t\tname: 'embeddingDimensions',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\tdefault: 1536,\n\t\t\t\t\t\tdescription: 'Whether to allow using characters from the Unicode surrogate blocks',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Is Auto Embedded',\n\t\t\t\t\t\tname: 'isAutoEmbedded',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription: 'Whether to automatically embed documents when they are added',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tthis.logger.debug('Executing data for Zep Insert Vector Store');\n\t\tconst items = this.getInputData(0);\n\t\tconst collectionName = this.getNodeParameter('collectionName', 0) as string;\n\t\tconst options =\n\t\t\t(this.getNodeParameter('options', 0, {}) as {\n\t\t\t\tisAutoEmbedded?: boolean;\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await this.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t}>('zepApi');\n\n\t\tconst documentInput = (await this.getInputConnectionData(NodeConnectionTypes.AiDocument, 0)) as\n\t\t\t| N8nJsonLoader\n\t\t\t| Array<Document<Record<string, unknown>>>;\n\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\n\t\tconst { processedDocuments, serializedDocuments } = await processDocuments(\n\t\t\tdocumentInput,\n\t\t\titems,\n\t\t);\n\n\t\tconst zepConfig = {\n\t\t\tapiUrl: credentials.apiUrl,\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tisAutoEmbedded: options.isAutoEmbedded ?? true,\n\t\t};\n\n\t\tawait ZepVectorStore.fromDocuments(processedDocuments, embeddings, zepConfig);\n\n\t\treturn [serializedDocuments];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA+B;AAG/B,0BAMO;AAIP,8BAAiC;AAG1B,MAAM,qBAA0C;AAAA,EAAhD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,QAAQ;AA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S;AAAA,cACT,aAAa;AAAA,YACd;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,UAAkE;AACvE,SAAK,OAAO,MAAM,4CAA4C;AAC9D,UAAM,QAAQ,KAAK,aAAa,CAAC;AACjC,UAAM,iBAAiB,KAAK,iBAAiB,kBAAkB,CAAC;AAChE,UAAM,UACJ,KAAK,iBAAiB,WAAW,GAAG,CAAC,CAAC,KAGjC,CAAC;AAER,UAAM,cAAc,MAAM,KAAK,eAG5B,QAAQ;AAEX,UAAM,gBAAiB,MAAM,KAAK,uBAAuB,wCAAoB,YAAY,CAAC;AAI1F,UAAM,aAAc,MAAM,KAAK;AAAA,MAC9B,wCAAoB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,EAAE,oBAAoB,oBAAoB,IAAI,UAAM;AAAA,MACzD;AAAA,MACA;AAAA,IACD;AAEA,UAAM,YAAY;AAAA,MACjB,QAAQ,YAAY;AAAA,MACpB,QAAQ,YAAY;AAAA,MACpB;AAAA,MACA,qBAAqB,QAAQ,uBAAuB;AAAA,MACpD,gBAAgB,QAAQ,kBAAkB;AAAA,IAC3C;AAEA,UAAM,0BAAe,cAAc,oBAAoB,YAAY,SAAS;AAE5E,WAAO,CAAC,mBAAmB;AAAA,EAC5B;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreZepInsert/VectorStoreZepInsert.node.ts"],"sourcesContent":["import { ZepVectorStore } from '@langchain/community/vectorstores/zep';\nimport type { Document } from '@langchain/core/documents';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport {\n\ttype IExecuteFunctions,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype INodeExecutionData,\n\tNodeConnectionTypes,\n} from 'n8n-workflow';\n\nimport type { N8nJsonLoader } from '@utils/N8nJsonLoader';\n\nimport { processDocuments } from '../shared/processDocuments';\n\n// This node is deprecated. Use VectorStoreZep instead.\nexport class VectorStoreZepInsert implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Zep Vector Store: Insert',\n\t\tname: 'vectorStoreZepInsert',\n\t\thidden: true,\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg\n\t\ticon: 'file:zep.png',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Insert data into Zep Vector Store index',\n\t\tdefaults: {\n\t\t\tname: 'Zep: Insert',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'zepApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\tNodeConnectionTypes.Main,\n\t\t\t{\n\t\t\t\tdisplayName: 'Document',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiDocument,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.Main],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'This Zep integration is deprecated and will be removed in a future version.',\n\t\t\t\tname: 'deprecationNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Collection Name',\n\t\t\t\tname: 'collectionName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Specify the document to load in the document loader sub-node',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Embedding Dimensions',\n\t\t\t\t\t\tname: 'embeddingDimensions',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\tdefault: 1536,\n\t\t\t\t\t\tdescription: 'Whether to allow using characters from the Unicode surrogate blocks',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Is Auto Embedded',\n\t\t\t\t\t\tname: 'isAutoEmbedded',\n\t\t\t\t\t\ttype: 'boolean',\n\t\t\t\t\t\tdefault: true,\n\t\t\t\t\t\tdescription: 'Whether to automatically embed documents when they are added',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {\n\t\tthis.logger.debug('Executing data for Zep Insert Vector Store');\n\t\tconst items = this.getInputData(0);\n\t\tconst collectionName = this.getNodeParameter('collectionName', 0) as string;\n\t\tconst options =\n\t\t\t(this.getNodeParameter('options', 0, {}) as {\n\t\t\t\tisAutoEmbedded?: boolean;\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await this.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t}>('zepApi');\n\n\t\tconst documentInput = (await this.getInputConnectionData(NodeConnectionTypes.AiDocument, 0)) as\n\t\t\t| N8nJsonLoader\n\t\t\t| Array<Document<Record<string, unknown>>>;\n\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\n\t\tconst { processedDocuments, serializedDocuments } = await processDocuments(\n\t\t\tdocumentInput,\n\t\t\titems,\n\t\t);\n\n\t\tconst zepConfig = {\n\t\t\tapiUrl: credentials.apiUrl,\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tisAutoEmbedded: options.isAutoEmbedded ?? true,\n\t\t};\n\n\t\tawait ZepVectorStore.fromDocuments(processedDocuments, embeddings, zepConfig);\n\n\t\treturn [serializedDocuments];\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA+B;AAG/B,0BAMO;AAIP,8BAAiC;AAG1B,MAAM,qBAA0C;AAAA,EAAhD;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,QAAQ;AAAA;AAAA,MAER,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,eAAe;AAAA,QACrB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,QAAQ;AAAA,QACP,wCAAoB;AAAA,QACpB;AAAA,UACC,aAAa;AAAA,UACb,gBAAgB;AAAA,UAChB,MAAM,wCAAoB;AAAA,UAC1B,UAAU;AAAA,QACX;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb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UAAM;AAAA,MACzD;AAAA,MACA;AAAA,IACD;AAEA,UAAM,YAAY;AAAA,MACjB,QAAQ,YAAY;AAAA,MACpB,QAAQ,YAAY;AAAA,MACpB;AAAA,MACA,qBAAqB,QAAQ,uBAAuB;AAAA,MACpD,gBAAgB,QAAQ,kBAAkB;AAAA,IAC3C;AAEA,UAAM,0BAAe,cAAc,oBAAoB,YAAY,SAAS;AAE5E,WAAO,CAAC,mBAAmB;AAAA,EAC5B;AACD;","names":[]}
@@ -70,6 +70,12 @@ class VectorStoreZepLoad {
70
70
  outputs: [import_n8n_workflow.NodeConnectionTypes.AiVectorStore],
71
71
  outputNames: ["Vector Store"],
72
72
  properties: [
73
+ {
74
+ displayName: "This Zep integration is deprecated and will be removed in a future version.",
75
+ name: "deprecationNotice",
76
+ type: "notice",
77
+ default: ""
78
+ },
73
79
  {
74
80
  displayName: "Collection Name",
75
81
  name: "collectionName",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.ts"],"sourcesContent":["import type { IZepConfig } from '@langchain/community/vectorstores/zep';\nimport { ZepVectorStore } from '@langchain/community/vectorstores/zep';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getMetadataFiltersValues } from '@utils/helpers';\nimport { logWrapper } from '@utils/logWrapper';\nimport { metadataFilterField } from '@utils/sharedFields';\n\n// This node is deprecated. Use VectorStoreZep instead.\nexport class VectorStoreZepLoad implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Zep Vector Store: Load',\n\t\tname: 'vectorStoreZepLoad',\n\t\thidden: true,\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg\n\t\ticon: 'file:zep.png',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Load data from Zep Vector Store index',\n\t\tdefaults: {\n\t\t\tname: 'Zep: Load',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'zepApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.AiVectorStore],\n\t\toutputNames: ['Vector Store'],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Collection Name',\n\t\t\t\tname: 'collectionName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Embedding Dimensions',\n\t\t\t\t\t\tname: 'embeddingDimensions',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\tdefault: 1536,\n\t\t\t\t\t\tdescription: 'Whether to allow using characters from the Unicode surrogate blocks',\n\t\t\t\t\t},\n\t\t\t\t\tmetadataFilterField,\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tthis.logger.debug('Supplying data for Zep Load Vector Store');\n\n\t\tconst collectionName = this.getNodeParameter('collectionName', itemIndex) as string;\n\n\t\tconst options =\n\t\t\t(this.getNodeParameter('options', itemIndex) as {\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await this.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t}>('zepApi');\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\n\t\tconst zepConfig: IZepConfig = {\n\t\t\tapiUrl: credentials.apiUrl,\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tmetadata: getMetadataFiltersValues(this, itemIndex),\n\t\t};\n\n\t\tconst vectorStore = new ZepVectorStore(embeddings, zepConfig);\n\n\t\treturn {\n\t\t\tresponse: logWrapper(vectorStore, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA+B;AAE/B,0BAMO;AAEP,qBAAyC;AACzC,wBAA2B;AAC3B,0BAAoC;AAG7B,MAAM,mBAAwC;AAAA,EAA9C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,QAAQ;AAAA;AAAA,MAER,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,eAAe;AAAA,QACrB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UAC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AAAA,MACN,cAAU,8BAAW,aAAa,IAAI;AAAA,IACvC;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../nodes/vector_store/VectorStoreZepLoad/VectorStoreZepLoad.node.ts"],"sourcesContent":["import type { IZepConfig } from '@langchain/community/vectorstores/zep';\nimport { ZepVectorStore } from '@langchain/community/vectorstores/zep';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getMetadataFiltersValues } from '@utils/helpers';\nimport { logWrapper } from '@utils/logWrapper';\nimport { metadataFilterField } from '@utils/sharedFields';\n\n// This node is deprecated. Use VectorStoreZep instead.\nexport class VectorStoreZepLoad implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Zep Vector Store: Load',\n\t\tname: 'vectorStoreZepLoad',\n\t\thidden: true,\n\t\t// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg\n\t\ticon: 'file:zep.png',\n\t\tgroup: ['transform'],\n\t\tversion: 1,\n\t\tdescription: 'Load data from Zep Vector Store index',\n\t\tdefaults: {\n\t\t\tname: 'Zep: Load',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Vector Stores'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstorezep/',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'zepApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\tinputs: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Embedding',\n\t\t\t\tmaxConnections: 1,\n\t\t\t\ttype: NodeConnectionTypes.AiEmbedding,\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\toutputs: [NodeConnectionTypes.AiVectorStore],\n\t\toutputNames: ['Vector Store'],\n\t\tproperties: [\n\t\t\t{\n\t\t\t\tdisplayName: 'This Zep integration is deprecated and will be removed in a future version.',\n\t\t\t\tname: 'deprecationNotice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Collection Name',\n\t\t\t\tname: 'collectionName',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\ttype: 'collection',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Embedding Dimensions',\n\t\t\t\t\t\tname: 'embeddingDimensions',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\tdefault: 1536,\n\t\t\t\t\t\tdescription: 'Whether to allow using characters from the Unicode surrogate blocks',\n\t\t\t\t\t},\n\t\t\t\t\tmetadataFilterField,\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tthis.logger.debug('Supplying data for Zep Load Vector Store');\n\n\t\tconst collectionName = this.getNodeParameter('collectionName', itemIndex) as string;\n\n\t\tconst options =\n\t\t\t(this.getNodeParameter('options', itemIndex) as {\n\t\t\t\tembeddingDimensions?: number;\n\t\t\t}) || {};\n\n\t\tconst credentials = await this.getCredentials<{\n\t\t\tapiKey?: string;\n\t\t\tapiUrl: string;\n\t\t}>('zepApi');\n\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t0,\n\t\t)) as Embeddings;\n\n\t\tconst zepConfig: IZepConfig = {\n\t\t\tapiUrl: credentials.apiUrl,\n\t\t\tapiKey: credentials.apiKey,\n\t\t\tcollectionName,\n\t\t\tembeddingDimensions: options.embeddingDimensions ?? 1536,\n\t\t\tmetadata: getMetadataFiltersValues(this, itemIndex),\n\t\t};\n\n\t\tconst vectorStore = new ZepVectorStore(embeddings, zepConfig);\n\n\t\treturn {\n\t\t\tresponse: logWrapper(vectorStore, this),\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAA+B;AAE/B,0BAMO;AAEP,qBAAyC;AACzC,wBAA2B;AAC3B,0BAAoC;AAG7B,MAAM,mBAAwC;AAAA,EAA9C;AACN,uBAAoC;AAAA,MACnC,aAAa;AAAA,MACb,MAAM;AAAA,MACN,QAAQ;AAAA;AAAA,MAER,MAAM;AAAA,MACN,OAAO,CAAC,WAAW;AAAA,MACnB,SAAS;AAAA,MACT,aAAa;AAAA,MACb,UAAU;AAAA,QACT,MAAM;AAAA,MACP;AAAA,MACA,OAAO;AAAA,QACN,YAAY,CAAC,IAAI;AAAA,QACjB,eAAe;AAAA,UACd,IAAI,CAAC,eAAe;AAAA,QACrB;AAAA,QACA,WAAW;AAAA,UACV,sBAAsB;AAAA,YACrB;AAAA,cACC,KAAK;AAAA,YACN;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ;AAAA,UACC,MAAM;AAAA,UACN,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,QAAQ;AAAA,QACP;AAAA,UACC,aAAa;AAAA,UACb,gBAAgB;AAAA,UAChB,MAAM,wCAAoB;AAAA,UAC1B,UAAU;AAAA,QACX;AAAA,MACD;AAAA,MACA,SAAS,CAAC,wCAAoB,aAAa;AAAA,MAC3C,aAAa,CAAC,cAAc;AAAA,MAC5B,YAAY;AAAA,QACX;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,QACV;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,UAAU;AAAA,QACX;AAAA,QACA;AAAA,UACC,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM;AAAA,UACN,aAAa;AAAA,UACb,SAAS,CAAC;AAAA,UACV,SAAS;AAAA,YACR;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aAAa;AAAA,YACd;AAAA,YACA;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,WAAuC,WAAwC;AACpF,SAAK,OAAO,MAAM,0CAA0C;AAE5D,UAAM,iBAAiB,KAAK,iBAAiB,kBAAkB,SAAS;AAExE,UAAM,UACJ,KAAK,iBAAiB,WAAW,SAAS,KAErC,CAAC;AAER,UAAM,cAAc,MAAM,KAAK,eAG5B,QAAQ;AACX,UAAM,aAAc,MAAM,KAAK;AAAA,MAC9B,wCAAoB;AAAA,MACpB;AAAA,IACD;AAEA,UAAM,YAAwB;AAAA,MAC7B,QAAQ,YAAY;AAAA,MACpB,QAAQ,YAAY;AAAA,MACpB;AAAA,MACA,qBAAqB,QAAQ,uBAAuB;AAAA,MACpD,cAAU,yCAAyB,MAAM,SAAS;AAAA,IACnD;AAEA,UAAM,cAAc,IAAI,0BAAe,YAAY,SAAS;AAE5D,WAAO;AAAA,MACN,cAAU,8BAAW,aAAa,IAAI;AAAA,IACvC;AAAA,EACD;AACD;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/vector_store/shared/createVectorStoreNode/types.ts"],"sourcesContent":["import type { Document } from '@langchain/core/documents';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport type { VectorStore } from '@langchain/core/vectorstores';\nimport type {\n\tIExecuteFunctions,\n\tINodeCredentialDescription,\n\tINodeProperties,\n\tILoadOptionsFunctions,\n\tINodeListSearchResult,\n\tIcon,\n\tISupplyDataFunctions,\n\tThemeIconColor,\n\tIDataObject,\n\tNodeParameterValueType,\n} from 'n8n-workflow';\n\nexport type NodeOperationMode = 'insert' | 'load' | 'retrieve' | 'update' | 'retrieve-as-tool';\n\nexport interface NodeMeta {\n\tdisplayName: string;\n\tname: string;\n\tdescription: string;\n\tdocsUrl: string;\n\ticon: Icon;\n\ticonColor?: ThemeIconColor;\n\tcredentials?: INodeCredentialDescription[];\n\toperationModes?: NodeOperationMode[];\n\tcategories?: string[];\n\tsubcategories?: Record<string, string[]>;\n}\n\nexport interface VectorStoreNodeConstructorArgs<T extends VectorStore = VectorStore> {\n\tmeta: NodeMeta;\n\tmethods?: {\n\t\tlistSearch?: {\n\t\t\t[key: string]: (\n\t\t\t\tthis: ILoadOptionsFunctions,\n\t\t\t\tfilter?: string,\n\t\t\t\tpaginationToken?: string,\n\t\t\t) => Promise<INodeListSearchResult>;\n\t\t};\n\t\tactionHandler?: {\n\t\t\t[functionName: string]: (\n\t\t\t\tthis: ILoadOptionsFunctions,\n\t\t\t\tpayload: IDataObject | string | undefined,\n\t\t\t) => Promise<NodeParameterValueType>;\n\t\t};\n\t};\n\n\tsharedFields: INodeProperties[];\n\tinsertFields?: INodeProperties[];\n\tloadFields?: INodeProperties[];\n\tretrieveFields?: INodeProperties[];\n\tupdateFields?: INodeProperties[];\n\n\t/**\n\t * Function to populate the vector store with documents\n\t * Used during the 'insert' operation mode\n\t */\n\tpopulateVectorStore: (\n\t\tcontext: IExecuteFunctions | ISupplyDataFunctions,\n\t\tembeddings: Embeddings,\n\t\tdocuments: Array<Document<Record<string, unknown>>>,\n\t\titemIndex: number,\n\t) => Promise<void>;\n\n\t/**\n\t * Function to get the vector store client\n\t * This function is called for all operation modes\n\t */\n\tgetVectorStoreClient: (\n\t\tcontext: IExecuteFunctions | ISupplyDataFunctions,\n\t\tfilter: Record<string, never> | undefined,\n\t\tembeddings: Embeddings,\n\t\titemIndex: number,\n\t) => Promise<T>;\n\n\t/**\n\t * Optional function to release resources associated with the vector store client\n\t * Called after the vector store operations are complete\n\t */\n\treleaseVectorStoreClient?: (vectorStore: T) => void;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/vector_store/shared/createVectorStoreNode/types.ts"],"sourcesContent":["import type { Document } from '@langchain/core/documents';\nimport type { Embeddings } from '@langchain/core/embeddings';\nimport type { VectorStore } from '@langchain/core/vectorstores';\nimport type {\n\tIExecuteFunctions,\n\tINodeCredentialDescription,\n\tINodeProperties,\n\tILoadOptionsFunctions,\n\tINodeListSearchResult,\n\tIcon,\n\tISupplyDataFunctions,\n\tThemeIconColor,\n\tIDataObject,\n\tNodeParameterValueType,\n} from 'n8n-workflow';\n\nexport type NodeOperationMode = 'insert' | 'load' | 'retrieve' | 'update' | 'retrieve-as-tool';\n\nexport interface NodeMeta {\n\tdisplayName: string;\n\tname: string;\n\thidden?: boolean;\n\tdescription: string;\n\tdocsUrl: string;\n\ticon: Icon;\n\ticonColor?: ThemeIconColor;\n\tcredentials?: INodeCredentialDescription[];\n\toperationModes?: NodeOperationMode[];\n\tcategories?: string[];\n\tsubcategories?: Record<string, string[]>;\n}\n\nexport interface VectorStoreNodeConstructorArgs<T extends VectorStore = VectorStore> {\n\tmeta: NodeMeta;\n\tmethods?: {\n\t\tlistSearch?: {\n\t\t\t[key: string]: (\n\t\t\t\tthis: ILoadOptionsFunctions,\n\t\t\t\tfilter?: string,\n\t\t\t\tpaginationToken?: string,\n\t\t\t) => Promise<INodeListSearchResult>;\n\t\t};\n\t\tactionHandler?: {\n\t\t\t[functionName: string]: (\n\t\t\t\tthis: ILoadOptionsFunctions,\n\t\t\t\tpayload: IDataObject | string | undefined,\n\t\t\t) => Promise<NodeParameterValueType>;\n\t\t};\n\t};\n\n\tsharedFields: INodeProperties[];\n\tinsertFields?: INodeProperties[];\n\tloadFields?: INodeProperties[];\n\tretrieveFields?: INodeProperties[];\n\tupdateFields?: INodeProperties[];\n\n\t/**\n\t * Function to populate the vector store with documents\n\t * Used during the 'insert' operation mode\n\t */\n\tpopulateVectorStore: (\n\t\tcontext: IExecuteFunctions | ISupplyDataFunctions,\n\t\tembeddings: Embeddings,\n\t\tdocuments: Array<Document<Record<string, unknown>>>,\n\t\titemIndex: number,\n\t) => Promise<void>;\n\n\t/**\n\t * Function to get the vector store client\n\t * This function is called for all operation modes\n\t */\n\tgetVectorStoreClient: (\n\t\tcontext: IExecuteFunctions | ISupplyDataFunctions,\n\t\tfilter: Record<string, never> | undefined,\n\t\tembeddings: Embeddings,\n\t\titemIndex: number,\n\t) => Promise<T>;\n\n\t/**\n\t * Optional function to release resources associated with the vector store client\n\t * Called after the vector store operations are complete\n\t */\n\treleaseVectorStoreClient?: (vectorStore: T) => void;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -25,8 +25,8 @@ async function apiRequest(method, endpoint, parameters) {
25
25
  const { body, qs, option, headers } = parameters ?? {};
26
26
  const credentials = await this.getCredentials("googlePalmApi");
27
27
  let url = `https://generativelanguage.googleapis.com${endpoint}`;
28
- if (credentials.url) {
29
- url = `${credentials?.url}${endpoint}`;
28
+ if (credentials.host) {
29
+ url = `${credentials.host}${endpoint}`;
30
30
  }
31
31
  const options = {
32
32
  headers,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/transport/index.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIHttpRequestMethods,\n\tILoadOptionsFunctions,\n} from 'n8n-workflow';\n\ntype RequestParameters = {\n\theaders?: IDataObject;\n\tbody?: IDataObject | string;\n\tqs?: IDataObject;\n\toption?: IDataObject;\n};\n\nexport async function apiRequest(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\tparameters?: RequestParameters,\n) {\n\tconst { body, qs, option, headers } = parameters ?? {};\n\n\tconst credentials = await this.getCredentials('googlePalmApi');\n\n\tlet url = `https://generativelanguage.googleapis.com${endpoint}`;\n\n\tif (credentials.url) {\n\t\turl = `${credentials?.url as string}${endpoint}`;\n\t}\n\n\tconst options = {\n\t\theaders,\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turl,\n\t\tjson: true,\n\t};\n\n\tif (option && Object.keys(option).length !== 0) {\n\t\tObject.assign(options, option);\n\t}\n\n\treturn await this.helpers.httpRequestWithAuthentication.call(this, 'googlePalmApi', options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA,eAAsB,WAErB,QACA,UACA,YACC;AACD,QAAM,EAAE,MAAM,IAAI,QAAQ,QAAQ,IAAI,cAAc,CAAC;AAErD,QAAM,cAAc,MAAM,KAAK,eAAe,eAAe;AAE7D,MAAI,MAAM,4CAA4C,QAAQ;AAE9D,MAAI,YAAY,KAAK;AACpB,UAAM,GAAG,aAAa,GAAa,GAAG,QAAQ;AAAA,EAC/C;AAEA,QAAM,UAAU;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACP;AAEA,MAAI,UAAU,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAC/C,WAAO,OAAO,SAAS,MAAM;AAAA,EAC9B;AAEA,SAAO,MAAM,KAAK,QAAQ,8BAA8B,KAAK,MAAM,iBAAiB,OAAO;AAC5F;","names":[]}
1
+ {"version":3,"sources":["../../../../../nodes/vendors/GoogleGemini/transport/index.ts"],"sourcesContent":["import type {\n\tIDataObject,\n\tIExecuteFunctions,\n\tIHttpRequestMethods,\n\tILoadOptionsFunctions,\n} from 'n8n-workflow';\n\ntype RequestParameters = {\n\theaders?: IDataObject;\n\tbody?: IDataObject | string;\n\tqs?: IDataObject;\n\toption?: IDataObject;\n};\n\ntype GooglePalmApiCredentials = {\n\thost: string;\n\tapiKey: string;\n};\n\nexport async function apiRequest(\n\tthis: IExecuteFunctions | ILoadOptionsFunctions,\n\tmethod: IHttpRequestMethods,\n\tendpoint: string,\n\tparameters?: RequestParameters,\n) {\n\tconst { body, qs, option, headers } = parameters ?? {};\n\n\tconst credentials = await this.getCredentials<GooglePalmApiCredentials>('googlePalmApi');\n\n\tlet url = `https://generativelanguage.googleapis.com${endpoint}`;\n\n\tif (credentials.host) {\n\t\turl = `${credentials.host}${endpoint}`;\n\t}\n\n\tconst options = {\n\t\theaders,\n\t\tmethod,\n\t\tbody,\n\t\tqs,\n\t\turl,\n\t\tjson: true,\n\t};\n\n\tif (option && Object.keys(option).length !== 0) {\n\t\tObject.assign(options, option);\n\t}\n\n\treturn await this.helpers.httpRequestWithAuthentication.call(this, 'googlePalmApi', options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmBA,eAAsB,WAErB,QACA,UACA,YACC;AACD,QAAM,EAAE,MAAM,IAAI,QAAQ,QAAQ,IAAI,cAAc,CAAC;AAErD,QAAM,cAAc,MAAM,KAAK,eAAyC,eAAe;AAEvF,MAAI,MAAM,4CAA4C,QAAQ;AAE9D,MAAI,YAAY,MAAM;AACrB,UAAM,GAAG,YAAY,IAAI,GAAG,QAAQ;AAAA,EACrC;AAEA,QAAM,UAAU;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACP;AAEA,MAAI,UAAU,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAC/C,WAAO,OAAO,SAAS,MAAM;AAAA,EAC9B;AAEA,SAAO,MAAM,KAAK,QAAQ,8BAA8B,KAAK,MAAM,iBAAiB,OAAO;AAC5F;","names":[]}
@@ -219,7 +219,7 @@ async function execute(i) {
219
219
  const maxToolsIterations = nodeVersion >= 1.5 ? this.getNodeParameter("options.maxToolsIterations", i, 15) : 0;
220
220
  const abortSignal = this.getExecutionCancelSignal();
221
221
  if (options.maxTokens !== void 0) {
222
- options.max_tokens = options.maxTokens;
222
+ options.max_completion_tokens = options.maxTokens;
223
223
  delete options.maxTokens;
224
224
  }
225
225
  if (options.topP !== void 0) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/actions/text/message.operation.ts"],"sourcesContent":["import type { Tool } from '@langchain/core/tools';\nimport _omit from 'lodash/omit';\nimport type {\n\tINodeProperties,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tIDataObject,\n} from 'n8n-workflow';\nimport { jsonParse, updateDisplayOptions } from 'n8n-workflow';\n\nimport { getConnectedTools } from '@utils/helpers';\n\nimport { MODELS_NOT_SUPPORT_FUNCTION_CALLS } from '../../helpers/constants';\nimport type { ChatCompletion } from '../../helpers/interfaces';\nimport { formatToOpenAIAssistantTool } from '../../helpers/utils';\nimport { apiRequest } from '../../transport';\nimport { modelRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tmodelRLC('modelSearch'),\n\t{\n\t\tdisplayName: 'Messages',\n\t\tname: 'messages',\n\t\ttype: 'fixedCollection',\n\t\ttypeOptions: {\n\t\t\tsortable: true,\n\t\t\tmultipleValues: true,\n\t\t},\n\t\tplaceholder: 'Add Message',\n\t\tdefault: { values: [{ content: '' }] },\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Values',\n\t\t\t\tname: 'values',\n\t\t\t\tvalues: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Prompt',\n\t\t\t\t\t\tname: 'content',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'The content of the message to be send',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. Hello, how can you help me?',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\trows: 2,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Role',\n\t\t\t\t\t\tname: 'role',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Role in shaping the model's response, it tells the model how it should behave and interact with the user\",\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\t\t\tvalue: 'user',\n\t\t\t\t\t\t\t\tdescription: 'Send a message as a user and get a response from the model',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Assistant',\n\t\t\t\t\t\t\t\tvalue: 'assistant',\n\t\t\t\t\t\t\t\tdescription: 'Tell the model to adopt a specific tone or personality',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'System',\n\t\t\t\t\t\t\t\tvalue: 'system',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Usually used to set the model's behavior or context for the next user message\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'user',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'Simplify Output',\n\t\tname: 'simplify',\n\t\ttype: 'boolean',\n\t\tdefault: true,\n\t\tdescription: 'Whether to return a simplified version of the response instead of the raw data',\n\t},\n\t{\n\t\tdisplayName: 'Output Content as JSON',\n\t\tname: 'jsonOutput',\n\t\ttype: 'boolean',\n\t\tdescription:\n\t\t\t'Whether to attempt to return the response in JSON format. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.',\n\t\tdefault: false,\n\t},\n\t{\n\t\tdisplayName: 'Hide Tools',\n\t\tname: 'hideTools',\n\t\ttype: 'hidden',\n\t\tdefault: 'hide',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tmodelId: MODELS_NOT_SUPPORT_FUNCTION_CALLS,\n\t\t\t\t'@version': [{ _cnd: { gte: 1.2 } }],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Connect your own custom n8n tools to this node on the canvas',\n\t\tname: 'noticeTools',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\thide: {\n\t\t\t\thideTools: ['hide'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\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: 'frequency_penalty',\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: 16,\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).',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmaxValue: 32768,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Number of Completions',\n\t\t\t\tname: 'n',\n\t\t\t\tdefault: 1,\n\t\t\t\tdescription:\n\t\t\t\t\t'How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Presence Penalty',\n\t\t\t\tname: 'presence_penalty',\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: 'Output Randomness (Temperature)',\n\t\t\t\tname: 'temperature',\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 randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. We generally recommend altering this or temperature but not both.',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Output Randomness (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'An alternative to sampling with temperature, 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\t{\n\t\t\t\tdisplayName: 'Max Tool Calls Iterations',\n\t\t\t\tname: 'maxToolsIterations',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 15,\n\t\t\t\tdescription:\n\t\t\t\t\t'The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit.',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.5 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['message'],\n\t\tresource: ['text'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst nodeVersion = this.getNode().typeVersion;\n\tconst model = this.getNodeParameter('modelId', i, '', { extractValue: true });\n\tlet messages = this.getNodeParameter('messages.values', i, []) as IDataObject[];\n\tconst options = this.getNodeParameter('options', i, {});\n\tconst jsonOutput = this.getNodeParameter('jsonOutput', i, false) as boolean;\n\tconst maxToolsIterations =\n\t\tnodeVersion >= 1.5 ? (this.getNodeParameter('options.maxToolsIterations', i, 15) as number) : 0;\n\n\tconst abortSignal = this.getExecutionCancelSignal();\n\n\tif (options.maxTokens !== undefined) {\n\t\toptions.max_tokens = options.maxTokens;\n\t\tdelete options.maxTokens;\n\t}\n\n\tif (options.topP !== undefined) {\n\t\toptions.top_p = options.topP;\n\t\tdelete options.topP;\n\t}\n\n\tlet response_format;\n\tif (jsonOutput) {\n\t\tresponse_format = { type: 'json_object' };\n\t\tmessages = [\n\t\t\t{\n\t\t\t\trole: 'system',\n\t\t\t\tcontent: 'You are a helpful assistant designed to output JSON.',\n\t\t\t},\n\t\t\t...messages,\n\t\t];\n\t}\n\n\tconst hideTools = this.getNodeParameter('hideTools', i, '') as string;\n\n\tlet tools;\n\tlet externalTools: Tool[] = [];\n\n\tif (hideTools !== 'hide') {\n\t\tconst enforceUniqueNames = nodeVersion > 1;\n\t\texternalTools = await getConnectedTools(this, enforceUniqueNames, false);\n\t}\n\n\tif (externalTools.length) {\n\t\ttools = externalTools.length ? externalTools?.map(formatToOpenAIAssistantTool) : undefined;\n\t}\n\n\tconst body: IDataObject = {\n\t\tmodel,\n\t\tmessages,\n\t\ttools,\n\t\tresponse_format,\n\t\t..._omit(options, ['maxToolsIterations']),\n\t};\n\n\tlet response = (await apiRequest.call(this, 'POST', '/chat/completions', {\n\t\tbody,\n\t})) as ChatCompletion;\n\n\tif (!response) return [];\n\n\tlet currentIteration = 1;\n\tlet toolCalls = response?.choices[0]?.message?.tool_calls;\n\n\twhile (toolCalls?.length) {\n\t\t// Break the loop if the max iterations is reached or the execution is canceled\n\t\tif (\n\t\t\tabortSignal?.aborted ||\n\t\t\t(maxToolsIterations > 0 && currentIteration >= maxToolsIterations)\n\t\t) {\n\t\t\tbreak;\n\t\t}\n\t\tmessages.push(response.choices[0].message);\n\n\t\tfor (const toolCall of toolCalls) {\n\t\t\tconst functionName = toolCall.function.name;\n\t\t\tconst functionArgs = toolCall.function.arguments;\n\n\t\t\tlet functionResponse;\n\t\t\tfor (const tool of externalTools ?? []) {\n\t\t\t\tif (tool.name === functionName) {\n\t\t\t\t\tconst parsedArgs: { input: string } = jsonParse(functionArgs);\n\t\t\t\t\tconst functionInput = parsedArgs.input ?? parsedArgs ?? functionArgs;\n\t\t\t\t\tfunctionResponse = await tool.invoke(functionInput);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof functionResponse === 'object') {\n\t\t\t\tfunctionResponse = JSON.stringify(functionResponse);\n\t\t\t}\n\n\t\t\tmessages.push({\n\t\t\t\ttool_call_id: toolCall.id,\n\t\t\t\trole: 'tool',\n\t\t\t\tcontent: functionResponse,\n\t\t\t});\n\t\t}\n\n\t\tresponse = (await apiRequest.call(this, 'POST', '/chat/completions', {\n\t\t\tbody,\n\t\t})) as ChatCompletion;\n\n\t\ttoolCalls = response.choices[0].message.tool_calls;\n\t\tcurrentIteration += 1;\n\t}\n\n\tif (response_format) {\n\t\tresponse.choices = response.choices.map((choice) => {\n\t\t\ttry {\n\t\t\t\tchoice.message.content = JSON.parse(choice.message.content);\n\t\t\t} catch (error) {}\n\t\t\treturn choice;\n\t\t});\n\t}\n\n\tconst simplify = this.getNodeParameter('simplify', i) as boolean;\n\n\tconst returnData: INodeExecutionData[] = [];\n\n\tif (simplify) {\n\t\tfor (const entry of response.choices) {\n\t\t\treturnData.push({\n\t\t\t\tjson: entry,\n\t\t\t\tpairedItem: { item: i },\n\t\t\t});\n\t\t}\n\t} else {\n\t\treturnData.push({ json: response, pairedItem: { item: i } });\n\t}\n\n\treturn returnData;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA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AA,MACD;AAEA,UAAI,OAAO,qBAAqB,UAAU;AACzC,2BAAmB,KAAK,UAAU,gBAAgB;AAAA,MACnD;AAEA,eAAS,KAAK;AAAA,QACb,cAAc,SAAS;AAAA,QACvB,MAAM;AAAA,QACN,SAAS;AAAA,MACV,CAAC;AAAA,IACF;AAEA,eAAY,MAAM,4BAAW,KAAK,MAAM,QAAQ,qBAAqB;AAAA,MACpE;AAAA,IACD,CAAC;AAED,gBAAY,SAAS,QAAQ,CAAC,EAAE,QAAQ;AACxC,wBAAoB;AAAA,EACrB;AAEA,MAAI,iBAAiB;AACpB,aAAS,UAAU,SAAS,QAAQ,IAAI,CAAC,WAAW;AACnD,UAAI;AACH,eAAO,QAAQ,UAAU,KAAK,MAAM,OAAO,QAAQ,OAAO;AAAA,MAC3D,SAAS,OAAO;AAAA,MAAC;AACjB,aAAO;AAAA,IACR,CAAC;AAAA,EACF;AAEA,QAAM,WAAW,KAAK,iBAAiB,YAAY,CAAC;AAEpD,QAAM,aAAmC,CAAC;AAE1C,MAAI,UAAU;AACb,eAAW,SAAS,SAAS,SAAS;AACrC,iBAAW,KAAK;AAAA,QACf,MAAM;AAAA,QACN,YAAY,EAAE,MAAM,EAAE;AAAA,MACvB,CAAC;AAAA,IACF;AAAA,EACD,OAAO;AACN,eAAW,KAAK,EAAE,MAAM,UAAU,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;AAAA,EAC5D;AAEA,SAAO;AACR;","names":["_omit"]}
1
+ {"version":3,"sources":["../../../../../../nodes/vendors/OpenAi/actions/text/message.operation.ts"],"sourcesContent":["import type { Tool } from '@langchain/core/tools';\nimport _omit from 'lodash/omit';\nimport type {\n\tINodeProperties,\n\tIExecuteFunctions,\n\tINodeExecutionData,\n\tIDataObject,\n} from 'n8n-workflow';\nimport { jsonParse, updateDisplayOptions } from 'n8n-workflow';\n\nimport { getConnectedTools } from '@utils/helpers';\n\nimport { MODELS_NOT_SUPPORT_FUNCTION_CALLS } from '../../helpers/constants';\nimport type { ChatCompletion } from '../../helpers/interfaces';\nimport { formatToOpenAIAssistantTool } from '../../helpers/utils';\nimport { apiRequest } from '../../transport';\nimport { modelRLC } from '../descriptions';\n\nconst properties: INodeProperties[] = [\n\tmodelRLC('modelSearch'),\n\t{\n\t\tdisplayName: 'Messages',\n\t\tname: 'messages',\n\t\ttype: 'fixedCollection',\n\t\ttypeOptions: {\n\t\t\tsortable: true,\n\t\t\tmultipleValues: true,\n\t\t},\n\t\tplaceholder: 'Add Message',\n\t\tdefault: { values: [{ content: '' }] },\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Values',\n\t\t\t\tname: 'values',\n\t\t\t\tvalues: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Prompt',\n\t\t\t\t\t\tname: 'content',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdescription: 'The content of the message to be send',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'e.g. Hello, how can you help me?',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\trows: 2,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Role',\n\t\t\t\t\t\tname: 'role',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Role in shaping the model's response, it tells the model how it should behave and interact with the user\",\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'User',\n\t\t\t\t\t\t\t\tvalue: 'user',\n\t\t\t\t\t\t\t\tdescription: 'Send a message as a user and get a response from the model',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Assistant',\n\t\t\t\t\t\t\t\tvalue: 'assistant',\n\t\t\t\t\t\t\t\tdescription: 'Tell the model to adopt a specific tone or personality',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'System',\n\t\t\t\t\t\t\t\tvalue: 'system',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t\"Usually used to set the model's behavior or context for the next user message\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'user',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'Simplify Output',\n\t\tname: 'simplify',\n\t\ttype: 'boolean',\n\t\tdefault: true,\n\t\tdescription: 'Whether to return a simplified version of the response instead of the raw data',\n\t},\n\t{\n\t\tdisplayName: 'Output Content as JSON',\n\t\tname: 'jsonOutput',\n\t\ttype: 'boolean',\n\t\tdescription:\n\t\t\t'Whether to attempt to return the response in JSON format. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models newer than gpt-3.5-turbo-1106.',\n\t\tdefault: false,\n\t},\n\t{\n\t\tdisplayName: 'Hide Tools',\n\t\tname: 'hideTools',\n\t\ttype: 'hidden',\n\t\tdefault: 'hide',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tmodelId: MODELS_NOT_SUPPORT_FUNCTION_CALLS,\n\t\t\t\t'@version': [{ _cnd: { gte: 1.2 } }],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Connect your own custom n8n tools to this node on the canvas',\n\t\tname: 'noticeTools',\n\t\ttype: 'notice',\n\t\tdefault: '',\n\t\tdisplayOptions: {\n\t\t\thide: {\n\t\t\t\thideTools: ['hide'],\n\t\t\t},\n\t\t},\n\t},\n\t{\n\t\tdisplayName: 'Options',\n\t\tname: 'options',\n\t\tplaceholder: 'Add Option',\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: 'frequency_penalty',\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: 16,\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).',\n\t\t\t\ttype: 'number',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmaxValue: 32768,\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Number of Completions',\n\t\t\t\tname: 'n',\n\t\t\t\tdefault: 1,\n\t\t\t\tdescription:\n\t\t\t\t\t'How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Presence Penalty',\n\t\t\t\tname: 'presence_penalty',\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: 'Output Randomness (Temperature)',\n\t\t\t\tname: 'temperature',\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 randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. We generally recommend altering this or temperature but not both.',\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Output Randomness (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'An alternative to sampling with temperature, 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\t{\n\t\t\t\tdisplayName: 'Max Tool Calls Iterations',\n\t\t\t\tname: 'maxToolsIterations',\n\t\t\t\ttype: 'number',\n\t\t\t\tdefault: 15,\n\t\t\t\tdescription:\n\t\t\t\t\t'The maximum number of tool iteration cycles the LLM will run before stopping. A single iteration can contain multiple tool calls. Set to 0 for no limit.',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'@version': [{ _cnd: { gte: 1.5 } }],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst displayOptions = {\n\tshow: {\n\t\toperation: ['message'],\n\t\tresource: ['text'],\n\t},\n};\n\nexport const description = updateDisplayOptions(displayOptions, properties);\n\nexport async function execute(this: IExecuteFunctions, i: number): Promise<INodeExecutionData[]> {\n\tconst nodeVersion = this.getNode().typeVersion;\n\tconst model = this.getNodeParameter('modelId', i, '', { extractValue: true });\n\tlet messages = this.getNodeParameter('messages.values', i, []) as IDataObject[];\n\tconst options = this.getNodeParameter('options', i, {});\n\tconst jsonOutput = this.getNodeParameter('jsonOutput', i, false) as boolean;\n\tconst maxToolsIterations =\n\t\tnodeVersion >= 1.5 ? (this.getNodeParameter('options.maxToolsIterations', i, 15) as number) : 0;\n\n\tconst abortSignal = this.getExecutionCancelSignal();\n\n\tif (options.maxTokens !== undefined) {\n\t\toptions.max_completion_tokens = options.maxTokens;\n\t\tdelete options.maxTokens;\n\t}\n\n\tif (options.topP !== undefined) {\n\t\toptions.top_p = options.topP;\n\t\tdelete options.topP;\n\t}\n\n\tlet response_format;\n\tif (jsonOutput) {\n\t\tresponse_format = { type: 'json_object' };\n\t\tmessages = [\n\t\t\t{\n\t\t\t\trole: 'system',\n\t\t\t\tcontent: 'You are a helpful assistant designed to output JSON.',\n\t\t\t},\n\t\t\t...messages,\n\t\t];\n\t}\n\n\tconst hideTools = this.getNodeParameter('hideTools', i, '') as string;\n\n\tlet tools;\n\tlet externalTools: Tool[] = [];\n\n\tif (hideTools !== 'hide') {\n\t\tconst enforceUniqueNames = nodeVersion > 1;\n\t\texternalTools = await getConnectedTools(this, enforceUniqueNames, false);\n\t}\n\n\tif (externalTools.length) {\n\t\ttools = externalTools.length ? externalTools?.map(formatToOpenAIAssistantTool) : undefined;\n\t}\n\n\tconst body: IDataObject = {\n\t\tmodel,\n\t\tmessages,\n\t\ttools,\n\t\tresponse_format,\n\t\t..._omit(options, ['maxToolsIterations']),\n\t};\n\n\tlet response = (await apiRequest.call(this, 'POST', '/chat/completions', {\n\t\tbody,\n\t})) as ChatCompletion;\n\n\tif (!response) return [];\n\n\tlet currentIteration = 1;\n\tlet toolCalls = response?.choices[0]?.message?.tool_calls;\n\n\twhile (toolCalls?.length) {\n\t\t// Break the loop if the max iterations is reached or the execution is canceled\n\t\tif (\n\t\t\tabortSignal?.aborted ||\n\t\t\t(maxToolsIterations > 0 && currentIteration >= maxToolsIterations)\n\t\t) {\n\t\t\tbreak;\n\t\t}\n\t\tmessages.push(response.choices[0].message);\n\n\t\tfor (const toolCall of toolCalls) {\n\t\t\tconst functionName = toolCall.function.name;\n\t\t\tconst functionArgs = toolCall.function.arguments;\n\n\t\t\tlet functionResponse;\n\t\t\tfor (const tool of externalTools ?? []) {\n\t\t\t\tif (tool.name === functionName) {\n\t\t\t\t\tconst parsedArgs: { input: string } = jsonParse(functionArgs);\n\t\t\t\t\tconst functionInput = parsedArgs.input ?? parsedArgs ?? functionArgs;\n\t\t\t\t\tfunctionResponse = await tool.invoke(functionInput);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof functionResponse === 'object') {\n\t\t\t\tfunctionResponse = JSON.stringify(functionResponse);\n\t\t\t}\n\n\t\t\tmessages.push({\n\t\t\t\ttool_call_id: toolCall.id,\n\t\t\t\trole: 'tool',\n\t\t\t\tcontent: functionResponse,\n\t\t\t});\n\t\t}\n\n\t\tresponse = (await apiRequest.call(this, 'POST', '/chat/completions', {\n\t\t\tbody,\n\t\t})) as ChatCompletion;\n\n\t\ttoolCalls = response.choices[0].message.tool_calls;\n\t\tcurrentIteration += 1;\n\t}\n\n\tif (response_format) {\n\t\tresponse.choices = response.choices.map((choice) => {\n\t\t\ttry {\n\t\t\t\tchoice.message.content = JSON.parse(choice.message.content);\n\t\t\t} catch (error) {}\n\t\t\treturn choice;\n\t\t});\n\t}\n\n\tconst simplify = this.getNodeParameter('simplify', i) as boolean;\n\n\tconst returnData: INodeExecutionData[] = [];\n\n\tif (simplify) {\n\t\tfor (const entry of response.choices) {\n\t\t\treturnData.push({\n\t\t\t\tjson: entry,\n\t\t\t\tpairedItem: { item: i },\n\t\t\t});\n\t\t}\n\t} else {\n\t\treturnData.push({ json: response, pairedItem: { item: i } });\n\t}\n\n\treturn returnData;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAkB;AAOlB,0BAAgD;AAEhD,qBAAkC;AAElC,uBAAkD;AAElD,mBAA4C;AAC5C,uBAA2B;AAC3B,0BAAyB;AAEzB,MAAM,aAAgC;AAAA,MACrC,8BAAS,aAAa;AAAA,EACtB;AAAA,IACC,aAAa;AAAA,IACb,MAAM;AAAA,IACN,MAAM;AAAA,IACN,aAAa;AAAA,MACZ,UAAU;AAAA,MACV,gBAAgB;AAAA,IACjB;AAAA,IACA,aAAa;AAAA,IACb,SAAS,EAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,EAAE;AAAA,IACrC,SAAS;AAAA,MACR;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,QAAQ;AAAA,UACP;AAAA,Y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QAAQ,OAAO;AAAA,MAC3D,SAAS,OAAO;AAAA,MAAC;AACjB,aAAO;AAAA,IACR,CAAC;AAAA,EACF;AAEA,QAAM,WAAW,KAAK,iBAAiB,YAAY,CAAC;AAEpD,QAAM,aAAmC,CAAC;AAE1C,MAAI,UAAU;AACb,eAAW,SAAS,SAAS,SAAS;AACrC,iBAAW,KAAK;AAAA,QACf,MAAM;AAAA,QACN,YAAY,EAAE,MAAM,EAAE;AAAA,MACvB,CAAC;AAAA,IACF;AAAA,EACD,OAAO;AACN,eAAW,KAAK,EAAE,MAAM,UAAU,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;AAAA,EAC5D;AAEA,SAAO;AACR;","names":["_omit"]}
@@ -21,5 +21,5 @@
21
21
  {"name":"wolframAlphaApi","displayName":"WolframAlphaApi","documentationUrl":"wolframalpha","properties":[{"displayName":"App ID","name":"appId","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"qs":{"api_key":"={{$credentials.appId}}"}}},"test":{"request":{"baseURL":"https://api.wolframalpha.com/v1","url":"=/simple","qs":{"i":"How much is 1 1","appid":"={{$credentials.appId}}"}}},"supportedNodes":["toolWolframAlpha"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/tools/ToolWolframAlpha/wolfram-alpha.svg"},
22
22
  {"name":"xAiApi","displayName":"xAi","documentationUrl":"xai","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://api.x.ai/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChatXAiGrok"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.dark.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.svg"}},
23
23
  {"name":"xataApi","displayName":"Xata Api","documentationUrl":"xata","properties":[{"displayName":"Database Endpoint","name":"databaseEndpoint","required":true,"type":"string","default":"","placeholder":"https://{workspace}.{region}.xata.sh/db/{database}"},{"displayName":"Branch","name":"branch","required":true,"type":"string","default":"main"},{"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":"={{$credentials.databaseEndpoint}}:{{$credentials.branch}}"}},"supportedNodes":["memoryXata"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/memory/MemoryXata/xata.svg"},
24
- {"name":"zepApi","displayName":"Zep Api","documentationUrl":"zep","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":false,"default":""},{"displayName":"Cloud","description":"Whether you are adding credentials for Zep Cloud instead of Zep Open Source","name":"cloud","type":"boolean","default":false},{"displayName":"API URL","name":"apiUrl","required":false,"type":"string","default":"http://localhost:8000","displayOptions":{"show":{"cloud":[false]}}}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"={{$credentials.apiKey && !$credentials.cloud ? \"Bearer \" + $credentials.apiKey : \"Api-Key \" + $credentials.apiKey }}"}}},"test":{"request":{"baseURL":"={{!$credentials.cloud ? $credentials.apiUrl : \"https://api.getzep.com\"}}","url":"={{!$credentials.cloud ? \"/api/v1/collection\" : \"/api/v2/collections\"}}"}},"supportedNodes":["memoryZep","vectorStoreZep","vectorStoreZepInsert","vectorStoreZepLoad"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/memory/MemoryZep/zep.png"}
24
+ {"name":"zepApi","displayName":"Zep Api","documentationUrl":"zep","properties":[{"displayName":"This Zep integration is deprecated and will be removed in a future version.","name":"deprecationNotice","type":"notice","default":""},{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":false,"default":""},{"displayName":"Cloud","description":"Whether you are adding credentials for Zep Cloud instead of Zep Open Source","name":"cloud","type":"boolean","default":false},{"displayName":"API URL","name":"apiUrl","required":false,"type":"string","default":"http://localhost:8000","displayOptions":{"show":{"cloud":[false]}}}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"={{$credentials.apiKey && !$credentials.cloud ? \"Bearer \" + $credentials.apiKey : \"Api-Key \" + $credentials.apiKey }}"}}},"test":{"request":{"baseURL":"={{!$credentials.cloud ? $credentials.apiUrl : \"https://api.getzep.com\"}}","url":"={{!$credentials.cloud ? \"/api/v1/collection\" : \"/api/v2/collections\"}}"}},"supportedNodes":["memoryZep","vectorStoreZep","vectorStoreZepInsert","vectorStoreZepLoad"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/memory/MemoryZep/zep.png"}
25
25
  ]