darabos commited on
Commit
d68c34d
·
1 Parent(s): a083285

Do not zero out positions in the JSON.

Browse files
lynxkite-app/data/LynxScribe demo CHANGED
@@ -11,36 +11,37 @@
11
  },
12
  "display": null,
13
  "error": null,
14
- "collapsed": null,
15
- "__execution_delay": 0.0,
16
  "meta": {
17
- "type": "basic",
18
  "outputs": {
19
  "output": {
20
  "name": "output",
21
- "position": "right",
22
  "type": {
23
  "type": "None"
24
- }
 
25
  }
26
  },
 
 
27
  "params": {
28
  "chat": {
 
29
  "default": null,
30
  "type": {
31
  "type": "<class 'str'>"
32
- },
33
- "name": "chat"
34
  }
35
  },
36
- "inputs": {},
37
- "name": "Input chat"
38
  }
39
  },
40
  "position": {
41
- "x": 0.0,
42
- "y": 0.0
43
- }
 
 
 
44
  },
45
  {
46
  "id": "View 1",
@@ -48,28 +49,44 @@
48
  "data": {
49
  "title": "View",
50
  "params": {},
51
- "display": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  "error": null,
53
  "meta": {
 
 
 
54
  "name": "View",
55
  "inputs": {
56
  "input": {
57
  "position": "left",
58
- "name": "input",
59
  "type": {
60
  "type": "<class 'inspect._empty'>"
61
- }
 
62
  }
63
- },
64
- "params": {},
65
- "outputs": {},
66
- "type": "table_view"
67
  }
68
  },
69
  "position": {
70
- "x": 0.0,
71
- "y": 0.0
72
- }
 
 
 
73
  },
74
  {
75
  "id": "LLM 1",
@@ -81,36 +98,37 @@
81
  },
82
  "display": null,
83
  "error": null,
84
- "collapsed": null,
85
  "meta": {
86
  "name": "LLM",
87
  "inputs": {},
88
- "type": "basic",
89
  "params": {
90
  "name": {
91
- "default": "openai",
92
  "type": {
93
  "type": "<class 'str'>"
94
  },
95
- "name": "name"
96
  }
97
  },
98
  "outputs": {
99
  "output": {
100
- "name": "output",
101
  "type": {
102
  "type": "None"
103
  },
104
- "position": "top"
105
  }
106
- }
107
- },
108
- "__execution_delay": 0.0
109
  },
110
  "position": {
111
- "x": 0.0,
112
- "y": 0.0
113
- }
 
 
 
114
  },
115
  {
116
  "id": "Scenario selector 1",
@@ -123,43 +141,44 @@
123
  },
124
  "display": null,
125
  "error": null,
126
- "__execution_delay": 0.0,
127
  "meta": {
128
- "outputs": {
129
- "output": {
130
- "position": "top",
131
- "name": "output",
132
- "type": {
133
- "type": "None"
134
- }
135
- }
136
- },
137
- "inputs": {},
138
  "name": "Scenario selector",
 
139
  "params": {
 
 
 
 
 
 
 
140
  "node_types": {
141
  "name": "node_types",
142
  "default": "intent_cluster",
143
  "type": {
144
  "type": "<class 'str'>"
145
  }
146
- },
147
- "scenario_file": {
 
 
 
148
  "type": {
149
- "type": "<class 'str'>"
150
  },
151
- "default": null,
152
- "name": "scenario_file"
153
  }
154
- },
155
- "type": "basic"
156
- },
157
- "collapsed": null
158
  },
159
  "position": {
160
- "x": 0.0,
161
- "y": 0.0
162
- }
 
 
 
163
  },
164
  {
165
  "id": "Chat API 1",
@@ -172,57 +191,58 @@
172
  "display": null,
173
  "error": null,
174
  "meta": {
 
175
  "inputs": {
176
- "chat_processor": {
177
  "position": "bottom",
 
178
  "type": {
179
  "type": "<class 'inspect._empty'>"
180
- },
181
- "name": "chat_processor"
182
  },
183
  "knowledge_base": {
184
- "name": "knowledge_base",
185
- "position": "bottom",
186
  "type": {
187
  "type": "<class 'inspect._empty'>"
188
- }
 
 
189
  },
190
- "chatbot": {
191
- "name": "chatbot",
 
192
  "type": {
193
  "type": "<class 'inspect._empty'>"
194
- },
195
- "position": "bottom"
196
  }
197
  },
198
  "type": "basic",
199
- "name": "Chat API",
200
  "params": {
201
  "model": {
202
- "default": "gpt-4o-mini",
203
  "type": {
204
  "type": "<class 'str'>"
205
  },
 
206
  "name": "model"
207
  }
208
  },
209
  "outputs": {
210
  "output": {
211
- "name": "output",
212
  "position": "top",
213
  "type": {
214
  "type": "None"
215
- }
 
216
  }
217
  }
218
- },
219
- "__execution_delay": 0.0,
220
- "collapsed": null
221
  },
222
  "position": {
223
- "x": 0.0,
224
- "y": 0.0
225
- }
 
 
 
226
  },
