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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nodes": [
3
+ {
4
+ "id": "recursiveCharacterTextSplitter_0",
5
+ "position": {
6
+ "x": 213.66633969673887,
7
+ "y": 277.61843101631064
8
+ },
9
+ "type": "customNode",
10
+ "data": {
11
+ "id": "recursiveCharacterTextSplitter_0",
12
+ "label": "Recursive Character Text Splitter",
13
+ "version": 2,
14
+ "name": "recursiveCharacterTextSplitter",
15
+ "type": "RecursiveCharacterTextSplitter",
16
+ "baseClasses": [
17
+ "RecursiveCharacterTextSplitter",
18
+ "TextSplitter",
19
+ "BaseDocumentTransformer",
20
+ "Runnable"
21
+ ],
22
+ "category": "Text Splitters",
23
+ "description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"",
24
+ "inputParams": [
25
+ {
26
+ "label": "Chunk Size",
27
+ "name": "chunkSize",
28
+ "type": "number",
29
+ "description": "Number of characters in each chunk. Default is 1000.",
30
+ "default": 1000,
31
+ "optional": true,
32
+ "id": "recursiveCharacterTextSplitter_0-input-chunkSize-number",
33
+ "display": true
34
+ },
35
+ {
36
+ "label": "Chunk Overlap",
37
+ "name": "chunkOverlap",
38
+ "type": "number",
39
+ "description": "Number of characters to overlap between chunks. Default is 200.",
40
+ "default": 200,
41
+ "optional": true,
42
+ "id": "recursiveCharacterTextSplitter_0-input-chunkOverlap-number",
43
+ "display": true
44
+ },
45
+ {
46
+ "label": "Custom Separators",
47
+ "name": "separators",
48
+ "type": "string",
49
+ "rows": 4,
50
+ "description": "Array of custom separators to determine when to split the text, will override the default separators",
51
+ "placeholder": "[\"|\", \"##\", \">\", \"-\"]",
52
+ "additionalParams": true,
53
+ "optional": true,
54
+ "id": "recursiveCharacterTextSplitter_0-input-separators-string",
55
+ "display": true
56
+ }
57
+ ],
58
+ "inputAnchors": [],
59
+ "inputs": {
60
+ "chunkSize": 1000,
61
+ "chunkOverlap": "100",
62
+ "separators": ""
63
+ },
64
+ "outputAnchors": [
65
+ {
66
+ "id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
67
+ "name": "recursiveCharacterTextSplitter",
68
+ "label": "RecursiveCharacterTextSplitter",
69
+ "description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"",
70
+ "type": "RecursiveCharacterTextSplitter | TextSplitter | BaseDocumentTransformer | Runnable"
71
+ }
72
+ ],
73
+ "outputs": {},
74
+ "selected": false
75
+ },
76
+ "width": 300,
77
+ "height": 432,
78
+ "selected": false,
79
+ "positionAbsolute": {
80
+ "x": 213.66633969673887,
81
+ "y": 277.61843101631064
82
+ },
83
+ "dragging": false
84
+ },
85
+ {
86
+ "id": "cheerioWebScraper_0",
87
+ "position": {
88
+ "x": 634.3134396320586,
89
+ "y": 396.07236301516616
90
+ },
91
+ "type": "customNode",
92
+ "data": {
93
+ "id": "cheerioWebScraper_0",
94
+ "label": "Cheerio Web Scraper",
95
+ "version": 2,
96
+ "name": "cheerioWebScraper",
97
+ "type": "Document",
98
+ "baseClasses": [
99
+ "Document"
100
+ ],
101
+ "category": "Document Loaders",
102
+ "description": "Load data from webpages",
103
+ "inputParams": [
104
+ {
105
+ "label": "URL",
106
+ "name": "url",
107
+ "type": "string",
108
+ "id": "cheerioWebScraper_0-input-url-string",
109
+ "display": true
110
+ },
111
+ {
112
+ "label": "Get Relative Links Method",
113
+ "name": "relativeLinksMethod",
114
+ "type": "options",
115
+ "description": "Select a method to retrieve relative links",
116
+ "options": [
117
+ {
118
+ "label": "Web Crawl",
119
+ "name": "webCrawl",
120
+ "description": "Crawl relative links from HTML URL"
121
+ },
122
+ {
123
+ "label": "Scrape XML Sitemap",
124
+ "name": "scrapeXMLSitemap",
125
+ "description": "Scrape relative links from XML sitemap URL"
126
+ }
127
+ ],
128
+ "default": "webCrawl",
129
+ "optional": true,
130
+ "additionalParams": true,
131
+ "id": "cheerioWebScraper_0-input-relativeLinksMethod-options",
132
+ "display": true
133
+ },
134
+ {
135
+ "label": "Get Relative Links Limit",
136
+ "name": "limit",
137
+ "type": "number",
138
+ "optional": true,
139
+ "default": "10",
140
+ "additionalParams": true,
141
+ "description": "Only used when \"Get Relative Links Method\" is selected. Set 0 to retrieve all relative links, default limit is 10.",
142
+ "warning": "Retrieving all links might take long time, and all links will be upserted again if the flow's state changed (eg: different URL, chunk size, etc)",
143
+ "id": "cheerioWebScraper_0-input-limit-number",
144
+ "display": true
145
+ },
146
+ {
147
+ "label": "Selector (CSS)",
148
+ "name": "selector",
149
+ "type": "string",
150
+ "description": "Specify a CSS selector to select the content to be extracted",
151
+ "optional": true,
152
+ "additionalParams": true,
153
+ "id": "cheerioWebScraper_0-input-selector-string",
154
+ "display": true
155
+ },
156
+ {
157
+ "label": "Additional Metadata",
158
+ "name": "metadata",
159
+ "type": "json",
160
+ "description": "Additional metadata to be added to the extracted documents",
161
+ "optional": true,
162
+ "additionalParams": true,
163
+ "id": "cheerioWebScraper_0-input-metadata-json",
164
+ "display": true
165
+ },
166
+ {
167
+ "label": "Omit Metadata Keys",
168
+ "name": "omitMetadataKeys",
169
+ "type": "string",
170
+ "rows": 4,
171
+ "description": "Each document loader comes with a default set of metadata keys that are extracted from the document. You can use this field to omit some of the default metadata keys. The value should be a list of keys, seperated by comma. Use * to omit all metadata keys execept the ones you specify in the Additional Metadata field",
172
+ "placeholder": "key1, key2, key3.nestedKey1",
173
+ "optional": true,
174
+ "additionalParams": true,
175
+ "id": "cheerioWebScraper_0-input-omitMetadataKeys-string",
176
+ "display": true
177
+ }
178
+ ],
179
+ "inputAnchors": [
180
+ {
181
+ "label": "Text Splitter",
182
+ "name": "textSplitter",
183
+ "type": "TextSplitter",
184
+ "optional": true,
185
+ "id": "cheerioWebScraper_0-input-textSplitter-TextSplitter",
186
+ "display": true
187
+ }
188
+ ],
189
+ "inputs": {
190
+ "url": "https://recht.nrw.de/lmi/owa/br_text_anzeigen?v_id=10000000000000000654",
191
+ "textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}",
192
+ "relativeLinksMethod": "webCrawl",
193
+ "limit": "10",
194
+ "selector": "",
195
+ "metadata": "",
196
+ "omitMetadataKeys": ""
197
+ },
198
+ "outputAnchors": [
199
+ {
200
+ "name": "output",
201
+ "label": "Output",
202
+ "type": "options",
203
+ "description": "Array of document objects containing metadata and pageContent",
204
+ "options": [
205
+ {
206
+ "id": "cheerioWebScraper_0-output-document-Document|json",
207
+ "name": "document",
208
+ "label": "Document",
209
+ "description": "Array of document objects containing metadata and pageContent",
210
+ "type": "Document | json"
211
+ },
212
+ {
213
+ "id": "cheerioWebScraper_0-output-text-string|json",
214
+ "name": "text",
215
+ "label": "Text",
216
+ "description": "Concatenated string from pageContent of documents",
217
+ "type": "string | json"
218
+ }
219
+ ],
220
+ "default": "document"
221
+ }
222
+ ],
223
+ "outputs": {
224
+ "output": "document"
225
+ },
226
+ "selected": false
227
+ },
228
+ "width": 300,
229
+ "height": 455,
230
+ "selected": false,
231
+ "positionAbsolute": {
232
+ "x": 634.3134396320586,
233
+ "y": 396.07236301516616
234
+ },
235
+ "dragging": false
236
+ },
237
+ {
238
+ "id": "fileLoader_0",
239
+ "position": {
240
+ "x": 650.8786850888786,
241
+ "y": -99.61017668321267
242
+ },
243
+ "type": "customNode",
244
+ "data": {
245
+ "id": "fileLoader_0",
246
+ "label": "File Loader",
247
+ "version": 2,
248
+ "name": "fileLoader",
249
+ "type": "Document",
250
+ "baseClasses": [
251
+ "Document"
252
+ ],
253
+ "category": "Document Loaders",
254
+ "description": "A generic file loader that can load different file types",
255
+ "inputParams": [
256
+ {
257
+ "label": "File",
258
+ "name": "file",
259
+ "type": "file",
260
+ "fileType": "*",
261
+ "id": "fileLoader_0-input-file-file",
262
+ "display": true
263
+ },
264
+ {
265
+ "label": "Pdf Usage",
266
+ "name": "usage",
267
+ "type": "options",
268
+ "description": "Only when loading PDF files",
269
+ "options": [
270
+ {
271
+ "label": "One document per page",
272
+ "name": "perPage"
273
+ },
274
+ {
275
+ "label": "One document per file",
276
+ "name": "perFile"
277
+ }
278
+ ],
279
+ "default": "perPage",
280
+ "optional": true,
281
+ "additionalParams": true,
282
+ "id": "fileLoader_0-input-usage-options",
283
+ "display": true
284
+ },
285
+ {
286
+ "label": "Use Legacy Build",
287
+ "name": "legacyBuild",
288
+ "type": "boolean",
289
+ "description": "Use legacy build for PDF compatibility issues",
290
+ "optional": true,
291
+ "additionalParams": true,
292
+ "id": "fileLoader_0-input-legacyBuild-boolean",
293
+ "display": true
294
+ },
295
+ {
296
+ "label": "JSONL Pointer Extraction",
297
+ "name": "pointerName",
298
+ "type": "string",
299
+ "description": "Only when loading JSONL files",
300
+ "placeholder": "<pointerName>",
301
+ "optional": true,
302
+ "additionalParams": true,
303
+ "id": "fileLoader_0-input-pointerName-string",
304
+ "display": true
305
+ },
306
+ {
307
+ "label": "Additional Metadata",
308
+ "name": "metadata",
309
+ "type": "json",
310
+ "description": "Additional metadata to be added to the extracted documents",
311
+ "optional": true,
312
+ "additionalParams": true,
313
+ "id": "fileLoader_0-input-metadata-json",
314
+ "display": true
315
+ },
316
+ {
317
+ "label": "Omit Metadata Keys",
318
+ "name": "omitMetadataKeys",
319
+ "type": "string",
320
+ "rows": 4,
321
+ "description": "Each document loader comes with a default set of metadata keys that are extracted from the document. You can use this field to omit some of the default metadata keys. The value should be a list of keys, seperated by comma. Use * to omit all metadata keys execept the ones you specify in the Additional Metadata field",
322
+ "placeholder": "key1, key2, key3.nestedKey1",
323
+ "optional": true,
324
+ "additionalParams": true,
325
+ "id": "fileLoader_0-input-omitMetadataKeys-string",
326
+ "display": true
327
+ }
328
+ ],
329
+ "inputAnchors": [
330
+ {
331
+ "label": "Text Splitter",
332
+ "name": "textSplitter",
333
+ "type": "TextSplitter",
334
+ "optional": true,
335
+ "id": "fileLoader_0-input-textSplitter-TextSplitter",
336
+ "display": true
337
+ }
338
+ ],
339
+ "inputs": {
340
+ "textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}",
341
+ "usage": "perPage",
342
+ "legacyBuild": "",
343
+ "pointerName": "",
344
+ "metadata": "",
345
+ "omitMetadataKeys": ""
346
+ },
347
+ "outputAnchors": [
348
+ {
349
+ "name": "output",
350
+ "label": "Output",
351
+ "type": "options",
352
+ "description": "Array of document objects containing metadata and pageContent",
353
+ "options": [
354
+ {
355
+ "id": "fileLoader_0-output-document-Document|json",
356
+ "name": "document",
357
+ "label": "Document",
358
+ "description": "Array of document objects containing metadata and pageContent",
359
+ "type": "Document | json"
360
+ },
361
+ {
362
+ "id": "fileLoader_0-output-text-string|json",
363
+ "name": "text",
364
+ "label": "Text",
365
+ "description": "Concatenated string from pageContent of documents",
366
+ "type": "string | json"
367
+ }
368
+ ],
369
+ "default": "document"
370
+ }
371
+ ],
372
+ "outputs": {
373
+ "output": "document"
374
+ },
375
+ "selected": false
376
+ },
377
+ "width": 300,
378
+ "height": 459,
379
+ "selected": false,
380
+ "positionAbsolute": {
381
+ "x": 650.8786850888786,
382
+ "y": -99.61017668321267
383
+ },
384
+ "dragging": false
385
+ },
386
+ {
387
+ "id": "memoryVectorStore_0",
388
+ "position": {
389
+ "x": 1223.0565194111455,
390
+ "y": 354.4959534107418
391
+ },
392
+ "type": "customNode",
393
+ "data": {
394
+ "id": "memoryVectorStore_0",
395
+ "label": "In-Memory Vector Store",
396
+ "version": 1,
397
+ "name": "memoryVectorStore",
398
+ "type": "Memory",
399
+ "baseClasses": [
400
+ "Memory",
401
+ "VectorStoreRetriever",
402
+ "BaseRetriever"
403
+ ],
404
+ "category": "Vector Stores",
405
+ "description": "In-memory vectorstore that stores embeddings and does an exact, linear search for the most similar embeddings.",
406
+ "inputParams": [
407
+ {
408
+ "label": "Top K",
409
+ "name": "topK",
410
+ "description": "Number of top results to fetch. Default to 4",
411
+ "placeholder": "4",
412
+ "type": "number",
413
+ "optional": true,
414
+ "id": "memoryVectorStore_0-input-topK-number",
415
+ "display": true
416
+ }
417
+ ],
418
+ "inputAnchors": [
419
+ {
420
+ "label": "Document",
421
+ "name": "document",
422
+ "type": "Document",
423
+ "list": true,
424
+ "optional": true,
425
+ "id": "memoryVectorStore_0-input-document-Document",
426
+ "display": true
427
+ },
428
+ {
429
+ "label": "Embeddings",
430
+ "name": "embeddings",
431
+ "type": "Embeddings",
432
+ "id": "memoryVectorStore_0-input-embeddings-Embeddings",
433
+ "display": true
434
+ }
435
+ ],
436
+ "inputs": {
437
+ "document": [
438
+ "{{fileLoader_0.data.instance}}",
439
+ "{{cheerioWebScraper_0.data.instance}}"
440
+ ],
441
+ "embeddings": "{{huggingFaceInferenceEmbeddings_0.data.instance}}",
442
+ "topK": ""
443
+ },
444
+ "outputAnchors": [
445
+ {
446
+ "name": "output",
447
+ "label": "Output",
448
+ "type": "options",
449
+ "description": "",
450
+ "options": [
451
+ {
452
+ "id": "memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever",
453
+ "name": "retriever",
454
+ "label": "Memory Retriever",
455
+ "description": "",
456
+ "type": "Memory | VectorStoreRetriever | BaseRetriever"
457
+ },
458
+ {
459
+ "id": "memoryVectorStore_0-output-vectorStore-Memory|VectorStore",
460
+ "name": "vectorStore",
461
+ "label": "Memory Vector Store",
462
+ "description": "",
463
+ "type": "Memory | VectorStore"
464
+ }
465
+ ],
466
+ "default": "retriever"
467
+ }
468
+ ],
469
+ "outputs": {
470
+ "output": "retriever"
471
+ },
472
+ "selected": false
473
+ },
474
+ "width": 300,
475
+ "height": 409,
476
+ "selected": false,
477
+ "positionAbsolute": {
478
+ "x": 1223.0565194111455,
479
+ "y": 354.4959534107418
480
+ },
481
+ "dragging": false
482
+ },
483
+ {
484
+ "id": "huggingFaceInferenceEmbeddings_0",
485
+ "position": {
486
+ "x": 800.5209198760278,
487
+ "y": 938.3403835917181
488
+ },
489
+ "type": "customNode",
490
+ "data": {
491
+ "id": "huggingFaceInferenceEmbeddings_0",
492
+ "label": "HuggingFace Inference Embeddings",
493
+ "version": 1,
494
+ "name": "huggingFaceInferenceEmbeddings",
495
+ "type": "HuggingFaceInferenceEmbeddings",
496
+ "baseClasses": [
497
+ "HuggingFaceInferenceEmbeddings",
498
+ "Embeddings"
499
+ ],
500
+ "category": "Embeddings",
501
+ "description": "HuggingFace Inference API to generate embeddings for a given text",
502
+ "inputParams": [
503
+ {
504
+ "label": "Connect Credential",
505
+ "name": "credential",
506
+ "type": "credential",
507
+ "credentialNames": [
508
+ "huggingFaceApi"
509
+ ],
510
+ "id": "huggingFaceInferenceEmbeddings_0-input-credential-credential",
511
+ "display": true
512
+ },
513
+ {
514
+ "label": "Model",
515
+ "name": "modelName",
516
+ "type": "string",
517
+ "description": "If using own inference endpoint, leave this blank",
518
+ "placeholder": "sentence-transformers/distilbert-base-nli-mean-tokens",
519
+ "optional": true,
520
+ "id": "huggingFaceInferenceEmbeddings_0-input-modelName-string",
521
+ "display": true
522
+ },
523
+ {
524
+ "label": "Endpoint",
525
+ "name": "endpoint",
526
+ "type": "string",
527
+ "placeholder": "https://xyz.eu-west-1.aws.endpoints.huggingface.cloud/sentence-transformers/all-MiniLM-L6-v2",
528
+ "description": "Using your own inference endpoint",
529
+ "optional": true,
530
+ "id": "huggingFaceInferenceEmbeddings_0-input-endpoint-string",
531
+ "display": true
532
+ }
533
+ ],
534
+ "inputAnchors": [],
535
+ "inputs": {
536
+ "modelName": "",
537
+ "endpoint": ""
538
+ },
539
+ "outputAnchors": [
540
+ {
541
+ "id": "huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings",
542
+ "name": "huggingFaceInferenceEmbeddings",
543
+ "label": "HuggingFaceInferenceEmbeddings",
544
+ "description": "HuggingFace Inference API to generate embeddings for a given text",
545
+ "type": "HuggingFaceInferenceEmbeddings | Embeddings"
546
+ }
547
+ ],
548
+ "outputs": {},
549
+ "selected": false
550
+ },
551
+ "width": 300,
552
+ "height": 475,
553
+ "selected": false,
554
+ "positionAbsolute": {
555
+ "x": 800.5209198760278,
556
+ "y": 938.3403835917181
557
+ },
558
+ "dragging": false
559
+ },
560
+ {
561
+ "id": "chatMistralAI_0",
562
+ "position": {
563
+ "x": 1595.917318086838,
564
+ "y": -45.513470613474084
565
+ },
566
+ "type": "customNode",
567
+ "data": {
568
+ "id": "chatMistralAI_0",
569
+ "label": "ChatMistralAI",
570
+ "version": 4,
571
+ "name": "chatMistralAI",
572
+ "type": "ChatMistralAI",
573
+ "baseClasses": [
574
+ "ChatMistralAI",
575
+ "BaseChatModel",
576
+ "BaseLanguageModel",
577
+ "Runnable"
578
+ ],
579
+ "category": "Chat Models",
580
+ "description": "Wrapper around Mistral large language models that use the Chat endpoint",
581
+ "inputParams": [
582
+ {
583
+ "label": "Connect Credential",
584
+ "name": "credential",
585
+ "type": "credential",
586
+ "credentialNames": [
587
+ "mistralAIApi"
588
+ ],
589
+ "id": "chatMistralAI_0-input-credential-credential",
590
+ "display": true
591
+ },
592
+ {
593
+ "label": "Model Name",
594
+ "name": "modelName",
595
+ "type": "asyncOptions",
596
+ "loadMethod": "listModels",
597
+ "default": "mistral-tiny",
598
+ "id": "chatMistralAI_0-input-modelName-asyncOptions",
599
+ "display": true
600
+ },
601
+ {
602
+ "label": "Temperature",
603
+ "name": "temperature",
604
+ "type": "number",
605
+ "description": "What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.",
606
+ "step": 0.1,
607
+ "default": 0.9,
608
+ "optional": true,
609
+ "id": "chatMistralAI_0-input-temperature-number",
610
+ "display": true
611
+ },
612
+ {
613
+ "label": "Streaming",
614
+ "name": "streaming",
615
+ "type": "boolean",
616
+ "default": true,
617
+ "optional": true,
618
+ "additionalParams": true,
619
+ "id": "chatMistralAI_0-input-streaming-boolean",
620
+ "display": true
621
+ },
622
+ {
623
+ "label": "Max Output Tokens",
624
+ "name": "maxOutputTokens",
625
+ "type": "number",
626
+ "description": "The maximum number of tokens to generate in the completion.",
627
+ "step": 1,
628
+ "optional": true,
629
+ "additionalParams": true,
630
+ "id": "chatMistralAI_0-input-maxOutputTokens-number",
631
+ "display": true
632
+ },
633
+ {
634
+ "label": "Top Probability",
635
+ "name": "topP",
636
+ "type": "number",
637
+ "description": "Nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.",
638
+ "step": 0.1,
639
+ "optional": true,
640
+ "additionalParams": true,
641
+ "id": "chatMistralAI_0-input-topP-number",
642
+ "display": true
643
+ },
644
+ {
645
+ "label": "Random Seed",
646
+ "name": "randomSeed",
647
+ "type": "number",
648
+ "description": "The seed to use for random sampling. If set, different calls will generate deterministic results.",
649
+ "step": 1,
650
+ "optional": true,
651
+ "additionalParams": true,
652
+ "id": "chatMistralAI_0-input-randomSeed-number",
653
+ "display": true
654
+ },
655
+ {
656
+ "label": "Safe Mode",
657
+ "name": "safeMode",
658
+ "type": "boolean",
659
+ "description": "Whether to inject a safety prompt before all conversations.",
660
+ "optional": true,
661
+ "additionalParams": true,
662
+ "id": "chatMistralAI_0-input-safeMode-boolean",
663
+ "display": true
664
+ },
665
+ {
666
+ "label": "Override Endpoint",
667
+ "name": "overrideEndpoint",
668
+ "type": "string",
669
+ "optional": true,
670
+ "additionalParams": true,
671
+ "id": "chatMistralAI_0-input-overrideEndpoint-string",
672
+ "display": true
673
+ }
674
+ ],
675
+ "inputAnchors": [
676
+ {
677
+ "label": "Cache",
678
+ "name": "cache",
679
+ "type": "BaseCache",
680
+ "optional": true,
681
+ "id": "chatMistralAI_0-input-cache-BaseCache",
682
+ "display": true
683
+ }
684
+ ],
685
+ "inputs": {
686
+ "cache": "",
687
+ "modelName": "mistral-tiny",
688
+ "temperature": 0.9,
689
+ "streaming": true,
690
+ "maxOutputTokens": "",
691
+ "topP": "",
692
+ "randomSeed": "",
693
+ "safeMode": "",
694
+ "overrideEndpoint": ""
695
+ },
696
+ "outputAnchors": [
697
+ {
698
+ "id": "chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable",
699
+ "name": "chatMistralAI",
700
+ "label": "ChatMistralAI",
701
+ "description": "Wrapper around Mistral large language models that use the Chat endpoint",
702
+ "type": "ChatMistralAI | BaseChatModel | BaseLanguageModel | Runnable"
703
+ }
704
+ ],
705
+ "outputs": {},
706
+ "selected": false
707
+ },
708
+ "width": 300,
709
+ "height": 574,
710
+ "selected": false,
711
+ "positionAbsolute": {
712
+ "x": 1595.917318086838,
713
+ "y": -45.513470613474084
714
+ },
715
+ "dragging": false
716
+ },
717
+ {
718
+ "id": "conversationalRetrievalQAChain_0",
719
+ "position": {
720
+ "x": 2050.4776365303856,
721
+ "y": 510.2391804991254
722
+ },
723
+ "type": "customNode",
724
+ "data": {
725
+ "id": "conversationalRetrievalQAChain_0",
726
+ "label": "Conversational Retrieval QA Chain",
727
+ "version": 3,
728
+ "name": "conversationalRetrievalQAChain",
729
+ "type": "ConversationalRetrievalQAChain",
730
+ "baseClasses": [
731
+ "ConversationalRetrievalQAChain",
732
+ "BaseChain",
733
+ "Runnable"
734
+ ],
735
+ "category": "Chains",
736
+ "description": "Document QA - built on RetrievalQAChain to provide a chat history component",
737
+ "inputParams": [
738
+ {
739
+ "label": "Return Source Documents",
740
+ "name": "returnSourceDocuments",
741
+ "type": "boolean",
742
+ "optional": true,
743
+ "id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean",
744
+ "display": true
745
+ },
746
+ {
747
+ "label": "Rephrase Prompt",
748
+ "name": "rephrasePrompt",
749
+ "type": "string",
750
+ "description": "Using previous chat history, rephrase question into a standalone question",
751
+ "warning": "Prompt must include input variables: {chat_history} and {question}",
752
+ "rows": 4,
753
+ "additionalParams": true,
754
+ "optional": true,
755
+ "default": "Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.\n\nChat History:\n{chat_history}\nFollow Up Input: {question}\nStandalone Question:",
756
+ "id": "conversationalRetrievalQAChain_0-input-rephrasePrompt-string",
757
+ "display": true
758
+ },
759
+ {
760
+ "label": "Response Prompt",
761
+ "name": "responsePrompt",
762
+ "type": "string",
763
+ "description": "Taking the rephrased question, search for answer from the provided context",
764
+ "warning": "Prompt must include input variable: {context}",
765
+ "rows": 4,
766
+ "additionalParams": true,
767
+ "optional": true,
768
+ "default": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". Using the provided context, answer the user's question to the best of your ability using the resources provided.\nIf there is nothing in the context relevant to the question at hand, just say \"Hmm, I'm not sure\" and stop after that. Refuse to answer any question not about the info. Never break character.\n------------\n{context}\n------------\nREMEMBER: If there is no relevant information within the context, just say \"Hmm, I'm not sure\". Don't try to make up an answer. Never break character.",
769
+ "id": "conversationalRetrievalQAChain_0-input-responsePrompt-string",
770
+ "display": true
771
+ }
772
+ ],
773
+ "inputAnchors": [
774
+ {
775
+ "label": "Chat Model",
776
+ "name": "model",
777
+ "type": "BaseChatModel",
778
+ "id": "conversationalRetrievalQAChain_0-input-model-BaseChatModel",
779
+ "display": true
780
+ },
781
+ {
782
+ "label": "Vector Store Retriever",
783
+ "name": "vectorStoreRetriever",
784
+ "type": "BaseRetriever",
785
+ "id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
786
+ "display": true
787
+ },
788
+ {
789
+ "label": "Memory",
790
+ "name": "memory",
791
+ "type": "BaseMemory",
792
+ "optional": true,
793
+ "description": "If left empty, a default BufferMemory will be used",
794
+ "id": "conversationalRetrievalQAChain_0-input-memory-BaseMemory",
795
+ "display": true
796
+ },
797
+ {
798
+ "label": "Input Moderation",
799
+ "description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
800
+ "name": "inputModeration",
801
+ "type": "Moderation",
802
+ "optional": true,
803
+ "list": true,
804
+ "id": "conversationalRetrievalQAChain_0-input-inputModeration-Moderation",
805
+ "display": true
806
+ }
807
+ ],
808
+ "inputs": {
809
+ "model": "{{chatMistralAI_0.data.instance}}",
810
+ "vectorStoreRetriever": "{{memoryVectorStore_0.data.instance}}",
811
+ "memory": "{{bufferMemory_0.data.instance}}",
812
+ "returnSourceDocuments": "",
813
+ "rephrasePrompt": "Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.\n\nChat History:\n{chat_history}\nFollow Up Input: {question}\nStandalone Question:",
814
+ "responsePrompt": "I want you to act as a document that I am having a conversation with. Your name is \"AI Assistant\". Using the provided context, answer the user's question to the best of your ability using the resources provided.\nIf there is nothing in the context relevant to the question at hand, just say \"Hmm, I'm not sure\" and stop after that. Refuse to answer any question not about the info. Never break character.\n------------\n{context}\n------------\nREMEMBER: If there is no relevant information within the context, just say \"Hmm, I'm not sure\". Don't try to make up an answer. Never break character.",
815
+ "inputModeration": ""
816
+ },
817
+ "outputAnchors": [
818
+ {
819
+ "id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|Runnable",
820
+ "name": "conversationalRetrievalQAChain",
821
+ "label": "ConversationalRetrievalQAChain",
822
+ "description": "Document QA - built on RetrievalQAChain to provide a chat history component",
823
+ "type": "ConversationalRetrievalQAChain | BaseChain | Runnable"
824
+ }
825
+ ],
826
+ "outputs": {},
827
+ "selected": false
828
+ },
829
+ "width": 300,
830
+ "height": 532,
831
+ "selected": false,
832
+ "positionAbsolute": {
833
+ "x": 2050.4776365303856,
834
+ "y": 510.2391804991254
835
+ },
836
+ "dragging": false
837
+ },
838
+ {
839
+ "id": "bufferMemory_0",
840
+ "position": {
841
+ "x": 1582.3823941244955,
842
+ "y": 983.0773590603847
843
+ },
844
+ "type": "customNode",
845
+ "data": {
846
+ "id": "bufferMemory_0",
847
+ "label": "Buffer Memory",
848
+ "version": 2,
849
+ "name": "bufferMemory",
850
+ "type": "BufferMemory",
851
+ "baseClasses": [
852
+ "BufferMemory",
853
+ "BaseChatMemory",
854
+ "BaseMemory"
855
+ ],
856
+ "category": "Memory",
857
+ "description": "Retrieve chat messages stored in database",
858
+ "inputParams": [
859
+ {
860
+ "label": "Session Id",
861
+ "name": "sessionId",
862
+ "type": "string",
863
+ "description": "If not specified, a random id will be used. Learn <a target=\"_blank\" href=\"https://docs.flowiseai.com/memory#ui-and-embedded-chat\">more</a>",
864
+ "default": "",
865
+ "additionalParams": true,
866
+ "optional": true,
867
+ "id": "bufferMemory_0-input-sessionId-string",
868
+ "display": true
869
+ },
870
+ {
871
+ "label": "Memory Key",
872
+ "name": "memoryKey",
873
+ "type": "string",
874
+ "default": "chat_history",
875
+ "additionalParams": true,
876
+ "id": "bufferMemory_0-input-memoryKey-string",
877
+ "display": true
878
+ }
879
+ ],
880
+ "inputAnchors": [],
881
+ "inputs": {
882
+ "sessionId": "",
883
+ "memoryKey": "chat_history"
884
+ },
885
+ "outputAnchors": [
886
+ {
887
+ "id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
888
+ "name": "bufferMemory",
889
+ "label": "BufferMemory",
890
+ "description": "Retrieve chat messages stored in database",
891
+ "type": "BufferMemory | BaseChatMemory | BaseMemory"
892
+ }
893
+ ],
894
+ "outputs": {},
895
+ "selected": false
896
+ },
897
+ "width": 300,
898
+ "height": 256,
899
+ "selected": false,
900
+ "positionAbsolute": {
901
+ "x": 1582.3823941244955,
902
+ "y": 983.0773590603847
903
+ },
904
+ "dragging": false
905
+ }
906
+ ],
907
+ "edges": [
908
+ {
909
+ "source": "recursiveCharacterTextSplitter_0",
910
+ "sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
911
+ "target": "cheerioWebScraper_0",
912
+ "targetHandle": "cheerioWebScraper_0-input-textSplitter-TextSplitter",
913
+ "type": "buttonedge",
914
+ "id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-cheerioWebScraper_0-cheerioWebScraper_0-input-textSplitter-TextSplitter"
915
+ },
916
+ {
917
+ "source": "recursiveCharacterTextSplitter_0",
918
+ "sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable",
919
+ "target": "fileLoader_0",
920
+ "targetHandle": "fileLoader_0-input-textSplitter-TextSplitter",
921
+ "type": "buttonedge",
922
+ "id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-fileLoader_0-fileLoader_0-input-textSplitter-TextSplitter"
923
+ },
924
+ {
925
+ "source": "fileLoader_0",
926
+ "sourceHandle": "fileLoader_0-output-document-Document|json",
927
+ "target": "memoryVectorStore_0",
928
+ "targetHandle": "memoryVectorStore_0-input-document-Document",
929
+ "type": "buttonedge",
930
+ "id": "fileLoader_0-fileLoader_0-output-document-Document|json-memoryVectorStore_0-memoryVectorStore_0-input-document-Document"
931
+ },
932
+ {
933
+ "source": "cheerioWebScraper_0",
934
+ "sourceHandle": "cheerioWebScraper_0-output-document-Document|json",
935
+ "target": "memoryVectorStore_0",
936
+ "targetHandle": "memoryVectorStore_0-input-document-Document",
937
+ "type": "buttonedge",
938
+ "id": "cheerioWebScraper_0-cheerioWebScraper_0-output-document-Document|json-memoryVectorStore_0-memoryVectorStore_0-input-document-Document"
939
+ },
940
+ {
941
+ "source": "huggingFaceInferenceEmbeddings_0",
942
+ "sourceHandle": "huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings",
943
+ "target": "memoryVectorStore_0",
944
+ "targetHandle": "memoryVectorStore_0-input-embeddings-Embeddings",
945
+ "type": "buttonedge",
946
+ "id": "huggingFaceInferenceEmbeddings_0-huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings-memoryVectorStore_0-memoryVectorStore_0-input-embeddings-Embeddings"
947
+ },
948
+ {
949
+ "source": "chatMistralAI_0",
950
+ "sourceHandle": "chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable",
951
+ "target": "conversationalRetrievalQAChain_0",
952
+ "targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseChatModel",
953
+ "type": "buttonedge",
954
+ "id": "chatMistralAI_0-chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseChatModel"
955
+ },
956
+ {
957
+ "source": "memoryVectorStore_0",
958
+ "sourceHandle": "memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever",
959
+ "target": "conversationalRetrievalQAChain_0",
960
+ "targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
961
+ "type": "buttonedge",
962
+ "id": "memoryVectorStore_0-memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
963
+ },
964
+ {
965
+ "source": "bufferMemory_0",
966
+ "sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
967
+ "target": "conversationalRetrievalQAChain_0",
968
+ "targetHandle": "conversationalRetrievalQAChain_0-input-memory-BaseMemory",
969
+ "type": "buttonedge",
970
+ "id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-memory-BaseMemory"
971
+ }
972
+ ]
973
+ }