Flowise

Форк
0
696 строк · 34.5 Кб
1
{
2
    "description": "QnA chain using Ollama local LLM, LocalAI embedding model, and Faiss local vector store",
3
    "badge": "POPULAR",
4
    "categories": "Text File,ChatOllama,Conversational Retrieval QA Chain,Faiss,Langchain",
5
    "framework": "Langchain",
6
    "nodes": [
7
        {
8
            "width": 300,
9
            "height": 429,
10
            "id": "recursiveCharacterTextSplitter_1",
11
            "position": {
12
                "x": 424.5721426652516,
13
                "y": 122.99825010325736
14
            },
15
            "type": "customNode",
16
            "data": {
17
                "id": "recursiveCharacterTextSplitter_1",
18
                "label": "Recursive Character Text Splitter",
19
                "version": 2,
20
                "name": "recursiveCharacterTextSplitter",
21
                "type": "RecursiveCharacterTextSplitter",
22
                "baseClasses": ["RecursiveCharacterTextSplitter", "TextSplitter"],
23
                "category": "Text Splitters",
24
                "description": "Split documents recursively by different characters - starting with \"\n\n\", then \"\n\", then \" \"",
25
                "inputParams": [
26
                    {
27
                        "label": "Chunk Size",
28
                        "name": "chunkSize",
29
                        "type": "number",
30
                        "default": 1000,
31
                        "optional": true,
32
                        "id": "recursiveCharacterTextSplitter_1-input-chunkSize-number"
33
                    },
34
                    {
35
                        "label": "Chunk Overlap",
36
                        "name": "chunkOverlap",
37
                        "type": "number",
38
                        "optional": true,
39
                        "id": "recursiveCharacterTextSplitter_1-input-chunkOverlap-number"
40
                    },
41
                    {
42
                        "label": "Custom Separators",
43
                        "name": "separators",
44
                        "type": "string",
45
                        "rows": 4,
46
                        "description": "Array of custom separators to determine when to split the text, will override the default separators",
47
                        "placeholder": "[\"|\", \"##\", \">\", \"-\"]",
48
                        "additionalParams": true,
49
                        "optional": true,
50
                        "id": "recursiveCharacterTextSplitter_1-input-separators-string"
51
                    }
52
                ],
53
                "inputAnchors": [],
54
                "inputs": {
55
                    "chunkSize": 1000,
56
                    "chunkOverlap": ""
57
                },
58
                "outputAnchors": [
59
                    {
60
                        "id": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
61
                        "name": "recursiveCharacterTextSplitter",
62
                        "label": "RecursiveCharacterTextSplitter",
63
                        "type": "RecursiveCharacterTextSplitter | TextSplitter"
64
                    }
65
                ],
66
                "outputs": {},
67
                "selected": false
68
            },
69
            "selected": false,
70
            "positionAbsolute": {
71
                "x": 424.5721426652516,
72
                "y": 122.99825010325736
73
            },
74
            "dragging": false
75
        },
76
        {
77
            "width": 300,
78
            "height": 480,
79
            "id": "conversationalRetrievalQAChain_0",
80
            "position": {
81
                "x": 1604.8865818627112,
82
                "y": 329.6333122200366
83
            },
84
            "type": "customNode",
85
            "data": {
86
                "id": "conversationalRetrievalQAChain_0",
87
                "label": "Conversational Retrieval QA Chain",
88
                "version": 3,
89
                "name": "conversationalRetrievalQAChain",
90
                "type": "ConversationalRetrievalQAChain",
91
                "baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "Runnable"],
92
                "category": "Chains",
93
                "description": "Document QA - built on RetrievalQAChain to provide a chat history component",
94
                "inputParams": [
95
                    {
96
                        "label": "Return Source Documents",
97
                        "name": "returnSourceDocuments",
98
                        "type": "boolean",
99
                        "optional": true,
100
                        "id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
101
                    },
102
                    {
103
                        "label": "Rephrase Prompt",
104
                        "name": "rephrasePrompt",
105
                        "type": "string",
106
                        "description": "Using previous chat history, rephrase question into a standalone question",
107
                        "warning": "Prompt must include input variables: {chat_history} and {question}",
108
                        "rows": 4,
109
                        "additionalParams": true,
110
                        "optional": true,
111
                        "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:",
112
                        "id": "conversationalRetrievalQAChain_0-input-rephrasePrompt-string"
113
                    },
114
                    {
115
                        "label": "Response Prompt",
116
                        "name": "responsePrompt",
117
                        "type": "string",
118
                        "description": "Taking the rephrased question, search for answer from the provided context",
119
                        "warning": "Prompt must include input variable: {context}",
120
                        "rows": 4,
121
                        "additionalParams": true,
122
                        "optional": true,
123
                        "default": "You are a helpful 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.\" Don't try to make up an answer.\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.",
124
                        "id": "conversationalRetrievalQAChain_0-input-responsePrompt-string"
125
                    }
126
                ],
127
                "inputAnchors": [
128
                    {
129
                        "label": "Chat Model",
130
                        "name": "model",
131
                        "type": "BaseChatModel",
132
                        "id": "conversationalRetrievalQAChain_0-input-model-BaseChatModel"
133
                    },
134
                    {
135
                        "label": "Vector Store Retriever",
136
                        "name": "vectorStoreRetriever",
137
                        "type": "BaseRetriever",
138
                        "id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
139
                    },
140
                    {
141
                        "label": "Memory",
142
                        "name": "memory",
143
                        "type": "BaseMemory",
144
                        "optional": true,
145
                        "description": "If left empty, a default BufferMemory will be used",
146
                        "id": "conversationalRetrievalQAChain_0-input-memory-BaseMemory"
147
                    },
148
                    {
149
                        "label": "Input Moderation",
150
                        "description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
151
                        "name": "inputModeration",
152
                        "type": "Moderation",
153
                        "optional": true,
154
                        "list": true,
155
                        "id": "conversationalRetrievalQAChain_0-input-inputModeration-Moderation"
156
                    }
157
                ],
158
                "inputs": {
159
                    "inputModeration": "",
160
                    "model": "{{chatOllama_0.data.instance}}",
161
                    "vectorStoreRetriever": "{{faiss_0.data.instance}}",
162
                    "memory": "",
163
                    "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:",
164
                    "responsePrompt": "You are a helpful 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.\" Don't try to make up an answer.\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."
165
                },
166
                "outputAnchors": [
167
                    {
168
                        "id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|Runnable",
169
                        "name": "conversationalRetrievalQAChain",
170
                        "label": "ConversationalRetrievalQAChain",
171
                        "type": "ConversationalRetrievalQAChain | BaseChain | Runnable"
172
                    }
173
                ],
174
                "outputs": {},
175
                "selected": false
176
            },
177
            "selected": false,
178
            "positionAbsolute": {
179
                "x": 1604.8865818627112,
180
                "y": 329.6333122200366
181
            },
182
            "dragging": false
183
        },
184
        {
185
            "width": 300,
186
            "height": 419,
187
            "id": "textFile_0",
188
            "position": {
189
                "x": 809.5432731751458,
190
                "y": 55.85095796777051
191
            },
192
            "type": "customNode",
193
            "data": {
194
                "id": "textFile_0",
195
                "label": "Text File",
196
                "version": 3,
197
                "name": "textFile",
198
                "type": "Document",
199
                "baseClasses": ["Document"],
200
                "category": "Document Loaders",
201
                "description": "Load data from text files",
202
                "inputParams": [
203
                    {
204
                        "label": "Txt File",
205
                        "name": "txtFile",
206
                        "type": "file",
207
                        "fileType": ".txt, .html, .aspx, .asp, .cpp, .c, .cs, .css, .go, .h, .java, .js, .less, .ts, .php, .proto, .python, .py, .rst, .ruby, .rb, .rs, .scala, .sc, .scss, .sol, .sql, .swift, .markdown, .md, .tex, .ltx, .vb, .xml",
208
                        "id": "textFile_0-input-txtFile-file"
209
                    },
210
                    {
211
                        "label": "Metadata",
212
                        "name": "metadata",
213
                        "type": "json",
214
                        "optional": true,
215
                        "additionalParams": true,
216
                        "id": "textFile_0-input-metadata-json"
217
                    }
218
                ],
219
                "inputAnchors": [
220
                    {
221
                        "label": "Text Splitter",
222
                        "name": "textSplitter",
223
                        "type": "TextSplitter",
224
                        "optional": true,
225
                        "id": "textFile_0-input-textSplitter-TextSplitter"
226
                    }
227
                ],
228
                "inputs": {
229
                    "textSplitter": "{{recursiveCharacterTextSplitter_1.data.instance}}",
230
                    "metadata": ""
231
                },
232
                "outputAnchors": [
233
                    {
234
                        "name": "output",
235
                        "label": "Output",
236
                        "type": "options",
237
                        "options": [
238
                            {
239
                                "id": "textFile_0-output-document-Document|json",
240
                                "name": "document",
241
                                "label": "Document",
242
                                "type": "Document | json"
243
                            },
244
                            {
245
                                "id": "textFile_0-output-text-string|json",
246
                                "name": "text",
247
                                "label": "Text",
248
                                "type": "string | json"
249
                            }
250
                        ],
251
                        "default": "document"
252
                    }
253
                ],
254
                "outputs": {
255
                    "output": "document"
256
                },
257
                "selected": false
258
            },
259
            "selected": false,
260
            "positionAbsolute": {
261
                "x": 809.5432731751458,
262
                "y": 55.85095796777051
263
            },
264
            "dragging": false
265
        },
266
        {
267
            "width": 300,
268
            "height": 376,
269
            "id": "localAIEmbeddings_0",
270
            "position": {
271
                "x": 809.5432731751458,
272
                "y": 507.4586304746849
273
            },
274
            "type": "customNode",
275
            "data": {
276
                "id": "localAIEmbeddings_0",
277
                "label": "LocalAI Embeddings",
278
                "version": 1,
279
                "name": "localAIEmbeddings",
280
                "type": "LocalAI Embeddings",
281
                "baseClasses": ["LocalAI Embeddings", "Embeddings"],
282
                "category": "Embeddings",
283
                "description": "Use local embeddings models like llama.cpp",
284
                "inputParams": [
285
                    {
286
                        "label": "Base Path",
287
                        "name": "basePath",
288
                        "type": "string",
289
                        "placeholder": "http://localhost:8080/v1",
290
                        "id": "localAIEmbeddings_0-input-basePath-string"
291
                    },
292
                    {
293
                        "label": "Model Name",
294
                        "name": "modelName",
295
                        "type": "string",
296
                        "placeholder": "text-embedding-ada-002",
297
                        "id": "localAIEmbeddings_0-input-modelName-string"
298
                    }
299
                ],
300
                "inputAnchors": [],
301
                "inputs": {
302
                    "basePath": "http://localhost:8080/v1",
303
                    "modelName": "text-embedding-ada-002"
304
                },
305
                "outputAnchors": [
306
                    {
307
                        "id": "localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings",
308
                        "name": "localAIEmbeddings",
309
                        "label": "LocalAI Embeddings",
310
                        "type": "LocalAI Embeddings | Embeddings"
311
                    }
312
                ],
313
                "outputs": {},
314
                "selected": false
315
            },
316
            "selected": false,
317
            "positionAbsolute": {
318
                "x": 809.5432731751458,
319
                "y": 507.4586304746849
320
            },
321
            "dragging": false
322
        },
323
        {
324
            "width": 300,
325
            "height": 578,
326
            "id": "chatOllama_0",
327
            "position": {
328
                "x": 1198.006914501795,
329
                "y": -78.92345253481488
330
            },
331
            "type": "customNode",
332
            "data": {
333
                "id": "chatOllama_0",
334
                "label": "ChatOllama",
335
                "version": 2,
336
                "name": "chatOllama",
337
                "type": "ChatOllama",
338
                "baseClasses": ["ChatOllama", "SimpleChatModel", "BaseChatModel", "BaseLanguageModel", "Runnable"],
339
                "category": "Chat Models",
340
                "description": "Chat completion using open-source LLM on Ollama",
341
                "inputParams": [
342
                    {
343
                        "label": "Base URL",
344
                        "name": "baseUrl",
345
                        "type": "string",
346
                        "default": "http://localhost:11434",
347
                        "id": "chatOllama_0-input-baseUrl-string"
348
                    },
349
                    {
350
                        "label": "Model Name",
351
                        "name": "modelName",
352
                        "type": "string",
353
                        "placeholder": "llama2",
354
                        "id": "chatOllama_0-input-modelName-string"
355
                    },
356
                    {
357
                        "label": "Temperature",
358
                        "name": "temperature",
359
                        "type": "number",
360
                        "description": "The temperature of the model. Increasing the temperature will make the model answer more creatively. (Default: 0.8). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
361
                        "step": 0.1,
362
                        "default": 0.9,
363
                        "optional": true,
364
                        "id": "chatOllama_0-input-temperature-number"
365
                    },
366
                    {
367
                        "label": "Top P",
368
                        "name": "topP",
369
                        "type": "number",
370
                        "description": "Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text. (Default: 0.9). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
371
                        "step": 0.1,
372
                        "optional": true,
373
                        "additionalParams": true,
374
                        "id": "chatOllama_0-input-topP-number"
375
                    },
376
                    {
377
                        "label": "Top K",
378
                        "name": "topK",
379
                        "type": "number",
380
                        "description": "Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative. (Default: 40). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
381
                        "step": 1,
382
                        "optional": true,
383
                        "additionalParams": true,
384
                        "id": "chatOllama_0-input-topK-number"
385
                    },
386
                    {
387
                        "label": "Mirostat",
388
                        "name": "mirostat",
389
                        "type": "number",
390
                        "description": "Enable Mirostat sampling for controlling perplexity. (default: 0, 0 = disabled, 1 = Mirostat, 2 = Mirostat 2.0). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
391
                        "step": 1,
392
                        "optional": true,
393
                        "additionalParams": true,
394
                        "id": "chatOllama_0-input-mirostat-number"
395
                    },
396
                    {
397
                        "label": "Mirostat ETA",
398
                        "name": "mirostatEta",
399
                        "type": "number",
400
                        "description": "Influences how quickly the algorithm responds to feedback from the generated text. A lower learning rate will result in slower adjustments, while a higher learning rate will make the algorithm more responsive. (Default: 0.1) Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
401
                        "step": 0.1,
402
                        "optional": true,
403
                        "additionalParams": true,
404
                        "id": "chatOllama_0-input-mirostatEta-number"
405
                    },
406
                    {
407
                        "label": "Mirostat TAU",
408
                        "name": "mirostatTau",
409
                        "type": "number",
410
                        "description": "Controls the balance between coherence and diversity of the output. A lower value will result in more focused and coherent text. (Default: 5.0) Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
411
                        "step": 0.1,
412
                        "optional": true,
413
                        "additionalParams": true,
414
                        "id": "chatOllama_0-input-mirostatTau-number"
415
                    },
416
                    {
417
                        "label": "Context Window Size",
418
                        "name": "numCtx",
419
                        "type": "number",
420
                        "description": "Sets the size of the context window used to generate the next token. (Default: 2048) Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
421
                        "step": 1,
422
                        "optional": true,
423
                        "additionalParams": true,
424
                        "id": "chatOllama_0-input-numCtx-number"
425
                    },
426
                    {
427
                        "label": "Number of GQA groups",
428
                        "name": "numGqa",
429
                        "type": "number",
430
                        "description": "The number of GQA groups in the transformer layer. Required for some models, for example it is 8 for llama2:70b. Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
431
                        "step": 1,
432
                        "optional": true,
433
                        "additionalParams": true,
434
                        "id": "chatOllama_0-input-numGqa-number"
435
                    },
436
                    {
437
                        "label": "Number of GPU",
438
                        "name": "numGpu",
439
                        "type": "number",
440
                        "description": "The number of layers to send to the GPU(s). On macOS it defaults to 1 to enable metal support, 0 to disable. Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
441
                        "step": 1,
442
                        "optional": true,
443
                        "additionalParams": true,
444
                        "id": "chatOllama_0-input-numGpu-number"
445
                    },
446
                    {
447
                        "label": "Number of Thread",
448
                        "name": "numThread",
449
                        "type": "number",
450
                        "description": "Sets the number of threads to use during computation. By default, Ollama will detect this for optimal performance. It is recommended to set this value to the number of physical CPU cores your system has (as opposed to the logical number of cores). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
451
                        "step": 1,
452
                        "optional": true,
453
                        "additionalParams": true,
454
                        "id": "chatOllama_0-input-numThread-number"
455
                    },
456
                    {
457
                        "label": "Repeat Last N",
458
                        "name": "repeatLastN",
459
                        "type": "number",
460
                        "description": "Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
461
                        "step": 1,
462
                        "optional": true,
463
                        "additionalParams": true,
464
                        "id": "chatOllama_0-input-repeatLastN-number"
465
                    },
466
                    {
467
                        "label": "Repeat Penalty",
468
                        "name": "repeatPenalty",
469
                        "type": "number",
470
                        "description": "Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. (Default: 1.1). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
471
                        "step": 0.1,
472
                        "optional": true,
473
                        "additionalParams": true,
474
                        "id": "chatOllama_0-input-repeatPenalty-number"
475
                    },
476
                    {
477
                        "label": "Stop Sequence",
478
                        "name": "stop",
479
                        "type": "string",
480
                        "rows": 4,
481
                        "placeholder": "AI assistant:",
482
                        "description": "Sets the stop sequences to use. Use comma to seperate different sequences. Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
483
                        "optional": true,
484
                        "additionalParams": true,
485
                        "id": "chatOllama_0-input-stop-string"
486
                    },
487
                    {
488
                        "label": "Tail Free Sampling",
489
                        "name": "tfsZ",
490
                        "type": "number",
491
                        "description": "Tail free sampling is used to reduce the impact of less probable tokens from the output. A higher value (e.g., 2.0) will reduce the impact more, while a value of 1.0 disables this setting. (Default: 1). Refer to <a target=\"_blank\" href=\"https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values\">docs</a> for more details",
492
                        "step": 0.1,
493
                        "optional": true,
494
                        "additionalParams": true,
495
                        "id": "chatOllama_0-input-tfsZ-number"
496
                    }
497
                ],
498
                "inputAnchors": [
499
                    {
500
                        "label": "Cache",
501
                        "name": "cache",
502
                        "type": "BaseCache",
503
                        "optional": true,
504
                        "id": "chatOllama_0-input-cache-BaseCache"
505
                    }
506
                ],
507
                "inputs": {
508
                    "cache": "",
509
                    "baseUrl": "http://localhost:11434",
510
                    "modelName": "llama2",
511
                    "temperature": 0.9,
512
                    "topP": "",
513
                    "topK": "",
514
                    "mirostat": "",
515
                    "mirostatEta": "",
516
                    "mirostatTau": "",
517
                    "numCtx": "",
518
                    "numGqa": "",
519
                    "numGpu": "",
520
                    "numThread": "",
521
                    "repeatLastN": "",
522
                    "repeatPenalty": "",
523
                    "stop": "",
524
                    "tfsZ": ""
525
                },
526
                "outputAnchors": [
527
                    {
528
                        "id": "chatOllama_0-output-chatOllama-ChatOllama|SimpleChatModel|BaseChatModel|BaseLanguageModel|Runnable",
529
                        "name": "chatOllama",
530
                        "label": "ChatOllama",
531
                        "type": "ChatOllama | SimpleChatModel | BaseChatModel | BaseLanguageModel | Runnable"
532
                    }
533
                ],
534
                "outputs": {},
535
                "selected": false
536
            },
537
            "selected": false,
538
            "positionAbsolute": {
539
                "x": 1198.006914501795,
540
                "y": -78.92345253481488
541
            },
542
            "dragging": false
543
        },
544
        {
545
            "width": 300,
546
            "height": 458,
547
            "id": "faiss_0",
548
            "position": {
549
                "x": 1199.3135683364685,
550
                "y": 520.9300176396024
551
            },
552
            "type": "customNode",
553
            "data": {
554
                "id": "faiss_0",
555
                "label": "Faiss",
556
                "version": 1,
557
                "name": "faiss",
558
                "type": "Faiss",
559
                "baseClasses": ["Faiss", "VectorStoreRetriever", "BaseRetriever"],
560
                "category": "Vector Stores",
561
                "description": "Upsert embedded data and perform similarity search upon query using Faiss library from Meta",
562
                "inputParams": [
563
                    {
564
                        "label": "Base Path to load",
565
                        "name": "basePath",
566
                        "description": "Path to load faiss.index file",
567
                        "placeholder": "C:\\Users\\User\\Desktop",
568
                        "type": "string",
569
                        "id": "faiss_0-input-basePath-string"
570
                    },
571
                    {
572
                        "label": "Top K",
573
                        "name": "topK",
574
                        "description": "Number of top results to fetch. Default to 4",
575
                        "placeholder": "4",
576
                        "type": "number",
577
                        "additionalParams": true,
578
                        "optional": true,
579
                        "id": "faiss_0-input-topK-number"
580
                    }
581
                ],
582
                "inputAnchors": [
583
                    {
584
                        "label": "Document",
585
                        "name": "document",
586
                        "type": "Document",
587
                        "list": true,
588
                        "optional": true,
589
                        "id": "faiss_0-input-document-Document"
590
                    },
591
                    {
592
                        "label": "Embeddings",
593
                        "name": "embeddings",
594
                        "type": "Embeddings",
595
                        "id": "faiss_0-input-embeddings-Embeddings"
596
                    }
597
                ],
598
                "inputs": {
599
                    "document": ["{{textFile_0.data.instance}}"],
600
                    "embeddings": "{{localAIEmbeddings_0.data.instance}}",
601
                    "basePath": "C:\\Users\\your-folder",
602
                    "topK": ""
603
                },
604
                "outputAnchors": [
605
                    {
606
                        "name": "output",
607
                        "label": "Output",
608
                        "type": "options",
609
                        "options": [
610
                            {
611
                                "id": "faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
612
                                "name": "retriever",
613
                                "label": "Faiss Retriever",
614
                                "type": "Faiss | VectorStoreRetriever | BaseRetriever"
615
                            },
616
                            {
617
                                "id": "faiss_0-output-vectorStore-Faiss|SaveableVectorStore|VectorStore",
618
                                "name": "vectorStore",
619
                                "label": "Faiss Vector Store",
620
                                "type": "Faiss | SaveableVectorStore | VectorStore"
621
                            }
622
                        ],
623
                        "default": "retriever"
624
                    }
625
                ],
626
                "outputs": {
627
                    "output": "retriever"
628
                },
629
                "selected": false
630
            },
631
            "selected": false,
632
            "positionAbsolute": {
633
                "x": 1199.3135683364685,
634
                "y": 520.9300176396024
635
            },
636
            "dragging": false
637
        }
638
    ],
639
    "edges": [
640
        {
641
            "source": "recursiveCharacterTextSplitter_1",
642
            "sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
643
            "target": "textFile_0",
644
            "targetHandle": "textFile_0-input-textSplitter-TextSplitter",
645
            "type": "buttonedge",
646
            "id": "recursiveCharacterTextSplitter_1-recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-textFile_0-textFile_0-input-textSplitter-TextSplitter",
647
            "data": {
648
                "label": ""
649
            }
650
        },
651
        {
652
            "source": "chatOllama_0",
653
            "sourceHandle": "chatOllama_0-output-chatOllama-ChatOllama|SimpleChatModel|BaseChatModel|BaseLanguageModel|Runnable",
654
            "target": "conversationalRetrievalQAChain_0",
655
            "targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseChatModel",
656
            "type": "buttonedge",
657
            "id": "chatOllama_0-chatOllama_0-output-chatOllama-ChatOllama|SimpleChatModel|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseChatModel",
658
            "data": {
659
                "label": ""
660
            }
661
        },
662
        {
663
            "source": "textFile_0",
664
            "sourceHandle": "textFile_0-output-document-Document|json",
665
            "target": "faiss_0",
666
            "targetHandle": "faiss_0-input-document-Document",
667
            "type": "buttonedge",
668
            "id": "textFile_0-textFile_0-output-document-Document|json-faiss_0-faiss_0-input-document-Document",
669
            "data": {
670
                "label": ""
671
            }
672
        },
673
        {
674
            "source": "localAIEmbeddings_0",
675
            "sourceHandle": "localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings",
676
            "target": "faiss_0",
677
            "targetHandle": "faiss_0-input-embeddings-Embeddings",
678
            "type": "buttonedge",
679
            "id": "localAIEmbeddings_0-localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings-faiss_0-faiss_0-input-embeddings-Embeddings",
680
            "data": {
681
                "label": ""
682
            }
683
        },
684
        {
685
            "source": "faiss_0",
686
            "sourceHandle": "faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
687
            "target": "conversationalRetrievalQAChain_0",
688
            "targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
689
            "type": "buttonedge",
690
            "id": "faiss_0-faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
691
            "data": {
692
                "label": ""
693
            }
694
        }
695
    ]
696
}
697

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.