227
  {
228
  "id": "Knowledge base 1",
@@ -230,37 +250,37 @@
230
  "data": {
231
  "title": "Knowledge base",
232
  "params": {
 
233
  "template_cluster_path": "/home/darabos/nvme/lynxscribe/examples/chat_api/data/lynx/tempclusters.pickle",
234
- "edges_path": "/home/darabos/nvme/lynxscribe/examples/chat_api/data/lynx/edges.pickle",
235
- "nodes_path": "/home/darabos/nvme/lynxscribe/examples/chat_api/data/lynx/nodes.pickle"
236
  },
237
  "display": null,
238
  "error": null,
239
  "meta": {
240
  "params": {
241
- "template_cluster_path": {
242
- "name": "template_cluster_path",
243
- "default": "tempclusters.pickle",
244
  "type": {
245
  "type": "<class 'str'>"
246
  }
247
  },
248
- "edges_path": {
249
- "default": "edges.pickle",
250
- "name": "edges_path",
251
  "type": {
252
  "type": "<class 'str'>"
253
  }
254
  },
255
  "nodes_path": {
256
- "default": "nodes.pickle",
257
  "name": "nodes_path",
 
258
  "type": {
259
  "type": "<class 'str'>"
260
  }
261
  }
262
  },
263
- "type": "basic",
264
  "outputs": {
265
  "output": {
266
  "type": {
@@ -270,14 +290,17 @@
270
  "name": "output"
271
  }
272
  },
273
- "name": "Knowledge base",
274
- "inputs": {}
275
  }
276
  },
277
  "position": {
278
- "x": 0.0,
279
- "y": 0.0
280
- }
 
 
 
281
  },
282
  {
283
  "id": "RAG chatbot 1",
@@ -285,85 +308,88 @@
285
  "data": {
286
  "title": "RAG chatbot",
287
  "params": {
288
- "limits_by_type": "{\"information\": [2, 3], \"summary\": [2, 3]}",
289
  "negative_answer": "I'm sorry, but the data I've been trained on does not contain any information related to your question.",
290
  "max_results": "5",
 
291
  "strict_limits": true
292
  },
293
  "display": null,
294
  "error": null,
295
  "meta": {
296
- "params": {
297
- "limits_by_type": {
298
- "name": "limits_by_type",
299
- "default": "{}",
300
- "type": {
301
- "type": "<class 'str'>"
302
- }
303
- },
304
- "max_results": {
305
- "default": 5.0,
306
- "name": "max_results",
307
- "type": {
308
- "type": "<class 'int'>"
309
- }
310
- },
311
- "strict_limits": {
312
- "type": {
313
- "type": "<class 'bool'>"
314
- },
315
- "default": true,
316
- "name": "strict_limits"
317
- },
318
- "negative_answer": {
319
- "type": {
320
- "type": "<class 'str'>"
321
- },
322
- "name": "negative_answer",
323
- "default": "I'm sorry, but the data I've been trained on does not contain any information related to your question."
324
- }
325
- },
326
- "name": "RAG chatbot",
327
- "type": "basic",
328
  "outputs": {
329
  "output": {
 
330
  "type": {
331
  "type": "None"
332
  },
333
- "position": "top",
334
  "name": "output"
335
  }
336
  },
337
  "inputs": {
338
- "rag_graph": {
 
 
 
339
  "position": "bottom",
 
 
 
340
  "name": "rag_graph",
 
341
  "type": {
342
  "type": "<class 'inspect._empty'>"
343
  }
344
  },
345
  "scenario_selector": {
346
  "position": "bottom",
347
- "name": "scenario_selector",
348
  "type": {
349
  "type": "<class 'inspect._empty'>"
350
- }
 
 
 
 
 
 
 
 
 
 
351
  },
352
- "llm": {
353
  "type": {
354
- "type": "<class 'inspect._empty'>"
355
  },
356
- "position": "bottom",
357
- "name": "llm"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  }
359
- }
 
 
360
  },
361
  "beingResized": false
362
  },
363
  "position": {
364
- "x": 0.0,
365
- "y": 0.0
366
- }
 
 
 
367
  },
368
  {
369
  "id": "RAG graph 1",
@@ -373,43 +399,44 @@
373
  "params": {},
374
  "display": null,
375
  "error": null,
376
- "collapsed": true,
377
  "meta": {
378
  "name": "RAG graph",
379
  "params": {},
 
380
  "outputs": {
381
  "output": {
 
 
382
  "type": {
383
  "type": "None"
384
- },
385
- "position": "top",
386
- "name": "output"
387
  }
388
  },
389
- "type": "basic",
390
  "inputs": {
391
- "vector_store": {
392
- "name": "vector_store",
 
393
  "type": {
394
  "type": "<class 'inspect._empty'>"
395
- },
396
- "position": "bottom"
397
  },
398
- "text_embedder": {
 
399
  "position": "bottom",
400
  "type": {
401
  "type": "<class 'inspect._empty'>"
402
- },
403
- "name": "text_embedder"
404
  }
405
  }
406
- },
407
- "__execution_delay": null
408
  },
409
  "position": {
410
- "x": 0.0,
411
- "y": 0.0
412
- }
 
 
 
413
  },
