n8n-nodes-cloudflare 0.1.6 → 0.1.7
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.
- package/README.md +34 -26
- package/dist/nodes/CloudflareVectorize/CloudflareVectorize.node.js +12 -0
- package/dist/nodes/CloudflareVectorize/CloudflareVectorize.node.js.map +1 -1
- package/dist/nodes/CloudflareVectorize/VectorizeRagDescription.d.ts +3 -0
- package/dist/nodes/CloudflareVectorize/VectorizeRagDescription.js +258 -0
- package/dist/nodes/CloudflareVectorize/VectorizeRagDescription.js.map +1 -0
- package/dist/nodes/CloudflareVectorize/VectorizeRagExecute.d.ts +2 -0
- package/dist/nodes/CloudflareVectorize/VectorizeRagExecute.js +119 -0
- package/dist/nodes/CloudflareVectorize/VectorizeRagExecute.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,32 +82,29 @@ R2 Storage, D1 Database, Pages, Stream, Images, Queues, Load Balancer, Registrar
|
|
|
82
82
|
|
|
83
83
|
```json
|
|
84
84
|
{
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"connections": {}
|
|
85
|
+
"nodes": [
|
|
86
|
+
{
|
|
87
|
+
"parameters": {
|
|
88
|
+
"zoneId": "2454f994f1057a933cf06857ea485578",
|
|
89
|
+
"returnAll": true,
|
|
90
|
+
"filters": {
|
|
91
|
+
"proxied": true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"type": "CUSTOM.cloudflareDns",
|
|
95
|
+
"typeVersion": 1,
|
|
96
|
+
"position": [208, 0],
|
|
97
|
+
"id": "ba613500-5af9-4a88-8334-1230e875c060",
|
|
98
|
+
"name": "Get many DNS records",
|
|
99
|
+
"credentials": {
|
|
100
|
+
"cloudflareApi": {
|
|
101
|
+
"id": "46t5YxHZ7Xygke2Z",
|
|
102
|
+
"name": "Cloudflare account"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"connections": {}
|
|
111
108
|
}
|
|
112
109
|
```
|
|
113
110
|
|
|
@@ -130,6 +127,17 @@ If you hit this, uninstall the conflicting package and restart n8n.
|
|
|
130
127
|
|
|
131
128
|
Example report: https://github.com/Automations-Project/n8n-nodes-cloudflare/issues/2
|
|
132
129
|
|
|
130
|
+
## 🤖 RAG Workflows (Vector Search)
|
|
131
|
+
|
|
132
|
+
The **Cloudflare Vectorize** node includes a built-in **RAG (Embed + Store)** resource that combines Workers AI embeddings with Vectorize storage in a single operation:
|
|
133
|
+
|
|
134
|
+
- **Insert Documents**: Text → Embeddings → Vector Storage
|
|
135
|
+
- **Search Documents**: Query → Embedding → Similarity Search
|
|
136
|
+
|
|
137
|
+
📖 See [docs/RAG-WORKFLOW-GUIDE.md](docs/RAG-WORKFLOW-GUIDE.md) for complete workflow examples.
|
|
138
|
+
|
|
139
|
+
> **Note:** Native LangChain cluster node integration (Document Loader, AI Agent tool connectors) requires n8n core support and is not available in community nodes. See the documentation for details and how to request this feature from n8n.
|
|
140
|
+
|
|
133
141
|
## 📋 Requirements
|
|
134
142
|
|
|
135
143
|
- **n8n** >= 1.0.0
|
|
@@ -4,8 +4,10 @@ exports.CloudflareVectorize = void 0;
|
|
|
4
4
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
5
|
const VectorizeIndexDescription_1 = require("./VectorizeIndexDescription");
|
|
6
6
|
const VectorizeVectorDescription_1 = require("./VectorizeVectorDescription");
|
|
7
|
+
const VectorizeRagDescription_1 = require("./VectorizeRagDescription");
|
|
7
8
|
const VectorizeIndexExecute_1 = require("./VectorizeIndexExecute");
|
|
8
9
|
const VectorizeVectorExecute_1 = require("./VectorizeVectorExecute");
|
|
10
|
+
const VectorizeRagExecute_1 = require("./VectorizeRagExecute");
|
|
9
11
|
const SharedMethods_1 = require("../shared/SharedMethods");
|
|
10
12
|
class CloudflareVectorize {
|
|
11
13
|
constructor() {
|
|
@@ -53,6 +55,11 @@ class CloudflareVectorize {
|
|
|
53
55
|
name: 'Index',
|
|
54
56
|
value: 'index',
|
|
55
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: 'RAG (Embed + Store)',
|
|
60
|
+
value: 'rag',
|
|
61
|
+
description: 'Convenient RAG operations that combine embedding generation and vector storage',
|
|
62
|
+
},
|
|
56
63
|
{
|
|
57
64
|
name: 'Vector',
|
|
58
65
|
value: 'vector',
|
|
@@ -62,6 +69,8 @@ class CloudflareVectorize {
|
|
|
62
69
|
},
|
|
63
70
|
...VectorizeIndexDescription_1.vectorizeIndexOperations,
|
|
64
71
|
...VectorizeIndexDescription_1.vectorizeIndexFields,
|
|
72
|
+
...VectorizeRagDescription_1.vectorizeRagOperations,
|
|
73
|
+
...VectorizeRagDescription_1.vectorizeRagFields,
|
|
65
74
|
...VectorizeVectorDescription_1.vectorizeVectorOperations,
|
|
66
75
|
...VectorizeVectorDescription_1.vectorizeVectorFields,
|
|
67
76
|
],
|
|
@@ -80,6 +89,9 @@ class CloudflareVectorize {
|
|
|
80
89
|
else if (resource === 'vector') {
|
|
81
90
|
result = await VectorizeVectorExecute_1.vectorizeVectorExecute.call(this, i);
|
|
82
91
|
}
|
|
92
|
+
else if (resource === 'rag') {
|
|
93
|
+
result = await VectorizeRagExecute_1.vectorizeRagExecute.call(this, i);
|
|
94
|
+
}
|
|
83
95
|
else {
|
|
84
96
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource: ${resource}`, { itemIndex: i });
|
|
85
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudflareVectorize.node.js","sourceRoot":"","sources":["../../../nodes/CloudflareVectorize/CloudflareVectorize.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,2EAA6F;AAC7F,6EAAgG;AAChG,mEAAgE;AAChE,qEAAkE;AAClE,2DAA2E;AAE3E,MAAa,mBAAmB;IAAhC;QACC,YAAO,GAAG;YACT,WAAW,EAAE;gBACZ,WAAW,EAAX,2BAAW;gBACX,mBAAmB,EAAnB,mCAAmB;aACnB;SACD,CAAC;QAEF,gBAAW,GAAyB;YACnC,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE;gBACT,IAAI,EAAE,sBAAsB;aAC5B;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,YAAY,EAAE,IAAI;YAClB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,sCAAsC;gBAC/C,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,OAAO;4BACb,KAAK,EAAE,OAAO;yBACd;wBACD;4BACC,IAAI,EAAE,QAAQ;4BACd,KAAK,EAAE,QAAQ;yBACf;qBACD;oBACD,OAAO,EAAE,OAAO;iBAChB;gBACD,GAAG,oDAAwB;gBAC3B,GAAG,gDAAoB;gBACvB,GAAG,sDAAyB;gBAC5B,GAAG,kDAAqB;aACxB;SACD,CAAC;
|
|
1
|
+
{"version":3,"file":"CloudflareVectorize.node.js","sourceRoot":"","sources":["../../../nodes/CloudflareVectorize/CloudflareVectorize.node.ts"],"names":[],"mappings":";;;AAAA,+CAMsB;AAEtB,2EAA6F;AAC7F,6EAAgG;AAChG,uEAAuF;AACvF,mEAAgE;AAChE,qEAAkE;AAClE,+DAA4D;AAC5D,2DAA2E;AAE3E,MAAa,mBAAmB;IAAhC;QACC,YAAO,GAAG;YACT,WAAW,EAAE;gBACZ,WAAW,EAAX,2BAAW;gBACX,mBAAmB,EAAnB,mCAAmB;aACnB;SACD,CAAC;QAEF,gBAAW,GAAyB;YACnC,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE;gBACT,IAAI,EAAE,sBAAsB;aAC5B;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,YAAY,EAAE,IAAI;YAClB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,eAAe;oBACrB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,sCAAsC;gBAC/C,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,I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,EAAE,CAAC,EAAE,CAAC,CAAC;iBAChG;gBAED,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;aAC3B;YAAC,OAAO,KAAK,EAAE;gBACf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,EAAE,KAAK,EAAG,KAAe,CAAC,OAAO,EAAE;wBACzC,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACvB,CAAC,CAAC;oBACH,SAAS;iBACT;gBACD,MAAM,KAAK,CAAC;aACZ;SACD;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AArGD,kDAqGC"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vectorizeRagFields = exports.vectorizeRagOperations = void 0;
|
|
4
|
+
const SharedFields_1 = require("../shared/SharedFields");
|
|
5
|
+
exports.vectorizeRagOperations = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['rag'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: 'Insert Documents',
|
|
19
|
+
value: 'insertDocuments',
|
|
20
|
+
description: 'Generate embeddings from text and store in vector database',
|
|
21
|
+
action: 'Insert documents',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Search Documents',
|
|
25
|
+
value: 'searchDocuments',
|
|
26
|
+
description: 'Search for similar documents using natural language query',
|
|
27
|
+
action: 'Search documents',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
default: 'searchDocuments',
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
exports.vectorizeRagFields = [
|
|
34
|
+
{
|
|
35
|
+
...SharedFields_1.accountIdField,
|
|
36
|
+
displayOptions: {
|
|
37
|
+
show: {
|
|
38
|
+
resource: ['rag'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Index Name or ID',
|
|
44
|
+
name: 'indexName',
|
|
45
|
+
type: 'options',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
loadOptionsMethod: 'getVectorizeIndexes',
|
|
48
|
+
loadOptionsDependsOn: ['accountId'],
|
|
49
|
+
},
|
|
50
|
+
required: true,
|
|
51
|
+
default: '',
|
|
52
|
+
description: 'Name of the vector index. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
53
|
+
displayOptions: {
|
|
54
|
+
show: {
|
|
55
|
+
resource: ['rag'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
displayName: 'Embedding Model',
|
|
61
|
+
name: 'embeddingModel',
|
|
62
|
+
type: 'options',
|
|
63
|
+
options: [
|
|
64
|
+
{
|
|
65
|
+
name: 'BGE Base EN V1.5 (768 Dimensions)',
|
|
66
|
+
value: '@cf/baai/bge-base-en-v1.5',
|
|
67
|
+
description: 'General purpose English embeddings - 768 dimensions',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'BGE Small EN V1.5 (384 Dimensions)',
|
|
71
|
+
value: '@cf/baai/bge-small-en-v1.5',
|
|
72
|
+
description: 'Smaller, faster English embeddings - 384 dimensions',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'BGE Large EN V1.5 (1024 Dimensions)',
|
|
76
|
+
value: '@cf/baai/bge-large-en-v1.5',
|
|
77
|
+
description: 'Highest quality English embeddings - 1024 dimensions',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
default: '@cf/baai/bge-base-en-v1.5',
|
|
81
|
+
description: 'Workers AI model for generating embeddings',
|
|
82
|
+
displayOptions: {
|
|
83
|
+
show: {
|
|
84
|
+
resource: ['rag'],
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
displayName: 'Documents',
|
|
90
|
+
name: 'documents',
|
|
91
|
+
type: 'fixedCollection',
|
|
92
|
+
typeOptions: {
|
|
93
|
+
multipleValues: true,
|
|
94
|
+
},
|
|
95
|
+
placeholder: 'Add Document',
|
|
96
|
+
default: { documentValues: [] },
|
|
97
|
+
description: 'Documents to embed and store',
|
|
98
|
+
displayOptions: {
|
|
99
|
+
show: {
|
|
100
|
+
resource: ['rag'],
|
|
101
|
+
operation: ['insertDocuments'],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
options: [
|
|
105
|
+
{
|
|
106
|
+
displayName: 'Document',
|
|
107
|
+
name: 'documentValues',
|
|
108
|
+
values: [
|
|
109
|
+
{
|
|
110
|
+
displayName: 'ID',
|
|
111
|
+
name: 'id',
|
|
112
|
+
type: 'string',
|
|
113
|
+
default: '',
|
|
114
|
+
placeholder: 'doc-1',
|
|
115
|
+
description: 'Unique identifier for this document',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
displayName: 'Text Content',
|
|
119
|
+
name: 'text',
|
|
120
|
+
type: 'string',
|
|
121
|
+
typeOptions: {
|
|
122
|
+
rows: 4,
|
|
123
|
+
},
|
|
124
|
+
default: '',
|
|
125
|
+
placeholder: 'Enter the document text to embed...',
|
|
126
|
+
description: 'The text content to generate embeddings for',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
displayName: 'Metadata (JSON)',
|
|
130
|
+
name: 'metadata',
|
|
131
|
+
type: 'json',
|
|
132
|
+
default: '{}',
|
|
133
|
+
description: 'Optional metadata to store with the vector',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
displayName: 'Text Field',
|
|
141
|
+
name: 'textField',
|
|
142
|
+
type: 'string',
|
|
143
|
+
default: 'text',
|
|
144
|
+
placeholder: 'text',
|
|
145
|
+
description: 'Field name in input data containing text to embed (for batch mode)',
|
|
146
|
+
displayOptions: {
|
|
147
|
+
show: {
|
|
148
|
+
resource: ['rag'],
|
|
149
|
+
operation: ['insertDocuments'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
displayName: 'Use Input Data',
|
|
155
|
+
name: 'useInputData',
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
default: true,
|
|
158
|
+
description: 'Whether to use input data for documents instead of manual entry. When enabled, each input item will be processed as a document.',
|
|
159
|
+
displayOptions: {
|
|
160
|
+
show: {
|
|
161
|
+
resource: ['rag'],
|
|
162
|
+
operation: ['insertDocuments'],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
displayName: 'ID Field',
|
|
168
|
+
name: 'idField',
|
|
169
|
+
type: 'string',
|
|
170
|
+
default: 'id',
|
|
171
|
+
placeholder: 'ID',
|
|
172
|
+
description: 'Field name in input data containing document ID (auto-generated if not found)',
|
|
173
|
+
displayOptions: {
|
|
174
|
+
show: {
|
|
175
|
+
resource: ['rag'],
|
|
176
|
+
operation: ['insertDocuments'],
|
|
177
|
+
useInputData: [true],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
displayName: 'Store Original Text',
|
|
183
|
+
name: 'storeOriginalText',
|
|
184
|
+
type: 'boolean',
|
|
185
|
+
default: true,
|
|
186
|
+
description: 'Whether to store the original text in metadata for retrieval',
|
|
187
|
+
displayOptions: {
|
|
188
|
+
show: {
|
|
189
|
+
resource: ['rag'],
|
|
190
|
+
operation: ['insertDocuments'],
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
displayName: 'Query',
|
|
196
|
+
name: 'searchQuery',
|
|
197
|
+
type: 'string',
|
|
198
|
+
typeOptions: {
|
|
199
|
+
rows: 2,
|
|
200
|
+
},
|
|
201
|
+
required: true,
|
|
202
|
+
default: '',
|
|
203
|
+
placeholder: 'What is the capital of France?',
|
|
204
|
+
description: 'Natural language query to search for similar documents',
|
|
205
|
+
displayOptions: {
|
|
206
|
+
show: {
|
|
207
|
+
resource: ['rag'],
|
|
208
|
+
operation: ['searchDocuments'],
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
displayName: 'Options',
|
|
214
|
+
name: 'searchOptions',
|
|
215
|
+
type: 'collection',
|
|
216
|
+
placeholder: 'Add Option',
|
|
217
|
+
default: {},
|
|
218
|
+
displayOptions: {
|
|
219
|
+
show: {
|
|
220
|
+
resource: ['rag'],
|
|
221
|
+
operation: ['searchDocuments'],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
options: [
|
|
225
|
+
{
|
|
226
|
+
displayName: 'Filter',
|
|
227
|
+
name: 'filter',
|
|
228
|
+
type: 'json',
|
|
229
|
+
default: '{}',
|
|
230
|
+
description: 'Metadata filter as JSON object',
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
displayName: 'Minimum Score',
|
|
234
|
+
name: 'minScore',
|
|
235
|
+
type: 'number',
|
|
236
|
+
default: 0,
|
|
237
|
+
typeOptions: {
|
|
238
|
+
minValue: 0,
|
|
239
|
+
maxValue: 1,
|
|
240
|
+
numberPrecision: 2,
|
|
241
|
+
},
|
|
242
|
+
description: 'Minimum similarity score threshold (0-1)',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
displayName: 'Top K',
|
|
246
|
+
name: 'topK',
|
|
247
|
+
type: 'number',
|
|
248
|
+
default: 5,
|
|
249
|
+
typeOptions: {
|
|
250
|
+
minValue: 1,
|
|
251
|
+
maxValue: 20,
|
|
252
|
+
},
|
|
253
|
+
description: 'Number of similar documents to return (1-20)',
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
];
|
|
258
|
+
//# sourceMappingURL=VectorizeRagDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorizeRagDescription.js","sourceRoot":"","sources":["../../../nodes/CloudflareVectorize/VectorizeRagDescription.ts"],"names":[],"mappings":";;;AACA,yDAAwD;AAE3C,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,KAAK,CAAC;aACjB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,4DAA4D;gBACzE,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,2DAA2D;gBACxE,MAAM,EAAE,kBAAkB;aAC1B;SACD;QACD,OAAO,EAAE,iBAAiB;KAC1B;CACD,CAAC;AAEW,QAAA,kBAAkB,GAAsB;IAIpD;QACC,GAAG,6BAAc;QACjB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,KAAK,CAAC;aACjB;SACD;KACD;IAKD;QACC,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,qBAAqB;YACxC,oBAAoB,EAAE,CAAC,WAAW,CAAC;SACnC;QACD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,2IAA2I;QACxJ,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,KAAK,C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BACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE;oBACZ,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,EAAE;iBACZ;gBACD,WAAW,EAAE,8CAA8C;aAC3D;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vectorizeRagExecute = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const GenericFunctions_1 = require("../shared/GenericFunctions");
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
async function vectorizeRagExecute(itemIndex) {
|
|
8
|
+
var _a;
|
|
9
|
+
const operation = this.getNodeParameter('operation', itemIndex);
|
|
10
|
+
const accountId = this.getNodeParameter('accountId', itemIndex);
|
|
11
|
+
const indexName = this.getNodeParameter('indexName', itemIndex);
|
|
12
|
+
const embeddingModel = this.getNodeParameter('embeddingModel', itemIndex);
|
|
13
|
+
let responseData;
|
|
14
|
+
if (operation === 'insertDocuments') {
|
|
15
|
+
const useInputData = this.getNodeParameter('useInputData', itemIndex, true);
|
|
16
|
+
const storeOriginalText = this.getNodeParameter('storeOriginalText', itemIndex, true);
|
|
17
|
+
let documents = [];
|
|
18
|
+
if (useInputData) {
|
|
19
|
+
const items = this.getInputData();
|
|
20
|
+
const textField = this.getNodeParameter('textField', itemIndex, 'text');
|
|
21
|
+
const idField = this.getNodeParameter('idField', itemIndex, 'id');
|
|
22
|
+
for (let i = 0; i < items.length; i++) {
|
|
23
|
+
const item = items[i].json;
|
|
24
|
+
const text = item[textField] || '';
|
|
25
|
+
const id = item[idField] || (0, crypto_1.randomUUID)();
|
|
26
|
+
const metadata = {};
|
|
27
|
+
for (const key of Object.keys(item)) {
|
|
28
|
+
if (key !== textField && key !== idField) {
|
|
29
|
+
metadata[key] = item[key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (text) {
|
|
33
|
+
documents.push({ id, text, metadata });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const documentsParam = this.getNodeParameter('documents', itemIndex);
|
|
39
|
+
documents = documentsParam.documentValues.map((doc) => ({
|
|
40
|
+
id: doc.id || (0, crypto_1.randomUUID)(),
|
|
41
|
+
text: doc.text,
|
|
42
|
+
metadata: doc.metadata ? JSON.parse(doc.metadata) : {},
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
if (documents.length === 0) {
|
|
46
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No documents to insert. Provide documents or input data with text.', { itemIndex });
|
|
47
|
+
}
|
|
48
|
+
const texts = documents.map((doc) => doc.text);
|
|
49
|
+
const embeddingResponse = await GenericFunctions_1.cloudflareApiRequest.call(this, 'POST', `/accounts/${accountId}/ai/run/${embeddingModel}`, { text: texts });
|
|
50
|
+
const embeddings = embeddingResponse.data;
|
|
51
|
+
if (!embeddings || embeddings.length !== documents.length) {
|
|
52
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Embedding generation failed. Expected ${documents.length} embeddings, got ${(embeddings === null || embeddings === void 0 ? void 0 : embeddings.length) || 0}`, { itemIndex });
|
|
53
|
+
}
|
|
54
|
+
const vectors = documents.map((doc, idx) => {
|
|
55
|
+
const metadata = { ...doc.metadata };
|
|
56
|
+
if (storeOriginalText) {
|
|
57
|
+
metadata.text = doc.text;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
id: doc.id,
|
|
61
|
+
values: embeddings[idx],
|
|
62
|
+
metadata,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
responseData = await GenericFunctions_1.cloudflareApiRequestNdjson.call(this, 'POST', `/accounts/${accountId}/vectorize/v2/indexes/${indexName}/upsert`, vectors, itemIndex);
|
|
66
|
+
responseData = {
|
|
67
|
+
...responseData,
|
|
68
|
+
documentsInserted: documents.length,
|
|
69
|
+
embeddingModel,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (operation === 'searchDocuments') {
|
|
73
|
+
const searchQuery = this.getNodeParameter('searchQuery', itemIndex);
|
|
74
|
+
const searchOptions = this.getNodeParameter('searchOptions', itemIndex, {});
|
|
75
|
+
const embeddingResponse = await GenericFunctions_1.cloudflareApiRequest.call(this, 'POST', `/accounts/${accountId}/ai/run/${embeddingModel}`, { text: [searchQuery] });
|
|
76
|
+
const queryEmbedding = (_a = embeddingResponse.data) === null || _a === void 0 ? void 0 : _a[0];
|
|
77
|
+
if (!queryEmbedding) {
|
|
78
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Failed to generate embedding for search query', { itemIndex });
|
|
79
|
+
}
|
|
80
|
+
const body = {
|
|
81
|
+
vector: queryEmbedding,
|
|
82
|
+
topK: searchOptions.topK || 5,
|
|
83
|
+
returnMetadata: 'all',
|
|
84
|
+
returnValues: false,
|
|
85
|
+
};
|
|
86
|
+
if (searchOptions.filter) {
|
|
87
|
+
try {
|
|
88
|
+
body.filter = JSON.parse(searchOptions.filter);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const queryResponse = await GenericFunctions_1.cloudflareApiRequest.call(this, 'POST', `/accounts/${accountId}/vectorize/v2/indexes/${indexName}/query`, body);
|
|
94
|
+
let matches = (queryResponse.matches || []);
|
|
95
|
+
if (searchOptions.minScore && searchOptions.minScore > 0) {
|
|
96
|
+
matches = matches.filter((match) => match.score >= searchOptions.minScore);
|
|
97
|
+
}
|
|
98
|
+
responseData = {
|
|
99
|
+
query: searchQuery,
|
|
100
|
+
resultCount: matches.length,
|
|
101
|
+
matches: matches.map((match) => {
|
|
102
|
+
var _a;
|
|
103
|
+
return ({
|
|
104
|
+
id: match.id,
|
|
105
|
+
score: match.score,
|
|
106
|
+
text: ((_a = match.metadata) === null || _a === void 0 ? void 0 : _a.text) || '',
|
|
107
|
+
...match.metadata,
|
|
108
|
+
});
|
|
109
|
+
}),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const result = responseData ? [responseData] : [{ success: true }];
|
|
113
|
+
return result.map((item) => ({
|
|
114
|
+
json: item,
|
|
115
|
+
pairedItem: { item: itemIndex },
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
exports.vectorizeRagExecute = vectorizeRagExecute;
|
|
119
|
+
//# sourceMappingURL=VectorizeRagExecute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorizeRagExecute.js","sourceRoot":"","sources":["../../../nodes/CloudflareVectorize/VectorizeRagExecute.ts"],"names":[],"mappings":";;;AAAA,+CAKsB;AACtB,iEAA8F;AAC9F,mCAAoC;AAG7B,KAAK,UAAU,mBAAmB,CAExC,SAAiB;;IAEjB,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAW,CAAC;IAC1E,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAW,CAAC;IAC1E,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAW,CAAC;IAC1E,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,SAAS,CAAW,CAAC;IAEpF,IAAI,YAAqC,CAAC;IAE1C,IAAI,SAAS,KAAK,iBAAiB,EAAE;QACpC,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,SAAS,EAAE,IAAI,CAAY,CAAC;QACvF,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,SAAS,EAAE,IAAI,CAAY,CAAC;QAEjG,IAAI,SAAS,GAA+D,EAAE,CAAC;QAE/E,IAAI,YAAY,EAAE;YAEjB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YA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