@d34dman/flowdrop 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +293 -0
- package/dist/adapters/WorkflowAdapter.d.ts +166 -0
- package/dist/adapters/WorkflowAdapter.js +337 -0
- package/dist/api/client.d.ts +79 -0
- package/dist/api/client.js +208 -0
- package/dist/app.css +0 -0
- package/dist/clients/ApiClient.d.ts +203 -0
- package/dist/clients/ApiClient.js +212 -0
- package/dist/components/App.svelte +237 -0
- package/dist/components/App.svelte.d.ts +3 -0
- package/dist/components/CanvasBanner.svelte +51 -0
- package/dist/components/CanvasBanner.svelte.d.ts +22 -0
- package/dist/components/LoadingSpinner.svelte +36 -0
- package/dist/components/LoadingSpinner.svelte.d.ts +8 -0
- package/dist/components/Node.svelte +38 -0
- package/dist/components/Node.svelte.d.ts +4 -0
- package/dist/components/NodeSidebar.svelte +500 -0
- package/dist/components/NodeSidebar.svelte.d.ts +9 -0
- package/dist/components/WorkflowEditor.svelte +542 -0
- package/dist/components/WorkflowEditor.svelte.d.ts +10 -0
- package/dist/components/WorkflowNode.svelte +558 -0
- package/dist/components/WorkflowNode.svelte.d.ts +11 -0
- package/dist/data/samples.d.ts +17 -0
- package/dist/data/samples.js +1193 -0
- package/dist/examples/adapter-usage.d.ts +66 -0
- package/dist/examples/adapter-usage.js +138 -0
- package/dist/examples/api-client-usage.d.ts +31 -0
- package/dist/examples/api-client-usage.js +241 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +27 -0
- package/dist/services/api.d.ts +110 -0
- package/dist/services/api.js +149 -0
- package/dist/services/workflowStorage.d.ts +37 -0
- package/dist/services/workflowStorage.js +116 -0
- package/dist/styles/base.css +858 -0
- package/dist/svelte-app.d.ts +17 -0
- package/dist/svelte-app.js +30 -0
- package/dist/types/index.d.ts +179 -0
- package/dist/types/index.js +4 -0
- package/dist/utils/colors.d.ts +121 -0
- package/dist/utils/colors.js +240 -0
- package/dist/utils/connections.d.ts +47 -0
- package/dist/utils/connections.js +240 -0
- package/dist/utils/icons.d.ts +102 -0
- package/dist/utils/icons.js +149 -0
- package/package.json +99 -0
|
@@ -0,0 +1,1193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sample data for FlowDrop development and testing
|
|
3
|
+
* Full set matching Langflow's default categories and node types
|
|
4
|
+
*/
|
|
5
|
+
import { v4 as uuidv4 } from "uuid";
|
|
6
|
+
import { CATEGORY_ICONS } from "../utils/icons.js";
|
|
7
|
+
/**
|
|
8
|
+
* Sample node definitions for development
|
|
9
|
+
* Full set matching Langflow's default categories
|
|
10
|
+
*/
|
|
11
|
+
export const sampleNodes = [
|
|
12
|
+
// ===== INPUTS CATEGORY =====
|
|
13
|
+
{
|
|
14
|
+
id: uuidv4(),
|
|
15
|
+
name: "Text Input",
|
|
16
|
+
version: "1.0.0",
|
|
17
|
+
description: "Simple text input for user data",
|
|
18
|
+
category: "inputs",
|
|
19
|
+
icon: "mdi:text",
|
|
20
|
+
color: "#22c55e",
|
|
21
|
+
inputs: [],
|
|
22
|
+
outputs: [
|
|
23
|
+
{
|
|
24
|
+
id: "text",
|
|
25
|
+
name: "Text",
|
|
26
|
+
type: "output",
|
|
27
|
+
dataType: "string",
|
|
28
|
+
description: "The input text value"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
configSchema: {
|
|
32
|
+
placeholder: "Enter text here...",
|
|
33
|
+
defaultValue: "",
|
|
34
|
+
multiline: false
|
|
35
|
+
},
|
|
36
|
+
tags: ["input", "text", "user-input"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: uuidv4(),
|
|
40
|
+
name: "File",
|
|
41
|
+
version: "1.0.0",
|
|
42
|
+
description: "Upload and process files of various formats",
|
|
43
|
+
category: "inputs",
|
|
44
|
+
icon: "mdi:file-upload",
|
|
45
|
+
color: "#ef4444",
|
|
46
|
+
inputs: [],
|
|
47
|
+
outputs: [
|
|
48
|
+
{
|
|
49
|
+
id: "data",
|
|
50
|
+
name: "Data",
|
|
51
|
+
type: "output",
|
|
52
|
+
dataType: "file",
|
|
53
|
+
description: "File content as Data object"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "text",
|
|
57
|
+
name: "Text",
|
|
58
|
+
type: "output",
|
|
59
|
+
dataType: "text",
|
|
60
|
+
description: "File content as text"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
configSchema: {
|
|
64
|
+
allowedTypes: ["txt", "pdf", "docx", "csv", "json"],
|
|
65
|
+
maxSize: 10485760
|
|
66
|
+
},
|
|
67
|
+
tags: ["input", "file", "upload", "document"]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: uuidv4(),
|
|
71
|
+
name: "URL",
|
|
72
|
+
version: "1.0.0",
|
|
73
|
+
description: "Fetch content from URLs",
|
|
74
|
+
category: "inputs",
|
|
75
|
+
icon: "mdi:link",
|
|
76
|
+
color: "#3b82f6",
|
|
77
|
+
inputs: [],
|
|
78
|
+
outputs: [
|
|
79
|
+
{
|
|
80
|
+
id: "data",
|
|
81
|
+
name: "Data",
|
|
82
|
+
type: "output",
|
|
83
|
+
dataType: "text",
|
|
84
|
+
description: "Fetched content as text"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "dataframe",
|
|
88
|
+
name: "DataFrame",
|
|
89
|
+
type: "output",
|
|
90
|
+
dataType: "json",
|
|
91
|
+
description: "Structured data from URL"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
configSchema: {
|
|
95
|
+
urls: [],
|
|
96
|
+
maxDepth: 1,
|
|
97
|
+
format: "text",
|
|
98
|
+
timeout: 30
|
|
99
|
+
},
|
|
100
|
+
tags: ["input", "url", "web", "fetch"]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: uuidv4(),
|
|
104
|
+
name: "API Request",
|
|
105
|
+
version: "1.0.0",
|
|
106
|
+
description: "Make HTTP requests to APIs",
|
|
107
|
+
category: "inputs",
|
|
108
|
+
icon: "mdi:api",
|
|
109
|
+
color: "#8b5cf6",
|
|
110
|
+
inputs: [],
|
|
111
|
+
outputs: [
|
|
112
|
+
{
|
|
113
|
+
id: "data",
|
|
114
|
+
name: "Data",
|
|
115
|
+
type: "output",
|
|
116
|
+
dataType: "json",
|
|
117
|
+
description: "API response data"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: "dataframe",
|
|
121
|
+
name: "DataFrame",
|
|
122
|
+
type: "output",
|
|
123
|
+
dataType: "json",
|
|
124
|
+
description: "Response as structured data"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
configSchema: {
|
|
128
|
+
urls: [],
|
|
129
|
+
method: "GET",
|
|
130
|
+
headers: {},
|
|
131
|
+
body: {},
|
|
132
|
+
timeout: 30
|
|
133
|
+
},
|
|
134
|
+
tags: ["input", "api", "http", "rest"]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: uuidv4(),
|
|
138
|
+
name: "Webhook",
|
|
139
|
+
version: "1.0.0",
|
|
140
|
+
description: "Receive data from external webhooks",
|
|
141
|
+
category: "inputs",
|
|
142
|
+
icon: "mdi:webhook",
|
|
143
|
+
color: "#06b6d4",
|
|
144
|
+
inputs: [],
|
|
145
|
+
outputs: [
|
|
146
|
+
{
|
|
147
|
+
id: "data",
|
|
148
|
+
name: "Data",
|
|
149
|
+
type: "output",
|
|
150
|
+
dataType: "json",
|
|
151
|
+
description: "Webhook payload data"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
configSchema: {
|
|
155
|
+
endpoint: "",
|
|
156
|
+
method: "POST"
|
|
157
|
+
},
|
|
158
|
+
tags: ["input", "webhook", "external"]
|
|
159
|
+
},
|
|
160
|
+
// ===== OUTPUTS CATEGORY =====
|
|
161
|
+
{
|
|
162
|
+
id: uuidv4(),
|
|
163
|
+
name: "Chat Output",
|
|
164
|
+
version: "1.0.0",
|
|
165
|
+
description: "Display chat-style output with formatting",
|
|
166
|
+
category: "outputs",
|
|
167
|
+
icon: "mdi:chat",
|
|
168
|
+
color: "#8b5cf6",
|
|
169
|
+
inputs: [
|
|
170
|
+
{
|
|
171
|
+
id: "message",
|
|
172
|
+
name: "Message",
|
|
173
|
+
type: "input",
|
|
174
|
+
dataType: "text",
|
|
175
|
+
required: true,
|
|
176
|
+
description: "Message to display"
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
outputs: [],
|
|
180
|
+
configSchema: {
|
|
181
|
+
showTimestamp: true,
|
|
182
|
+
maxLength: 2000,
|
|
183
|
+
markdown: true
|
|
184
|
+
},
|
|
185
|
+
tags: ["output", "chat", "display"]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: uuidv4(),
|
|
189
|
+
name: "Text Output",
|
|
190
|
+
version: "1.0.0",
|
|
191
|
+
description: "Display plain text output",
|
|
192
|
+
category: "outputs",
|
|
193
|
+
icon: "mdi:text-box",
|
|
194
|
+
color: "#10b981",
|
|
195
|
+
inputs: [
|
|
196
|
+
{
|
|
197
|
+
id: "text",
|
|
198
|
+
name: "Text",
|
|
199
|
+
type: "input",
|
|
200
|
+
dataType: "text",
|
|
201
|
+
required: true,
|
|
202
|
+
description: "Text to display"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
outputs: [],
|
|
206
|
+
configSchema: {
|
|
207
|
+
showTimestamp: false,
|
|
208
|
+
maxLength: 1000
|
|
209
|
+
},
|
|
210
|
+
tags: ["output", "text", "display"]
|
|
211
|
+
},
|
|
212
|
+
// ===== PROMPTS CATEGORY =====
|
|
213
|
+
{
|
|
214
|
+
id: uuidv4(),
|
|
215
|
+
name: "Prompt",
|
|
216
|
+
version: "1.0.0",
|
|
217
|
+
description: "Template-based prompt with variables",
|
|
218
|
+
category: "prompts",
|
|
219
|
+
icon: "mdi:message-text",
|
|
220
|
+
color: "#f59e0b",
|
|
221
|
+
inputs: [
|
|
222
|
+
{
|
|
223
|
+
id: "variables",
|
|
224
|
+
name: "Variables",
|
|
225
|
+
type: "input",
|
|
226
|
+
dataType: "json",
|
|
227
|
+
required: false,
|
|
228
|
+
description: "Variables to inject into template"
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
outputs: [
|
|
232
|
+
{
|
|
233
|
+
id: "prompt",
|
|
234
|
+
name: "Prompt",
|
|
235
|
+
type: "output",
|
|
236
|
+
dataType: "text",
|
|
237
|
+
description: "Formatted prompt text"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
configSchema: {
|
|
241
|
+
template: "You are a helpful assistant. {input}",
|
|
242
|
+
variables: []
|
|
243
|
+
},
|
|
244
|
+
tags: ["prompt", "template", "variables"]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: uuidv4(),
|
|
248
|
+
name: "Structured Output",
|
|
249
|
+
version: "1.0.0",
|
|
250
|
+
description: "Generate structured output from models",
|
|
251
|
+
category: "prompts",
|
|
252
|
+
icon: "mdi:table",
|
|
253
|
+
color: "#6366f1",
|
|
254
|
+
inputs: [
|
|
255
|
+
{
|
|
256
|
+
id: "model",
|
|
257
|
+
name: "Model",
|
|
258
|
+
type: "input",
|
|
259
|
+
dataType: "json",
|
|
260
|
+
required: true,
|
|
261
|
+
description: "Model to use"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: "message",
|
|
265
|
+
name: "Message",
|
|
266
|
+
type: "input",
|
|
267
|
+
dataType: "text",
|
|
268
|
+
required: true,
|
|
269
|
+
description: "Input message"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
outputs: [
|
|
273
|
+
{
|
|
274
|
+
id: "dataframe",
|
|
275
|
+
name: "DataFrame",
|
|
276
|
+
type: "output",
|
|
277
|
+
dataType: "json",
|
|
278
|
+
description: "Structured output as DataFrame"
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
configSchema: {
|
|
282
|
+
schema: {},
|
|
283
|
+
outputType: "json"
|
|
284
|
+
},
|
|
285
|
+
tags: ["prompt", "structured", "output", "schema"]
|
|
286
|
+
},
|
|
287
|
+
// ===== MODELS CATEGORY =====
|
|
288
|
+
{
|
|
289
|
+
id: uuidv4(),
|
|
290
|
+
name: "OpenAI",
|
|
291
|
+
version: "1.0.0",
|
|
292
|
+
description: "OpenAI GPT models for text generation",
|
|
293
|
+
category: "models",
|
|
294
|
+
icon: "mdi:robot",
|
|
295
|
+
color: "#10a37f",
|
|
296
|
+
inputs: [
|
|
297
|
+
{
|
|
298
|
+
id: "prompt",
|
|
299
|
+
name: "Prompt",
|
|
300
|
+
type: "input",
|
|
301
|
+
dataType: "text",
|
|
302
|
+
required: true,
|
|
303
|
+
description: "Input prompt for the model"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: "system_message",
|
|
307
|
+
name: "System Message",
|
|
308
|
+
type: "input",
|
|
309
|
+
dataType: "text",
|
|
310
|
+
required: false,
|
|
311
|
+
description: "System message to set behavior"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
outputs: [
|
|
315
|
+
{
|
|
316
|
+
id: "response",
|
|
317
|
+
name: "Response",
|
|
318
|
+
type: "output",
|
|
319
|
+
dataType: "text",
|
|
320
|
+
description: "Model response"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
id: "usage",
|
|
324
|
+
name: "Usage",
|
|
325
|
+
type: "output",
|
|
326
|
+
dataType: "json",
|
|
327
|
+
description: "Token usage information"
|
|
328
|
+
}
|
|
329
|
+
],
|
|
330
|
+
configSchema: {
|
|
331
|
+
model: "gpt-3.5-turbo",
|
|
332
|
+
temperature: 0.7,
|
|
333
|
+
maxTokens: 1000,
|
|
334
|
+
apiKey: ""
|
|
335
|
+
},
|
|
336
|
+
tags: ["model", "openai", "gpt", "chat"]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
id: uuidv4(),
|
|
340
|
+
name: "Anthropic",
|
|
341
|
+
version: "1.0.0",
|
|
342
|
+
description: "Anthropic Claude models for text generation",
|
|
343
|
+
category: "models",
|
|
344
|
+
icon: "mdi:brain",
|
|
345
|
+
color: "#7c3aed",
|
|
346
|
+
inputs: [
|
|
347
|
+
{
|
|
348
|
+
id: "prompt",
|
|
349
|
+
name: "Prompt",
|
|
350
|
+
type: "input",
|
|
351
|
+
dataType: "text",
|
|
352
|
+
required: true,
|
|
353
|
+
description: "Input prompt for the model"
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
outputs: [
|
|
357
|
+
{
|
|
358
|
+
id: "response",
|
|
359
|
+
name: "Response",
|
|
360
|
+
type: "output",
|
|
361
|
+
dataType: "text",
|
|
362
|
+
description: "Model response"
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
configSchema: {
|
|
366
|
+
model: "claude-3-sonnet-20240229",
|
|
367
|
+
temperature: 0.7,
|
|
368
|
+
maxTokens: 1000,
|
|
369
|
+
apiKey: ""
|
|
370
|
+
},
|
|
371
|
+
tags: ["model", "anthropic", "claude"]
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
id: uuidv4(),
|
|
375
|
+
name: "Groq",
|
|
376
|
+
version: "1.0.0",
|
|
377
|
+
description: "Groq fast inference models",
|
|
378
|
+
category: "models",
|
|
379
|
+
icon: "mdi:lightning-bolt",
|
|
380
|
+
color: "#f97316",
|
|
381
|
+
inputs: [
|
|
382
|
+
{
|
|
383
|
+
id: "prompt",
|
|
384
|
+
name: "Prompt",
|
|
385
|
+
type: "input",
|
|
386
|
+
dataType: "text",
|
|
387
|
+
required: true,
|
|
388
|
+
description: "Input prompt for the model"
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
outputs: [
|
|
392
|
+
{
|
|
393
|
+
id: "response",
|
|
394
|
+
name: "Response",
|
|
395
|
+
type: "output",
|
|
396
|
+
dataType: "text",
|
|
397
|
+
description: "Model response"
|
|
398
|
+
}
|
|
399
|
+
],
|
|
400
|
+
configSchema: {
|
|
401
|
+
model: "llama-3.1-8b-instant",
|
|
402
|
+
temperature: 0.7,
|
|
403
|
+
maxTokens: 1000,
|
|
404
|
+
apiKey: ""
|
|
405
|
+
},
|
|
406
|
+
tags: ["model", "groq", "fast", "inference"]
|
|
407
|
+
},
|
|
408
|
+
// ===== PROCESSING CATEGORY =====
|
|
409
|
+
{
|
|
410
|
+
id: uuidv4(),
|
|
411
|
+
name: "Split Text",
|
|
412
|
+
version: "1.0.0",
|
|
413
|
+
description: "Split text into chunks for processing",
|
|
414
|
+
category: "processing",
|
|
415
|
+
icon: "mdi:content-cut",
|
|
416
|
+
color: "#f59e0b",
|
|
417
|
+
inputs: [
|
|
418
|
+
{
|
|
419
|
+
id: "text",
|
|
420
|
+
name: "Text",
|
|
421
|
+
type: "input",
|
|
422
|
+
dataType: "text",
|
|
423
|
+
required: true,
|
|
424
|
+
description: "Text to split"
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
outputs: [
|
|
428
|
+
{
|
|
429
|
+
id: "chunks",
|
|
430
|
+
name: "Chunks",
|
|
431
|
+
type: "output",
|
|
432
|
+
dataType: "array",
|
|
433
|
+
description: "Split text chunks"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: "dataframe",
|
|
437
|
+
name: "DataFrame",
|
|
438
|
+
type: "output",
|
|
439
|
+
dataType: "json",
|
|
440
|
+
description: "Chunks as structured data"
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
configSchema: {
|
|
444
|
+
chunkSize: 1000,
|
|
445
|
+
chunkOverlap: 200,
|
|
446
|
+
separator: "\n"
|
|
447
|
+
},
|
|
448
|
+
tags: ["processing", "text", "split", "chunking"]
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
id: uuidv4(),
|
|
452
|
+
name: "Data Operations",
|
|
453
|
+
version: "1.0.0",
|
|
454
|
+
description: "Perform operations on Data objects",
|
|
455
|
+
category: "processing",
|
|
456
|
+
icon: "mdi:database-cog",
|
|
457
|
+
color: "#6366f1",
|
|
458
|
+
inputs: [
|
|
459
|
+
{
|
|
460
|
+
id: "data",
|
|
461
|
+
name: "Data",
|
|
462
|
+
type: "input",
|
|
463
|
+
dataType: "json",
|
|
464
|
+
required: true,
|
|
465
|
+
description: "Data to operate on"
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
outputs: [
|
|
469
|
+
{
|
|
470
|
+
id: "result",
|
|
471
|
+
name: "Result",
|
|
472
|
+
type: "output",
|
|
473
|
+
dataType: "json",
|
|
474
|
+
description: "Processed data result"
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
configSchema: {
|
|
478
|
+
operation: "select_keys",
|
|
479
|
+
keys: [],
|
|
480
|
+
filterKey: "",
|
|
481
|
+
filterValue: ""
|
|
482
|
+
},
|
|
483
|
+
tags: ["processing", "data", "operations"]
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
id: uuidv4(),
|
|
487
|
+
name: "DataFrame Operations",
|
|
488
|
+
version: "1.0.0",
|
|
489
|
+
description: "Perform operations on DataFrames",
|
|
490
|
+
category: "processing",
|
|
491
|
+
icon: "mdi:table-cog",
|
|
492
|
+
color: "#84cc16",
|
|
493
|
+
inputs: [
|
|
494
|
+
{
|
|
495
|
+
id: "dataframe",
|
|
496
|
+
name: "DataFrame",
|
|
497
|
+
type: "input",
|
|
498
|
+
dataType: "json",
|
|
499
|
+
required: true,
|
|
500
|
+
description: "DataFrame to operate on"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
outputs: [
|
|
504
|
+
{
|
|
505
|
+
id: "result",
|
|
506
|
+
name: "Result",
|
|
507
|
+
type: "output",
|
|
508
|
+
dataType: "json",
|
|
509
|
+
description: "Processed DataFrame"
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
configSchema: {
|
|
513
|
+
operation: "filter",
|
|
514
|
+
columnName: "",
|
|
515
|
+
filterValue: "",
|
|
516
|
+
ascending: true
|
|
517
|
+
},
|
|
518
|
+
tags: ["processing", "dataframe", "table", "operations"]
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
id: uuidv4(),
|
|
522
|
+
name: "Regex Extractor",
|
|
523
|
+
version: "1.0.0",
|
|
524
|
+
description: "Extract patterns using regular expressions",
|
|
525
|
+
category: "processing",
|
|
526
|
+
icon: "mdi:regex",
|
|
527
|
+
color: "#ec4899",
|
|
528
|
+
inputs: [
|
|
529
|
+
{
|
|
530
|
+
id: "text",
|
|
531
|
+
name: "Text",
|
|
532
|
+
type: "input",
|
|
533
|
+
dataType: "text",
|
|
534
|
+
required: true,
|
|
535
|
+
description: "Text to extract from"
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
outputs: [
|
|
539
|
+
{
|
|
540
|
+
id: "matches",
|
|
541
|
+
name: "Matches",
|
|
542
|
+
type: "output",
|
|
543
|
+
dataType: "array",
|
|
544
|
+
description: "Extracted matches"
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
configSchema: {
|
|
548
|
+
pattern: "",
|
|
549
|
+
flags: "g"
|
|
550
|
+
},
|
|
551
|
+
tags: ["processing", "regex", "extract", "pattern"]
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
id: uuidv4(),
|
|
555
|
+
name: "Smart Function",
|
|
556
|
+
version: "1.0.0",
|
|
557
|
+
description: "Use models to generate data processing functions",
|
|
558
|
+
category: "processing",
|
|
559
|
+
icon: "mdi:function-variant",
|
|
560
|
+
color: "#06b6d4",
|
|
561
|
+
inputs: [
|
|
562
|
+
{
|
|
563
|
+
id: "data",
|
|
564
|
+
name: "Data",
|
|
565
|
+
type: "input",
|
|
566
|
+
dataType: "json",
|
|
567
|
+
required: true,
|
|
568
|
+
description: "Data to process"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
id: "model",
|
|
572
|
+
name: "Model",
|
|
573
|
+
type: "input",
|
|
574
|
+
dataType: "json",
|
|
575
|
+
required: true,
|
|
576
|
+
description: "Model for function generation"
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
outputs: [
|
|
580
|
+
{
|
|
581
|
+
id: "filtered_data",
|
|
582
|
+
name: "Filtered Data",
|
|
583
|
+
type: "output",
|
|
584
|
+
dataType: "json",
|
|
585
|
+
description: "Processed data"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
id: "dataframe",
|
|
589
|
+
name: "DataFrame",
|
|
590
|
+
type: "output",
|
|
591
|
+
dataType: "json",
|
|
592
|
+
description: "Processed data as DataFrame"
|
|
593
|
+
}
|
|
594
|
+
],
|
|
595
|
+
configSchema: {
|
|
596
|
+
filter_instruction: "",
|
|
597
|
+
sample_size: 1000,
|
|
598
|
+
max_size: 10000
|
|
599
|
+
},
|
|
600
|
+
tags: ["processing", "smart", "function", "model"]
|
|
601
|
+
},
|
|
602
|
+
// ===== LOGIC CATEGORY =====
|
|
603
|
+
{
|
|
604
|
+
id: uuidv4(),
|
|
605
|
+
name: "If-Else",
|
|
606
|
+
version: "1.0.0",
|
|
607
|
+
description: "Conditional routing based on text comparison",
|
|
608
|
+
category: "logic",
|
|
609
|
+
icon: "mdi:git-branch",
|
|
610
|
+
color: "#06b6d4",
|
|
611
|
+
inputs: [
|
|
612
|
+
{
|
|
613
|
+
id: "input_text",
|
|
614
|
+
name: "Input Text",
|
|
615
|
+
type: "input",
|
|
616
|
+
dataType: "text",
|
|
617
|
+
required: true,
|
|
618
|
+
description: "Text to evaluate"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
id: "match_text",
|
|
622
|
+
name: "Match Text",
|
|
623
|
+
type: "input",
|
|
624
|
+
dataType: "text",
|
|
625
|
+
required: true,
|
|
626
|
+
description: "Text to compare against"
|
|
627
|
+
}
|
|
628
|
+
],
|
|
629
|
+
outputs: [
|
|
630
|
+
{
|
|
631
|
+
id: "true_result",
|
|
632
|
+
name: "True",
|
|
633
|
+
type: "output",
|
|
634
|
+
dataType: "text",
|
|
635
|
+
description: "Output when condition is true"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
id: "false_result",
|
|
639
|
+
name: "False",
|
|
640
|
+
type: "output",
|
|
641
|
+
dataType: "text",
|
|
642
|
+
description: "Output when condition is false"
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
configSchema: {
|
|
646
|
+
operator: "equals",
|
|
647
|
+
caseSensitive: false
|
|
648
|
+
},
|
|
649
|
+
tags: ["conditional", "logic", "routing", "if-else"]
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
id: uuidv4(),
|
|
653
|
+
name: "Loop",
|
|
654
|
+
version: "1.0.0",
|
|
655
|
+
description: "Iterate over data items",
|
|
656
|
+
category: "logic",
|
|
657
|
+
icon: "mdi:loop",
|
|
658
|
+
color: "#8b5cf6",
|
|
659
|
+
inputs: [
|
|
660
|
+
{
|
|
661
|
+
id: "data",
|
|
662
|
+
name: "Data",
|
|
663
|
+
type: "input",
|
|
664
|
+
dataType: "array",
|
|
665
|
+
required: true,
|
|
666
|
+
description: "Data to iterate over"
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
outputs: [
|
|
670
|
+
{
|
|
671
|
+
id: "item",
|
|
672
|
+
name: "Item",
|
|
673
|
+
type: "output",
|
|
674
|
+
dataType: "json",
|
|
675
|
+
description: "Current item in iteration"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
id: "done",
|
|
679
|
+
name: "Done",
|
|
680
|
+
type: "output",
|
|
681
|
+
dataType: "json",
|
|
682
|
+
description: "Aggregated results when complete"
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
configSchema: {
|
|
686
|
+
maxIterations: 100
|
|
687
|
+
},
|
|
688
|
+
tags: ["conditional", "logic", "loop", "iteration"]
|
|
689
|
+
},
|
|
690
|
+
// ===== DATA CATEGORY =====
|
|
691
|
+
{
|
|
692
|
+
id: uuidv4(),
|
|
693
|
+
name: "Data to DataFrame",
|
|
694
|
+
version: "1.0.0",
|
|
695
|
+
description: "Convert Data objects to DataFrame",
|
|
696
|
+
category: "data",
|
|
697
|
+
icon: "mdi:table-plus",
|
|
698
|
+
color: "#10b981",
|
|
699
|
+
inputs: [
|
|
700
|
+
{
|
|
701
|
+
id: "data_list",
|
|
702
|
+
name: "Data List",
|
|
703
|
+
type: "input",
|
|
704
|
+
dataType: "array",
|
|
705
|
+
required: true,
|
|
706
|
+
description: "List of Data objects to convert"
|
|
707
|
+
}
|
|
708
|
+
],
|
|
709
|
+
outputs: [
|
|
710
|
+
{
|
|
711
|
+
id: "dataframe",
|
|
712
|
+
name: "DataFrame",
|
|
713
|
+
type: "output",
|
|
714
|
+
dataType: "json",
|
|
715
|
+
description: "Converted DataFrame"
|
|
716
|
+
}
|
|
717
|
+
],
|
|
718
|
+
configSchema: {
|
|
719
|
+
includeText: true
|
|
720
|
+
},
|
|
721
|
+
tags: ["data", "dataframe", "convert", "table"]
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
id: uuidv4(),
|
|
725
|
+
name: "Message to Data",
|
|
726
|
+
version: "1.0.0",
|
|
727
|
+
description: "Convert Message objects to Data objects",
|
|
728
|
+
category: "data",
|
|
729
|
+
icon: "mdi:message-arrow-right",
|
|
730
|
+
color: "#f59e0b",
|
|
731
|
+
inputs: [
|
|
732
|
+
{
|
|
733
|
+
id: "message",
|
|
734
|
+
name: "Message",
|
|
735
|
+
type: "input",
|
|
736
|
+
dataType: "text",
|
|
737
|
+
required: true,
|
|
738
|
+
description: "Message to convert"
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
outputs: [
|
|
742
|
+
{
|
|
743
|
+
id: "data",
|
|
744
|
+
name: "Data",
|
|
745
|
+
type: "output",
|
|
746
|
+
dataType: "json",
|
|
747
|
+
description: "Converted Data object"
|
|
748
|
+
}
|
|
749
|
+
],
|
|
750
|
+
configSchema: {},
|
|
751
|
+
tags: ["data", "message", "convert"]
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
id: uuidv4(),
|
|
755
|
+
name: "Save to File",
|
|
756
|
+
version: "1.0.0",
|
|
757
|
+
description: "Save data to various file formats",
|
|
758
|
+
category: "data",
|
|
759
|
+
icon: "mdi:content-save",
|
|
760
|
+
color: "#ef4444",
|
|
761
|
+
inputs: [
|
|
762
|
+
{
|
|
763
|
+
id: "data",
|
|
764
|
+
name: "Data",
|
|
765
|
+
type: "input",
|
|
766
|
+
dataType: "json",
|
|
767
|
+
required: true,
|
|
768
|
+
description: "Data to save"
|
|
769
|
+
}
|
|
770
|
+
],
|
|
771
|
+
outputs: [
|
|
772
|
+
{
|
|
773
|
+
id: "confirmation",
|
|
774
|
+
name: "Confirmation",
|
|
775
|
+
type: "output",
|
|
776
|
+
dataType: "text",
|
|
777
|
+
description: "Save confirmation message"
|
|
778
|
+
}
|
|
779
|
+
],
|
|
780
|
+
configSchema: {
|
|
781
|
+
fileFormat: "json",
|
|
782
|
+
filePath: "./output/data.json"
|
|
783
|
+
},
|
|
784
|
+
tags: ["data", "save", "file", "export"]
|
|
785
|
+
},
|
|
786
|
+
// ===== TOOLS CATEGORY =====
|
|
787
|
+
{
|
|
788
|
+
id: uuidv4(),
|
|
789
|
+
name: "Calculator",
|
|
790
|
+
version: "1.0.0",
|
|
791
|
+
description: "Perform mathematical calculations",
|
|
792
|
+
category: "tools",
|
|
793
|
+
icon: "mdi:calculator",
|
|
794
|
+
color: "#6366f1",
|
|
795
|
+
inputs: [
|
|
796
|
+
{
|
|
797
|
+
id: "expression",
|
|
798
|
+
name: "Expression",
|
|
799
|
+
type: "input",
|
|
800
|
+
dataType: "text",
|
|
801
|
+
required: true,
|
|
802
|
+
description: "Mathematical expression to evaluate"
|
|
803
|
+
}
|
|
804
|
+
],
|
|
805
|
+
outputs: [
|
|
806
|
+
{
|
|
807
|
+
id: "result",
|
|
808
|
+
name: "Result",
|
|
809
|
+
type: "output",
|
|
810
|
+
dataType: "number",
|
|
811
|
+
description: "Calculation result"
|
|
812
|
+
}
|
|
813
|
+
],
|
|
814
|
+
configSchema: {
|
|
815
|
+
precision: 2
|
|
816
|
+
},
|
|
817
|
+
tags: ["tools", "calculator", "math", "compute"]
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
id: uuidv4(),
|
|
821
|
+
name: "Date & Time",
|
|
822
|
+
version: "1.0.0",
|
|
823
|
+
description: "Handle date and time operations",
|
|
824
|
+
category: "tools",
|
|
825
|
+
icon: "mdi:calendar-clock",
|
|
826
|
+
color: "#84cc16",
|
|
827
|
+
inputs: [
|
|
828
|
+
{
|
|
829
|
+
id: "date",
|
|
830
|
+
name: "Date",
|
|
831
|
+
type: "input",
|
|
832
|
+
dataType: "text",
|
|
833
|
+
required: false,
|
|
834
|
+
description: "Input date string"
|
|
835
|
+
}
|
|
836
|
+
],
|
|
837
|
+
outputs: [
|
|
838
|
+
{
|
|
839
|
+
id: "formatted_date",
|
|
840
|
+
name: "Formatted Date",
|
|
841
|
+
type: "output",
|
|
842
|
+
dataType: "text",
|
|
843
|
+
description: "Formatted date string"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
id: "timestamp",
|
|
847
|
+
name: "Timestamp",
|
|
848
|
+
type: "output",
|
|
849
|
+
dataType: "number",
|
|
850
|
+
description: "Unix timestamp"
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
configSchema: {
|
|
854
|
+
format: "YYYY-MM-DD",
|
|
855
|
+
timezone: "UTC"
|
|
856
|
+
},
|
|
857
|
+
tags: ["tools", "date", "time", "format"]
|
|
858
|
+
},
|
|
859
|
+
// ===== EMBEDDINGS CATEGORY =====
|
|
860
|
+
{
|
|
861
|
+
id: uuidv4(),
|
|
862
|
+
name: "OpenAI Embeddings",
|
|
863
|
+
version: "1.0.0",
|
|
864
|
+
description: "Generate embeddings using OpenAI models",
|
|
865
|
+
category: "embeddings",
|
|
866
|
+
icon: "mdi:vector-point",
|
|
867
|
+
color: "#10a37f",
|
|
868
|
+
inputs: [
|
|
869
|
+
{
|
|
870
|
+
id: "text",
|
|
871
|
+
name: "Text",
|
|
872
|
+
type: "input",
|
|
873
|
+
dataType: "text",
|
|
874
|
+
required: true,
|
|
875
|
+
description: "Text to embed"
|
|
876
|
+
}
|
|
877
|
+
],
|
|
878
|
+
outputs: [
|
|
879
|
+
{
|
|
880
|
+
id: "embeddings",
|
|
881
|
+
name: "Embeddings",
|
|
882
|
+
type: "output",
|
|
883
|
+
dataType: "array",
|
|
884
|
+
description: "Generated embeddings"
|
|
885
|
+
}
|
|
886
|
+
],
|
|
887
|
+
configSchema: {
|
|
888
|
+
model: "text-embedding-3-small",
|
|
889
|
+
apiKey: ""
|
|
890
|
+
},
|
|
891
|
+
tags: ["embeddings", "openai", "vector"]
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
id: uuidv4(),
|
|
895
|
+
name: "HuggingFace Embeddings",
|
|
896
|
+
version: "1.0.0",
|
|
897
|
+
description: "Generate embeddings using HuggingFace models",
|
|
898
|
+
category: "embeddings",
|
|
899
|
+
icon: "mdi:vector-square",
|
|
900
|
+
color: "#f59e0b",
|
|
901
|
+
inputs: [
|
|
902
|
+
{
|
|
903
|
+
id: "text",
|
|
904
|
+
name: "Text",
|
|
905
|
+
type: "input",
|
|
906
|
+
dataType: "text",
|
|
907
|
+
required: true,
|
|
908
|
+
description: "Text to embed"
|
|
909
|
+
}
|
|
910
|
+
],
|
|
911
|
+
outputs: [
|
|
912
|
+
{
|
|
913
|
+
id: "embeddings",
|
|
914
|
+
name: "Embeddings",
|
|
915
|
+
type: "output",
|
|
916
|
+
dataType: "array",
|
|
917
|
+
description: "Generated embeddings"
|
|
918
|
+
}
|
|
919
|
+
],
|
|
920
|
+
configSchema: {
|
|
921
|
+
model: "sentence-transformers/all-MiniLM-L6-v2",
|
|
922
|
+
apiToken: ""
|
|
923
|
+
},
|
|
924
|
+
tags: ["embeddings", "huggingface", "vector"]
|
|
925
|
+
},
|
|
926
|
+
// ===== MEMORIES CATEGORY =====
|
|
927
|
+
{
|
|
928
|
+
id: uuidv4(),
|
|
929
|
+
name: "Conversation Buffer",
|
|
930
|
+
version: "1.0.0",
|
|
931
|
+
description: "Store conversation history",
|
|
932
|
+
category: "memories",
|
|
933
|
+
icon: "mdi:chat-history",
|
|
934
|
+
color: "#8b5cf6",
|
|
935
|
+
inputs: [
|
|
936
|
+
{
|
|
937
|
+
id: "message",
|
|
938
|
+
name: "Message",
|
|
939
|
+
type: "input",
|
|
940
|
+
dataType: "text",
|
|
941
|
+
required: true,
|
|
942
|
+
description: "Message to add to buffer"
|
|
943
|
+
}
|
|
944
|
+
],
|
|
945
|
+
outputs: [
|
|
946
|
+
{
|
|
947
|
+
id: "history",
|
|
948
|
+
name: "History",
|
|
949
|
+
type: "output",
|
|
950
|
+
dataType: "array",
|
|
951
|
+
description: "Conversation history"
|
|
952
|
+
}
|
|
953
|
+
],
|
|
954
|
+
configSchema: {
|
|
955
|
+
maxTokens: 2000,
|
|
956
|
+
returnMessages: true
|
|
957
|
+
},
|
|
958
|
+
tags: ["memory", "conversation", "history", "buffer"]
|
|
959
|
+
},
|
|
960
|
+
// ===== AGENTS CATEGORY =====
|
|
961
|
+
{
|
|
962
|
+
id: uuidv4(),
|
|
963
|
+
name: "Simple Agent",
|
|
964
|
+
version: "1.0.0",
|
|
965
|
+
description: "Agent for tool orchestration",
|
|
966
|
+
category: "agents",
|
|
967
|
+
icon: "mdi:account-cog",
|
|
968
|
+
color: "#06b6d4",
|
|
969
|
+
inputs: [
|
|
970
|
+
{
|
|
971
|
+
id: "message",
|
|
972
|
+
name: "Message",
|
|
973
|
+
type: "input",
|
|
974
|
+
dataType: "text",
|
|
975
|
+
required: true,
|
|
976
|
+
description: "User message for agent"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
id: "tools",
|
|
980
|
+
name: "Tools",
|
|
981
|
+
type: "input",
|
|
982
|
+
dataType: "array",
|
|
983
|
+
required: false,
|
|
984
|
+
description: "Tools available to agent"
|
|
985
|
+
}
|
|
986
|
+
],
|
|
987
|
+
outputs: [
|
|
988
|
+
{
|
|
989
|
+
id: "response",
|
|
990
|
+
name: "Response",
|
|
991
|
+
type: "output",
|
|
992
|
+
dataType: "text",
|
|
993
|
+
description: "Agent response"
|
|
994
|
+
}
|
|
995
|
+
],
|
|
996
|
+
configSchema: {
|
|
997
|
+
model: "gpt-3.5-turbo",
|
|
998
|
+
temperature: 0.7,
|
|
999
|
+
maxIterations: 5
|
|
1000
|
+
},
|
|
1001
|
+
tags: ["agent", "orchestration", "tools"]
|
|
1002
|
+
},
|
|
1003
|
+
// ===== VECTOR STORES CATEGORY =====
|
|
1004
|
+
{
|
|
1005
|
+
id: uuidv4(),
|
|
1006
|
+
name: "Chroma Vector Store",
|
|
1007
|
+
version: "1.0.0",
|
|
1008
|
+
description: "Store and retrieve vectors using Chroma",
|
|
1009
|
+
category: "vector stores",
|
|
1010
|
+
icon: "mdi:database",
|
|
1011
|
+
color: "#84cc16",
|
|
1012
|
+
inputs: [
|
|
1013
|
+
{
|
|
1014
|
+
id: "embeddings",
|
|
1015
|
+
name: "Embeddings",
|
|
1016
|
+
type: "input",
|
|
1017
|
+
dataType: "array",
|
|
1018
|
+
required: true,
|
|
1019
|
+
description: "Embeddings to store"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
id: "query",
|
|
1023
|
+
name: "Query",
|
|
1024
|
+
type: "input",
|
|
1025
|
+
dataType: "text",
|
|
1026
|
+
required: false,
|
|
1027
|
+
description: "Query for similarity search"
|
|
1028
|
+
}
|
|
1029
|
+
],
|
|
1030
|
+
outputs: [
|
|
1031
|
+
{
|
|
1032
|
+
id: "results",
|
|
1033
|
+
name: "Results",
|
|
1034
|
+
type: "output",
|
|
1035
|
+
dataType: "array",
|
|
1036
|
+
description: "Search results"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
id: "metadata",
|
|
1040
|
+
name: "Metadata",
|
|
1041
|
+
type: "output",
|
|
1042
|
+
dataType: "json",
|
|
1043
|
+
description: "Vector store metadata"
|
|
1044
|
+
}
|
|
1045
|
+
],
|
|
1046
|
+
configSchema: {
|
|
1047
|
+
collectionName: "default",
|
|
1048
|
+
persistDirectory: "./chroma_db",
|
|
1049
|
+
distanceFunction: "cosine"
|
|
1050
|
+
},
|
|
1051
|
+
tags: ["integration", "vector-store", "chroma", "embeddings"]
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
id: uuidv4(),
|
|
1055
|
+
name: "Pinecone Vector Store",
|
|
1056
|
+
version: "1.0.0",
|
|
1057
|
+
description: "Store and retrieve vectors using Pinecone",
|
|
1058
|
+
category: "vector stores",
|
|
1059
|
+
icon: "mdi:database-search",
|
|
1060
|
+
color: "#f59e0b",
|
|
1061
|
+
inputs: [
|
|
1062
|
+
{
|
|
1063
|
+
id: "embeddings",
|
|
1064
|
+
name: "Embeddings",
|
|
1065
|
+
type: "input",
|
|
1066
|
+
dataType: "array",
|
|
1067
|
+
required: true,
|
|
1068
|
+
description: "Embeddings to store"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
id: "query",
|
|
1072
|
+
name: "Query",
|
|
1073
|
+
type: "input",
|
|
1074
|
+
dataType: "text",
|
|
1075
|
+
required: false,
|
|
1076
|
+
description: "Query for similarity search"
|
|
1077
|
+
}
|
|
1078
|
+
],
|
|
1079
|
+
outputs: [
|
|
1080
|
+
{
|
|
1081
|
+
id: "results",
|
|
1082
|
+
name: "Results",
|
|
1083
|
+
type: "output",
|
|
1084
|
+
dataType: "array",
|
|
1085
|
+
description: "Search results"
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
configSchema: {
|
|
1089
|
+
indexName: "default",
|
|
1090
|
+
apiKey: "",
|
|
1091
|
+
environment: "us-west1-gcp"
|
|
1092
|
+
},
|
|
1093
|
+
tags: ["integration", "vector-store", "pinecone", "embeddings"]
|
|
1094
|
+
}
|
|
1095
|
+
];
|
|
1096
|
+
// Export category icons for use in other components
|
|
1097
|
+
export { CATEGORY_ICONS as categoryIcons };
|
|
1098
|
+
/**
|
|
1099
|
+
* Sample workflow for development
|
|
1100
|
+
* Updated to use the new node types
|
|
1101
|
+
*/
|
|
1102
|
+
export const sampleWorkflow = {
|
|
1103
|
+
id: uuidv4(),
|
|
1104
|
+
name: "Simple Chat Workflow",
|
|
1105
|
+
description: "A basic workflow demonstrating text input, processing, and model response",
|
|
1106
|
+
nodes: [
|
|
1107
|
+
{
|
|
1108
|
+
id: uuidv4(),
|
|
1109
|
+
type: "text-input",
|
|
1110
|
+
position: { x: 100, y: 100 },
|
|
1111
|
+
data: {
|
|
1112
|
+
label: "Text Input",
|
|
1113
|
+
config: {
|
|
1114
|
+
placeholder: "Enter your question...",
|
|
1115
|
+
defaultValue: "Hello, how are you?"
|
|
1116
|
+
},
|
|
1117
|
+
metadata: sampleNodes.find(n => n.name === "Text Input")
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
id: uuidv4(),
|
|
1122
|
+
type: "split-text",
|
|
1123
|
+
position: { x: 300, y: 100 },
|
|
1124
|
+
data: {
|
|
1125
|
+
label: "Split Text",
|
|
1126
|
+
config: {
|
|
1127
|
+
chunkSize: 500,
|
|
1128
|
+
chunkOverlap: 100,
|
|
1129
|
+
separator: "\n"
|
|
1130
|
+
},
|
|
1131
|
+
metadata: sampleNodes.find(n => n.name === "Split Text")
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
id: uuidv4(),
|
|
1136
|
+
type: "openai",
|
|
1137
|
+
position: { x: 500, y: 100 },
|
|
1138
|
+
data: {
|
|
1139
|
+
label: "OpenAI",
|
|
1140
|
+
config: {
|
|
1141
|
+
model: "gpt-3.5-turbo",
|
|
1142
|
+
temperature: 0.7,
|
|
1143
|
+
maxTokens: 1000
|
|
1144
|
+
},
|
|
1145
|
+
metadata: sampleNodes.find(n => n.name === "OpenAI")
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
id: uuidv4(),
|
|
1150
|
+
type: "chat-output",
|
|
1151
|
+
position: { x: 700, y: 100 },
|
|
1152
|
+
data: {
|
|
1153
|
+
label: "Chat Output",
|
|
1154
|
+
config: {
|
|
1155
|
+
showTimestamp: true,
|
|
1156
|
+
maxLength: 2000,
|
|
1157
|
+
markdown: true
|
|
1158
|
+
},
|
|
1159
|
+
metadata: sampleNodes.find(n => n.name === "Chat Output")
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
],
|
|
1163
|
+
edges: [
|
|
1164
|
+
{
|
|
1165
|
+
id: uuidv4(),
|
|
1166
|
+
source: "text-input-1",
|
|
1167
|
+
target: "split-text-1",
|
|
1168
|
+
sourceHandle: "text",
|
|
1169
|
+
targetHandle: "text"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
id: uuidv4(),
|
|
1173
|
+
source: "split-text-1",
|
|
1174
|
+
target: "openai-1",
|
|
1175
|
+
sourceHandle: "chunks",
|
|
1176
|
+
targetHandle: "prompt"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
id: uuidv4(),
|
|
1180
|
+
source: "openai-1",
|
|
1181
|
+
target: "chat-output-1",
|
|
1182
|
+
sourceHandle: "response",
|
|
1183
|
+
targetHandle: "message"
|
|
1184
|
+
}
|
|
1185
|
+
],
|
|
1186
|
+
metadata: {
|
|
1187
|
+
version: "1.0.0",
|
|
1188
|
+
createdAt: new Date().toISOString(),
|
|
1189
|
+
updatedAt: new Date().toISOString(),
|
|
1190
|
+
author: "FlowDrop",
|
|
1191
|
+
tags: ["sample", "chat", "demo", "langflow-style"]
|
|
1192
|
+
}
|
|
1193
|
+
};
|