414
  {
415
  "id": "Vector store 1",
@@ -417,47 +444,50 @@
417
  "data": {
418
  "title": "Vector store",
419
  "params": {
420
- "collection_name": "lynx",
421
- "name": "chromadb"
422
  },
423
  "display": null,
424
  "error": null,
425
  "meta": {
426
  "name": "Vector store",
427
- "type": "basic",
428
- "inputs": {},
429
  "params": {
430
- "collection_name": {
431
- "type": {
432
- "type": "<class 'str'>"
433
- },
434
- "default": "lynx",
435
- "name": "collection_name"
436
- },
437
  "name": {
438
  "name": "name",
439
  "default": "chromadb",
440
  "type": {
441
  "type": "<class 'str'>"
442
  }
 
 
 
 
 
 
 
443
  }
444
  },
 
445
  "outputs": {
446
  "output": {
447
- "position": "top",
448
  "name": "output",
449
  "type": {
450
  "type": "None"
451
- }
 
452
  }
453
- }
 
454
  },
455
  "beingResized": false
456
  },
457
  "position": {
458
- "x": 0.0,
459
- "y": 0.0
460
- }
 
 
 
461
  },
462
  {
463
  "id": "Text embedder 2",
@@ -469,44 +499,45 @@
469
  },
470
  "display": null,
471
  "error": null,
472
- "collapsed": null,
473
- "__execution_delay": 0.0,
474
  "meta": {
475
- "outputs": {
476
- "output": {
477
- "position": "top",
478
- "type": {
479
- "type": "None"
480
- },
481
- "name": "output"
482
- }
483
- },
484
  "name": "Text embedder",
485
  "params": {
486
  "model": {
487
- "name": "model",
488
  "default": "text-embedding-ada-002",
489
  "type": {
490
  "type": "<class 'str'>"
491
- }
 
 
 
 
 
 
 
 
 
 
492
  }
493
  },
 
494
  "inputs": {
495
  "llm": {
496
- "position": "bottom",
497
  "name": "llm",
498
  "type": {
499
  "type": "<class 'inspect._empty'>"
500
- }
 
501
  }
502
- },
503
- "type": "basic"
504
  }
505
  },
506
  "position": {
507
- "x": 0.0,
508
- "y": 0.0
509
- }
 
 
 
510
  },
511
  {
512
  "id": "LLM 2",
@@ -519,33 +550,36 @@
519
  "display": null,
520
  "error": null,
521
  "meta": {
522
- "inputs": {},
523
- "params": {
524
- "name": {
525
  "type": {
526
- "type": "<class 'str'>"
527
  },
528
- "name": "name",
529
- "default": "openai"
530
  }
531
  },
532
- "outputs": {
533
- "output": {
534
- "name": "output",
535
- "position": "top",
536
  "type": {
537
- "type": "None"
538
  }
539
  }
540
  },
 
541
  "name": "LLM",
542
  "type": "basic"
543
  }
544
  },
545
  "position": {
546
- "x": 0.0,
547
- "y": 0.0
548
- }
 
 
 
549
  },
550
  {
551
  "id": "Truncate history 1",
@@ -558,33 +592,36 @@
558
  "display": null,
559
  "error": null,
560
  "meta": {
561
- "name": "Truncate history",
562
- "type": "basic",
563
- "outputs": {
564
- "output": {
565
- "type": {
566
- "type": "None"
567
- },
568
- "position": "top",
569
- "name": "output"
570
- }
571
- },
572
  "params": {
573
  "max_tokens": {
 
574
  "type": {
575
  "type": "<class 'int'>"
576
  },
577
- "default": 10000.0,
578
  "name": "max_tokens"
579
  }
580
  },
581
- "inputs": {}
 
 
 
 
 
 
 
 
 
 
582
  }
583
  },
584
  "position": {
585
- "x": 0.0,
586
- "y": 0.0
587
- }
 
 
 
588
  },
589
  {
590
  "id": "Chat processor 1",
@@ -594,36 +631,39 @@
594
  "params": {},
595
  "display": null,
596
  "error": null,
 
 
597
  "meta": {
598
- "params": {},
599
- "name": "Chat processor",
600
- "inputs": {
601
- "processor": {
602
- "position": "bottom",
603
- "name": "processor",
604
- "type": {
605
- "type": "<class 'inspect._empty'>"
606
- }
607
- }
608
- },
609
  "outputs": {
610
  "output": {
611
- "position": "top",
612
  "type": {
613
  "type": "None"
614
  },
 
615
  "name": "output"
616
  }
617
  },
618
- "type": "basic"
619
- },
620
- "collapsed": true,
621
- "__execution_delay": null
 
 
 
 
 
 
 
 
 
622
  },
623
  "position": {
624
- "x": 0.0,
625
- "y": 0.0
626
- }
 
 
 
627
  },
628
  {
629
  "id": "Mask 1",
@@ -631,62 +671,65 @@
631
  "data": {
632
  "title": "Mask",
633
  "params": {
634
- "mask_pattern": "masked_email_address_{}",
635
  "regex": "([a-z0-9!#$%&'*+\\/=?^_`{|.}~-]+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)",
 
636
  "name": "email",
637
638
  },
639
  "display": null,
640
  "error": null,
641
  "meta": {
 
642
  "outputs": {
643
  "output": {
 
644
  "type": {
645
  "type": "None"
646
  },
647
- "position": "top",
648
- "name": "output"
649
  }
650
  },
651
- "inputs": {},
652
  "type": "basic",
653
- "name": "Mask",
654
  "params": {
655
  "mask_pattern": {
 
656
  "type": {
657
  "type": "<class 'str'>"
658
  },
659
- "name": "mask_pattern",
660
- "default": ""
661
  },
662
- "exceptions": {
 
663
  "default": "",
664
- "name": "exceptions",
665
  "type": {
666
  "type": "<class 'str'>"
667
  }
668
  },
669
  "name": {
670
  "name": "name",
 
671
  "type": {
672
  "type": "<class 'str'>"
673
- },
674
- "default": ""
675
  },
676
- "regex": {
 
 
677
  "type": {
678
  "type": "<class 'str'>"
679
- },
680
- "name": "regex",
681
- "default": ""
682
  }
683
- }
 
684
  }
685
  },
686
  "position": {
687
- "x": 0.0,
688
- "y": 0.0
689
- }
 
 
 
690
  },
691
  {
692
  "id": "Mask 2",
@@ -694,62 +737,65 @@
694
  "data": {
695
  "title": "Mask",
696
  "params": {
697
- "regex": "((?:(?:\\\\d{4}[- ]?){3}\\\\d{4}|\\\\d{15,16}))(?![\\\\d])",
698
- "exceptions": "",
699
  "name": "credit_card",
700
- "mask_pattern": "masked_credit_card_number_{}"
 
701
  },
702
  "display": null,
703
  "error": null,
704
  "meta": {
 
 
705
  "params": {
706
- "name": {
707
- "name": "name",
708
  "default": "",
709
  "type": {
710
  "type": "<class 'str'>"
711
  }
712
  },
713
- "regex": {
714
- "name": "regex",
715
  "default": "",
716
  "type": {
717
  "type": "<class 'str'>"
718
  }
719
  },
720
- "mask_pattern": {
721
- "default": "",
722
- "name": "mask_pattern",
723
  "type": {
724
  "type": "<class 'str'>"
725
- }
 
726
  },
727
- "exceptions": {
728
- "default": "",
729
- "name": "exceptions",
730
  "type": {
731
  "type": "<class 'str'>"
732
- }
 
 
733
  }
734
  },
735
- "inputs": {},
736
  "outputs": {
737
  "output": {
738
- "name": "output",
739
  "position": "top",
 
740
  "type": {
741
  "type": "None"
742
  }
743
  }
744
  },
745
- "type": "basic",
746
  "name": "Mask"
747
  }
748
  },
749
  "position": {
750
- "x": 0.0,
751
- "y": 0.0
752
- }
 
 
 
753
  },
754
  {
755
  "id": "Test Chat API 2",
@@ -762,50 +808,53 @@
762
  "display": null,
763
  "error": null,
764
  "__execution_delay": 0.0,
 
765
  "meta": {
766
- "type": "basic",
767
- "outputs": {
768
- "output": {
769
- "type": {
770
- "type": "None"
771
- },
772
- "position": "right",
773
- "name": "output"
774
- }
775
- },
776
- "name": "Test Chat API",
777
  "params": {
778
  "show_details": {
 
779
  "type": {
780
  "type": "<class 'bool'>"
781
  },
782
- "default": false,
783
- "name": "show_details"
784
  }
785
  },
786
  "inputs": {
787
  "message": {
788
- "position": "left",
789
  "type": {
790
  "type": "<class 'inspect._empty'>"
791
  },
792
- "name": "message"
793
  },
794
  "chat_api": {
 
 
795
  "type": {
796
  "type": "<class 'inspect._empty'>"
797
- },
798
- "name": "chat_api",
799
- "position": "bottom"
800
  }
801
- }
802
- },
803
- "collapsed": false
 
 
 
 
 
 
 
 
 
 
804
  },
805
  "position": {
806
- "x": 0.0,
807
- "y": 0.0
808
- }
 
 
 
809
  }
810
  ],
811
  "edges": [
 
11
  },
12
  "display": null,
13
  "error": null,
 
 
14
  "meta": {
 
15
  "outputs": {
16
  "output": {
17
  "name": "output",
 
18
  "type": {
19
  "type": "None"
20
+ },
21
+ "position": "right"
22
  }
23
  },
24
+ "name": "Input chat",
25
+ "inputs": {},
26
  "params": {
27
  "chat": {
28
+ "name": "chat",
29
  "default": null,
30
  "type": {
31
  "type": "<class 'str'>"
32
+ }
 
33
  }
34
  },
35
+ "type": "basic"
 
36
  }
37
  },
38
  "position": {
39
+ "x": -493.5496596237119,
40
+ "y": 20.90123252513356
41
+ },
42
+ "parentId": null,
43
+ "height": 186.0,
44
+ "width": 259.0
45
  },
46
  {
47
  "id": "View 1",
 
49
  "data": {
50
  "title": "View",
51
  "params": {},
52
+ "display": {
53
+ "dataframes": {
54
+ "df": {
55
+ "data": [
56
+ [
57
+ "The Chief Innovation Officer (CIO) of Lynx Analytics is Gabor Benedek. He is responsible for defining the methodological roadmap for the company's predictive analytics consulting and product development departments. If you need more specific information about his role, feel free to ask!\n\nPlease visit <a href='https://www.lynxanalytics.com/team-leadership' target='_blank'>https://www.lynxanalytics.com/team-leadership</a> for further information."
58
+ ]
59
+ ],
60
+ "columns": [
61
+ "answer"
62
+ ]
63
+ }
64
+ }
65
+ },
66
  "error": null,
67
  "meta": {
68
+ "type": "table_view",
69
+ "outputs": {},
70
+ "params": {},
71
  "name": "View",
72
  "inputs": {
73
  "input": {
74
  "position": "left",
 
75
  "type": {
76
  "type": "<class 'inspect._empty'>"
77
+ },
78
+ "name": "input"
79
  }
80
+ }
 
 
 
81
  }
82
  },
83
  "position": {
84
+ "x": 722.1450069267316,
85
+ "y": -785.6076562320527
86
+ },
87
+ "parentId": null,
88
+ "height": 200.0,
89
+ "width": 200.0
90
  },
91
  {
92
  "id": "LLM 1",
 
98
  },
99
  "display": null,
100
  "error": null,
 
101
  "meta": {
102
  "name": "LLM",
103
  "inputs": {},
 
104
  "params": {
105
  "name": {
106
+ "name": "name",
107
  "type": {
108
  "type": "<class 'str'>"
109
  },
110
+ "default": "openai"
111
  }
112
  },
113
  "outputs": {
114
  "output": {
115
+ "position": "top",
116
  "type": {
117
  "type": "None"
118
  },
119
+ "name": "output"
120
  }
121
+ },
122
+ "type": "basic"
123
+ }
124
  },
125
  "position": {
126
+ "x": -312.5774211084781,
127
+ "y": 1093.4019527511366
128
+ },
129
+ "height": 200.0,
130
+ "width": 200.0,
131
+ "parentId": null
132
  },
133
  {
134
  "id": "Scenario selector 1",
 
141
  },
142
  "display": null,
143
  "error": null,
 
144
  "meta": {
 
 
 
 
 
 
 
 
 
 
145
  "name": "Scenario selector",
146
+ "inputs": {},
147
  "params": {
148
+ "scenario_file": {
149
+ "default": null,
150
+ "type": {
151
+ "type": "<class 'str'>"
152
+ },
153
+ "name": "scenario_file"
154
+ },
155
  "node_types": {
156
  "name": "node_types",
157
  "default": "intent_cluster",
158
  "type": {
159
  "type": "<class 'str'>"
160
  }
161
+ }
162
+ },
163
+ "type": "basic",
164
+ "outputs": {
165
+ "output": {
166
  "type": {
167
+ "type": "None"
168
  },
169
+ "name": "output",
170
+ "position": "top"
171
  }
172
+ }
173
+ }
 
 
174
  },
175
  "position": {
176
+ "x": -549.1300345090008,
177
+ "y": 1086.4852248156676
178
+ },
179
+ "height": 200.0,
180
+ "width": 200.0,
181
+ "parentId": null
182
  },
183
  {
184
  "id": "Chat API 1",
 
191
  "display": null,
192
  "error": null,
193
  "meta": {
194
+ "name": "Chat API",
195
  "inputs": {
196
+ "chatbot": {
197
  "position": "bottom",
198
+ "name": "chatbot",
199
  "type": {
200
  "type": "<class 'inspect._empty'>"
201
+ }
 
202
  },
203
  "knowledge_base": {
 
 
204
  "type": {
205
  "type": "<class 'inspect._empty'>"
206
+ },
207
+ "position": "bottom",
208
+ "name": "knowledge_base"
209
  },
210
+ "chat_processor": {
211
+ "position": "bottom",
212
+ "name": "chat_processor",
213
  "type": {
214
  "type": "<class 'inspect._empty'>"
215
+ }
 
216
  }
217
  },
218
  "type": "basic",
 
219
  "params": {
220
  "model": {
 
221
  "type": {
222
  "type": "<class 'str'>"
223
  },
224
+ "default": "gpt-4o-mini",
225
  "name": "model"
226
  }
227
  },
228
  "outputs": {
229
  "output": {
 
230
  "position": "top",
231
  "type": {
232
  "type": "None"
233
+ },
234
+ "name": "output"
235
  }
236
  }
237
+ }
 
 
238
  },
239
  "position": {
240
+ "x": -22.866663363810787,
241
+ "y": 258.20943122219336
242
+ },
243
+ "parentId": null,
244
+ "height": 200.0,
245
+ "width": 200.0
246
  },
247
  {
248
  "id": "Knowledge base 1",
 
250
  "data": {
251
  "title": "Knowledge base",
252
  "params": {
253
+ "nodes_path": "/home/darabos/nvme/lynxscribe/examples/chat_api/data/lynx/nodes.pickle",
254
  "template_cluster_path": "/home/darabos/nvme/lynxscribe/examples/chat_api/data/lynx/tempclusters.pickle",
255
+ "edges_path": "/home/darabos/nvme/lynxscribe/examples/chat_api/data/lynx/edges.pickle"
 
256
  },
257
  "display": null,
258
  "error": null,
259
  "meta": {
260
  "params": {
261
+ "edges_path": {
262
+ "name": "edges_path",
263
+ "default": "edges.pickle",
264
  "type": {
265
  "type": "<class 'str'>"
266
  }
267
  },
268
+ "template_cluster_path": {
269
+ "name": "template_cluster_path",
270
+ "default": "tempclusters.pickle",
271
  "type": {
272
  "type": "<class 'str'>"
273
  }
274
  },
275
  "nodes_path": {
 
276
  "name": "nodes_path",
277
+ "default": "nodes.pickle",
278
  "type": {
279
  "type": "<class 'str'>"
280
  }
281
  }
282
  },
283
+ "name": "Knowledge base",
284
  "outputs": {
285
  "output": {
286
  "type": {
 
290
  "name": "output"
291
  }
292
  },
293
+ "inputs": {},
294
+ "type": "basic"
295
  }
296
  },
297
  "position": {
298
+ "x": 598.8683124946176,
299
+ "y": 609.9499973808545
300
+ },
301
+ "parentId": null,
302
+ "height": 320.0,
303
+ "width": 336.0
304
  },
305
  {
306
  "id": "RAG chatbot 1",
 
308
  "data": {
309
  "title": "RAG chatbot",
310
  "params": {
 
311
  "negative_answer": "I'm sorry, but the data I've been trained on does not contain any information related to your question.",
312
  "max_results": "5",
313
+ "limits_by_type": "{\"information\": [2, 3], \"summary\": [2, 3]}",
314
  "strict_limits": true
315
  },
316
  "display": null,
317
  "error": null,
318
  "meta": {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  "outputs": {
320
  "output": {
321
+ "position": "top",
322
  "type": {
323
  "type": "None"
324
  },
 
325
  "name": "output"
326
  }
327
  },
328
  "inputs": {
329
+ "llm": {
330
+ "type": {
331
+ "type": "<class 'inspect._empty'>"
332
+ },
333
  "position": "bottom",
334
+ "name": "llm"
335
+ },
336
+ "rag_graph": {
337
  "name": "rag_graph",
338
+ "position": "bottom",
339
  "type": {
340
  "type": "<class 'inspect._empty'>"
341
  }
342
  },
343
  "scenario_selector": {
344
  "position": "bottom",
 
345
  "type": {
346
  "type": "<class 'inspect._empty'>"
347
+ },
348
+ "name": "scenario_selector"
349
+ }
350
+ },
351
+ "params": {
352
+ "max_results": {
353
+ "name": "max_results",
354
+ "type": {
355
+ "type": "<class 'int'>"
356
+ },
357
+ "default": 5.0
358
  },
359
+ "negative_answer": {
360
  "type": {
361
+ "type": "<class 'str'>"
362
  },
363
+ "name": "negative_answer",
364
+ "default": "I'm sorry, but the data I've been trained on does not contain any information related to your question."
365
+ },
366
+ "strict_limits": {
367
+ "default": true,
368
+ "type": {
369
+ "type": "<class 'bool'>"
370
+ },
371
+ "name": "strict_limits"
372
+ },
373
+ "limits_by_type": {
374
+ "default": "{}",
375
+ "name": "limits_by_type",
376
+ "type": {
377
+ "type": "<class 'str'>"
378
+ }
379
  }
380
+ },
381
+ "name": "RAG chatbot",
382
+ "type": "basic"
383
  },
384
  "beingResized": false
385
  },
386
  "position": {
387
+ "x": -533.1301830766971,
388
+ "y": 547.294980747757
389
+ },
390
+ "parentId": null,
391
+ "width": 339.0,
392
+ "height": 399.0
393
  },
394
  {
395
  "id": "RAG graph 1",
 
399
  "params": {},
400
  "display": null,
401
  "error": null,
 
402
  "meta": {
403
  "name": "RAG graph",
404
  "params": {},
405
+ "type": "basic",
406
  "outputs": {
407
  "output": {
408
+ "position": "top",
409
+ "name": "output",
410
  "type": {
411
  "type": "None"
412
+ }
 
 
413
  }
414
  },
 
415
  "inputs": {
416
+ "text_embedder": {
417
+ "position": "bottom",
418
+ "name": "text_embedder",
419
  "type": {
420
  "type": "<class 'inspect._empty'>"
421
+ }
 
422
  },
423
+ "vector_store": {
424
+ "name": "vector_store",
425
  "position": "bottom",
426
  "type": {
427
  "type": "<class 'inspect._empty'>"
428
+ }
 
429
  }
430
  }
431
+ }
 
432
  },
433
  "position": {
434
+ "x": -817.8208895639339,
435
+ "y": 1014.836542916127
436
+ },
437
+ "height": 200.0,
438
+ "width": 200.0,
439
+ "parentId": null
440
  },
441
  {
442
  "id": "Vector store 1",
 
444
  "data": {
445
  "title": "Vector store",
446
  "params": {
447
+ "name": "chromadb",
448
+ "collection_name": "lynx"
449
  },
450
  "display": null,
451
  "error": null,
452
  "meta": {
453
  "name": "Vector store",
 
 
454
  "params": {
 
 
 
 
 
 
 
455
  "name": {
456
  "name": "name",
457
  "default": "chromadb",
458
  "type": {
459
  "type": "<class 'str'>"
460
  }
461
+ },
462
+ "collection_name": {
463
+ "default": "lynx",
464
+ "name": "collection_name",
465
+ "type": {
466
+ "type": "<class 'str'>"
467
+ }
468
  }
469
  },
470
+ "inputs": {},
471
  "outputs": {
472
  "output": {
 
473
  "name": "output",
474
  "type": {
475
  "type": "None"
476
+ },
477
+ "position": "top"
478
  }
479
+ },
480
+ "type": "basic"
481
  },
482
  "beingResized": false
483
  },
484
  "position": {
485
+ "x": -1053.794625339574,
486
+ "y": 1347.7711940497127
487
+ },
488
+ "width": 275.0,
489
+ "parentId": null,
490
+ "height": 227.0
491
  },
492
  {
493
  "id": "Text embedder 2",
 
499
  },
500
  "display": null,
501
  "error": null,
 
 
502
  "meta": {
 
 
 
 
 
 
 
 
 
503
  "name": "Text embedder",
504
  "params": {
505
  "model": {
 
506
  "default": "text-embedding-ada-002",
507
  "type": {
508
  "type": "<class 'str'>"
509
+ },
510
+ "name": "model"
511
+ }
512
+ },
513
+ "outputs": {
514
+ "output": {
515
+ "type": {
516
+ "type": "None"
517
+ },
518
+ "name": "output",
519
+ "position": "top"
520
  }
521
  },
522
+ "type": "basic",
523
  "inputs": {
524
  "llm": {
 
525
  "name": "llm",
526
  "type": {
527
  "type": "<class 'inspect._empty'>"
528
+ },
529
+ "position": "bottom"
530
  }
531
+ }
 
532
  }
533
  },
534
  "position": {
535
+ "x": -719.98604638686,
536
+ "y": 1343.5978526690794
537
+ },
538
+ "parentId": null,
539
+ "height": 200.0,
540
+ "width": 200.0
541
  },
542
  {
543
  "id": "LLM 2",
 
550
  "display": null,
551
  "error": null,
552
  "meta": {
553
+ "outputs": {
554
+ "output": {
 
555
  "type": {
556
+ "type": "None"
557
  },
558
+ "name": "output",
559
+ "position": "top"
560
  }
561
  },
562
+ "params": {
563
+ "name": {
564
+ "name": "name",
565
+ "default": "openai",
566
  "type": {
567
+ "type": "<class 'str'>"
568
  }
569
  }
570
  },
571
+ "inputs": {},
572
  "name": "LLM",
573
  "type": "basic"
574
  }
575
  },
576
  "position": {
577
+ "x": -727.6171373682814,
578
+ "y": 1649.7242636905507
579
+ },
580
+ "height": 200.0,
581
+ "width": 200.0,
582
+ "parentId": null
583
  },
584
  {
585
  "id": "Truncate history 1",
 
592
  "display": null,
593
  "error": null,
594
  "meta": {
595
+ "inputs": {},
 
 
 
 
 
 
 
 
 
 
596
  "params": {
597
  "max_tokens": {
598
+ "default": 10000.0,
599
  "type": {
600
  "type": "<class 'int'>"
601
  },
 
602
  "name": "max_tokens"
603
  }
604
  },
605
+ "outputs": {
606
+ "output": {
607
+ "position": "top",
608
+ "name": "output",
609
+ "type": {
610
+ "type": "None"
611
+ }
612
+ }
613
+ },
614
+ "type": "basic",
615
+ "name": "Truncate history"
616
  }
617
  },
618
  "position": {
619
+ "x": 0.08889822620079713,
620
+ "y": 1044.7639853229612
621
+ },
622
+ "height": 200.0,
623
+ "width": 200.0,
624
+ "parentId": null
625
  },
626
  {
627
  "id": "Chat processor 1",
 
631
  "params": {},
632
  "display": null,
633
  "error": null,
634
+ "__execution_delay": null,
635
+ "collapsed": true,
636
  "meta": {
 
 
 
 
 
 
 
 
 
 
 
637
  "outputs": {
638
  "output": {
 
639
  "type": {
640
  "type": "None"
641
  },
642
+ "position": "top",
643
  "name": "output"
644
  }
645
  },
646
+ "type": "basic",
647
+ "inputs": {
648
+ "processor": {
649
+ "type": {
650
+ "type": "<class 'inspect._empty'>"
651
+ },
652
+ "position": "bottom",
653
+ "name": "processor"
654
+ }
655
+ },
656
+ "params": {},
657
+ "name": "Chat processor"
658
+ }
659
  },
660
  "position": {
661
+ "x": 182.89729246405872,
662
+ "y": 778.546274223181
663
+ },
664
+ "width": 200.0,
665
+ "height": 200.0,
666
+ "parentId": null
667
  },
668
  {
669
  "id": "Mask 1",
 
671
  "data": {
672
  "title": "Mask",
673
  "params": {
 
674
  "regex": "([a-z0-9!#$%&'*+\\/=?^_`{|.}~-]+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)",
675
676
  "name": "email",
677
+ "mask_pattern": "masked_email_address_{}"
678
  },
679
  "display": null,
680
  "error": null,
681
  "meta": {
682
+ "inputs": {},
683
  "outputs": {
684
  "output": {
685
+ "name": "output",
686
  "type": {
687
  "type": "None"
688
  },
689
+ "position": "top"
 
690
  }
691
  },
 
692
  "type": "basic",
 
693
  "params": {
694
  "mask_pattern": {
695
+ "default": "",
696
  "type": {
697
  "type": "<class 'str'>"
698
  },
699
+ "name": "mask_pattern"
 
700
  },
701
+ "regex": {
702
+ "name": "regex",
703
  "default": "",
 
704
  "type": {
705
  "type": "<class 'str'>"
706
  }
707
  },
708
  "name": {
709
  "name": "name",
710
+ "default": "",
711
  "type": {
712
  "type": "<class 'str'>"
713
+ }
 
714
  },
715
+ "exceptions": {
716
+ "name": "exceptions",
717
+ "default": "",
718
  "type": {
719
  "type": "<class 'str'>"
720
+ }
 
 
721
  }
722
+ },
723
+ "name": "Mask"
724
  }
725
  },
726
  "position": {
727
+ "x": 233.69759202223884,
728
+ "y": 1041.6145468043276
729
+ },
730
+ "parentId": null,
731
+ "width": 200.0,
732
+ "height": 200.0
733
  },
734
  {
735
  "id": "Mask 2",
 
737
  "data": {
738
  "title": "Mask",
739
  "params": {
740
+ "mask_pattern": "masked_credit_card_number_{}",
 
741
  "name": "credit_card",
742
+ "regex": "((?:(?:\\\\d{4}[- ]?){3}\\\\d{4}|\\\\d{15,16}))(?![\\\\d])",
743
+ "exceptions": ""
744
  },
745
  "display": null,
746
  "error": null,
747
  "meta": {
748
+ "inputs": {},
749
+ "type": "basic",
750
  "params": {
751
+ "exceptions": {
752
+ "name": "exceptions",
753
  "default": "",
754
  "type": {
755
  "type": "<class 'str'>"
756
  }
757
  },
758
+ "mask_pattern": {
759
+ "name": "mask_pattern",
760
  "default": "",
761
  "type": {
762
  "type": "<class 'str'>"
763
  }
764
  },
765
+ "regex": {
766
+ "name": "regex",
 
767
  "type": {
768
  "type": "<class 'str'>"
769
+ },
770
+ "default": ""
771
  },
772
+ "name": {
 
 
773
  "type": {
774
  "type": "<class 'str'>"
775
+ },
776
+ "default": "",
777
+ "name": "name"
778
  }
779
  },
 
780
  "outputs": {
781
  "output": {
 
782
  "position": "top",
783
+ "name": "output",
784
  "type": {
785
  "type": "None"
786
  }
787
  }
788
  },
 
789
  "name": "Mask"
790
  }
791
  },
792
  "position": {
793
+ "x": 513.2761671440603,
794
+ "y": 1034.8547191984255
795
+ },
796
+ "width": 200.0,
797
+ "parentId": null,
798
+ "height": 200.0
799
  },
800
  {
801
  "id": "Test Chat API 2",
 
808
  "display": null,
809
  "error": null,
810
  "__execution_delay": 0.0,
811
+ "collapsed": false,
812
  "meta": {
 
 
 
 
 
 
 
 
 
 
 
813
  "params": {
814
  "show_details": {
815
+ "name": "show_details",
816
  "type": {
817
  "type": "<class 'bool'>"
818
  },
819
+ "default": false
 
820
  }
821
  },
822
  "inputs": {
823
  "message": {
824
+ "name": "message",
825
  "type": {
826
  "type": "<class 'inspect._empty'>"
827
  },
828
+ "position": "left"
829
  },
830
  "chat_api": {
831
+ "position": "bottom",
832
+ "name": "chat_api",
833
  "type": {
834
  "type": "<class 'inspect._empty'>"
835
+ }
 
 
836
  }
837
+ },
838
+ "name": "Test Chat API",
839
+ "outputs": {
840
+ "output": {
841
+ "position": "right",
842
+ "name": "output",
843
+ "type": {
844
+ "type": "None"
845
+ }
846
+ }
847
+ },
848
+ "type": "basic"
849
+ }
850
  },
851
  "position": {
852
+ "x": -11.653333595036415,
853
+ "y": -0.9210389517918429
854
+ },
855
+ "parentId": null,
856
+ "width": 200.0,
857
+ "height": 200.0
858
  }
859
  ],
860
  "edges": [
lynxkite-app/src/lynxkite/app/crdt.py CHANGED
@@ -134,10 +134,11 @@ async def workspace_changed(name, changes, ws_crdt):
134
  ws_pyd = workspace.Workspace.model_validate(ws_crdt.to_py())
135
  # Do not trigger execution for superficial changes.
136
  # This is a quick solution until we build proper caching.
137
- clean_input(ws_pyd)
138
- if ws_pyd == last_known_versions.get(name):
 
139
  return
140
- last_known_versions[name] = ws_pyd.model_copy(deep=True)
141
  # Frontend changes that result from typing are delayed to avoid
142
  # rerunning the workspace for every keystroke.
143
  if name in delayed_executions:
 
134
  ws_pyd = workspace.Workspace.model_validate(ws_crdt.to_py())
135
  # Do not trigger execution for superficial changes.
136
  # This is a quick solution until we build proper caching.
137
+ ws_simple = ws_pyd.model_copy(deep=True)
138
+ clean_input(ws_simple)
139
+ if ws_simple == last_known_versions.get(name):
140
  return
141
+ last_known_versions[name] = ws_simple
142
  # Frontend changes that result from typing are delayed to avoid
143
  # rerunning the workspace for every keystroke.
144
  if name in delayed_executions: