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 |
+
"id": "openAIEmbeddings_0",
|
7 |
+
"position": {
|
8 |
+
"x": 551.898318794988,
|
9 |
+
"y": 521.0870888518298
|
10 |
+
},
|
11 |
+
"type": "customNode",
|
12 |
+
"data": {
|
13 |
+
"id": "openAIEmbeddings_0",
|
14 |
+
"label": "OpenAI Embeddings",
|
15 |
+
"version": 4,
|
16 |
+
"name": "openAIEmbeddings",
|
17 |
+
"type": "OpenAIEmbeddings",
|
18 |
+
"baseClasses": [
|
19 |
+
"OpenAIEmbeddings",
|
20 |
+
"Embeddings"
|
21 |
+
],
|
22 |
+
"category": "Embeddings",
|
23 |
+
"description": "OpenAI API to generate embeddings for a given text",
|
24 |
+
"inputParams": [
|
25 |
+
{
|
26 |
+
"label": "Connect Credential",
|
27 |
+
"name": "credential",
|
28 |
+
"type": "credential",
|
29 |
+
"credentialNames": [
|
30 |
+
"openAIApi"
|
31 |
+
],
|
32 |
+
"id": "openAIEmbeddings_0-input-credential-credential"
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"label": "Model Name",
|
36 |
+
"name": "modelName",
|
37 |
+
"type": "asyncOptions",
|
38 |
+
"loadMethod": "listModels",
|
39 |
+
"default": "text-embedding-ada-002",
|
40 |
+
"id": "openAIEmbeddings_0-input-modelName-asyncOptions"
|
41 |
+
},
|
42 |
+
{
|
43 |
+
"label": "Strip New Lines",
|
44 |
+
"name": "stripNewLines",
|
45 |
+
"type": "boolean",
|
46 |
+
"optional": true,
|
47 |
+
"additionalParams": true,
|
48 |
+
"id": "openAIEmbeddings_0-input-stripNewLines-boolean"
|
49 |
+
},
|
50 |
+
{
|
51 |
+
"label": "Batch Size",
|
52 |
+
"name": "batchSize",
|
53 |
+
"type": "number",
|
54 |
+
"optional": true,
|
55 |
+
"additionalParams": true,
|
56 |
+
"id": "openAIEmbeddings_0-input-batchSize-number"
|
57 |
+
},
|
58 |
+
{
|
59 |
+
"label": "Timeout",
|
60 |
+
"name": "timeout",
|
61 |
+
"type": "number",
|
62 |
+
"optional": true,
|
63 |
+
"additionalParams": true,
|
64 |
+
"id": "openAIEmbeddings_0-input-timeout-number"
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"label": "BasePath",
|
68 |
+
"name": "basepath",
|
69 |
+
"type": "string",
|
70 |
+
"optional": true,
|
71 |
+
"additionalParams": true,
|
72 |
+
"id": "openAIEmbeddings_0-input-basepath-string"
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"label": "Dimensions",
|
76 |
+
"name": "dimensions",
|
77 |
+
"type": "number",
|
78 |
+
"optional": true,
|
79 |
+
"additionalParams": true,
|
80 |
+
"id": "openAIEmbeddings_0-input-dimensions-number"
|
81 |
+
}
|
82 |
+
],
|
83 |
+
"inputAnchors": [],
|
84 |
+
"inputs": {
|
85 |
+
"modelName": "text-embedding-ada-002",
|
86 |
+
"stripNewLines": "",
|
87 |
+
"batchSize": "",
|
88 |
+
"timeout": "",
|
89 |
+
"basepath": "",
|
90 |
+
"dimensions": ""
|
91 |
+
},
|
92 |
+
"outputAnchors": [
|
93 |
+
{
|
94 |
+
"id": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
95 |
+
"name": "openAIEmbeddings",
|
96 |
+
"label": "OpenAIEmbeddings",
|
97 |
+
"description": "OpenAI API to generate embeddings for a given text",
|
98 |
+
"type": "OpenAIEmbeddings | Embeddings"
|
99 |
+
}
|
100 |
+
],
|
101 |
+
"outputs": {},
|
102 |
+
"selected": false
|
103 |
+
},
|
104 |
+
"selected": false,
|
105 |
+
"positionAbsolute": {
|
106 |
+
"x": 551.898318794988,
|
107 |
+
"y": 521.0870888518298
|
108 |
+
},
|
109 |
+
"dragging": false
|
110 |
+
},
|
111 |
+
{
|
112 |
+
"width": 300,
|
113 |
+
"height": 426,
|
114 |
+
"id": "recursiveCharacterTextSplitter_0",
|
115 |
+
"position": {
|
116 |
+
"x": 65.52694674492622,
|
117 |
+
"y": -129.28423743229172
|
118 |
+
},
|
119 |
+
"type": "customNode",
|
120 |
+
"data": {
|
121 |
+
"id": "recursiveCharacterTextSplitter_0",
|
122 |
+
"label": "Recursive Character Text Splitter",
|
123 |
+
"version": 2,
|
124 |
+
"name": "recursiveCharacterTextSplitter",
|
125 |
+
"type": "RecursiveCharacterTextSplitter",
|
126 |
+
"baseClasses": [
|
127 |
+
"RecursiveCharacterTextSplitter",
|
128 |
+
"TextSplitter"
|
129 |
+
],
|
130 |
+
"category": "Text Splitters",
|
131 |
+
"description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"",
|
132 |
+
"inputParams": [
|
133 |
+
{
|
134 |
+
"label": "Chunk Size",
|
135 |
+
"name": "chunkSize",
|
136 |
+
"type": "number",
|
137 |
+
"default": 1000,
|
138 |
+
"optional": true,
|
139 |
+
"id": "recursiveCharacterTextSplitter_0-input-chunkSize-number"
|
140 |
+
},
|
141 |
+
{
|
142 |
+
"label": "Chunk Overlap",
|
143 |
+
"name": "chunkOverlap",
|
144 |
+
"type": "number",
|
145 |
+
"optional": true,
|
146 |
+
"id": "recursiveCharacterTextSplitter_0-input-chunkOverlap-number"
|
147 |
+
},
|
148 |
+
{
|
149 |
+
"label": "Custom Separators",
|
150 |
+
"name": "separators",
|
151 |
+
"type": "string",
|
152 |
+
"rows": 4,
|
153 |
+
"description": "Array of custom separators to determine when to split the text, will override the default separators",
|
154 |
+
"placeholder": "[\"|\", \"##\", \">\", \"-\"]",
|
155 |
+
"additionalParams": true,
|
156 |
+
"optional": true,
|
157 |
+
"id": "recursiveCharacterTextSplitter_0-input-separators-string"
|
158 |
+
}
|
159 |
+
],
|
160 |
+
"inputAnchors": [],
|
161 |
+
"inputs": {
|
162 |
+
"chunkSize": "200",
|
163 |
+
"chunkOverlap": "20"
|
164 |
+
},
|
165 |
+
"outputAnchors": [
|
166 |
+
{
|
167 |
+
"id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
|
168 |
+
"name": "recursiveCharacterTextSplitter",
|
169 |
+
"label": "RecursiveCharacterTextSplitter",
|
170 |
+
"type": "RecursiveCharacterTextSplitter | TextSplitter"
|
171 |
+
}
|
172 |
+
],
|
173 |
+
"outputs": {},
|
174 |
+
"selected": false
|
175 |
+
},
|
176 |
+
"selected": false,
|
177 |
+
"positionAbsolute": {
|
178 |
+
"x": 65.52694674492622,
|
179 |
+
"y": -129.28423743229172
|
180 |
+
},
|
181 |
+
"dragging": false
|
182 |
+
},
|
183 |
+
{
|
184 |
+
"width": 300,
|
185 |
+
"height": 526,
|
186 |
+
"id": "conversationalRetrievalQAChain_0",
|
187 |
+
"position": {
|
188 |
+
"x": 1479.8961773397668,
|
189 |
+
"y": 304.1837648607072
|
190 |
+
},
|
191 |
+
"type": "customNode",
|
192 |
+
"data": {
|
193 |
+
"id": "conversationalRetrievalQAChain_0",
|
194 |
+
"label": "Conversational Retrieval QA Chain",
|
195 |
+
"version": 3,
|
196 |
+
"name": "conversationalRetrievalQAChain",
|
197 |
+
"type": "ConversationalRetrievalQAChain",
|
198 |
+
"baseClasses": [
|
199 |
+
"ConversationalRetrievalQAChain",
|
200 |
+
"BaseChain",
|
201 |
+
"Runnable"
|
202 |
+
],
|
203 |
+
"category": "Chains",
|
204 |
+
"description": "Document QA - built on RetrievalQAChain to provide a chat history component",
|
205 |
+
"inputParams": [
|
206 |
+
{
|
207 |
+
"label": "Return Source Documents",
|
208 |
+
"name": "returnSourceDocuments",
|
209 |
+
"type": "boolean",
|
210 |
+
"optional": true,
|
211 |
+
"id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean"
|
212 |
+
},
|
213 |
+
{
|
214 |
+
"label": "Rephrase Prompt",
|
215 |
+
"name": "rephrasePrompt",
|
216 |
+
"type": "string",
|
217 |
+
"description": "Using previous chat history, rephrase question into a standalone question",
|
218 |
+
"warning": "Prompt must include input variables: {chat_history} and {question}",
|
219 |
+
"rows": 4,
|
220 |
+
"additionalParams": true,
|
221 |
+
"optional": true,
|
222 |
+
"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:",
|
223 |
+
"id": "conversationalRetrievalQAChain_0-input-rephrasePrompt-string"
|
224 |
+
},
|
225 |
+
{
|
226 |
+
"label": "Response Prompt",
|
227 |
+
"name": "responsePrompt",
|
228 |
+
"type": "string",
|
229 |
+
"description": "Taking the rephrased question, search for answer from the provided context",
|
230 |
+
"warning": "Prompt must include input variable: {context}",
|
231 |
+
"rows": 4,
|
232 |
+
"additionalParams": true,
|
233 |
+
"optional": true,
|
234 |
+
"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.",
|
235 |
+
"id": "conversationalRetrievalQAChain_0-input-responsePrompt-string"
|
236 |
+
}
|
237 |
+
],
|
238 |
+
"inputAnchors": [
|
239 |
+
{
|
240 |
+
"label": "Chat Model",
|
241 |
+
"name": "model",
|
242 |
+
"type": "BaseChatModel",
|
243 |
+
"id": "conversationalRetrievalQAChain_0-input-model-BaseChatModel"
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"label": "Vector Store Retriever",
|
247 |
+
"name": "vectorStoreRetriever",
|
248 |
+
"type": "BaseRetriever",
|
249 |
+
"id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
|
250 |
+
},
|
251 |
+
{
|
252 |
+
"label": "Memory",
|
253 |
+
"name": "memory",
|
254 |
+
"type": "BaseMemory",
|
255 |
+
"optional": true,
|
256 |
+
"description": "If left empty, a default BufferMemory will be used",
|
257 |
+
"id": "conversationalRetrievalQAChain_0-input-memory-BaseMemory"
|
258 |
+
},
|
259 |
+
{
|
260 |
+
"label": "Input Moderation",
|
261 |
+
"description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
|
262 |
+
"name": "inputModeration",
|
263 |
+
"type": "Moderation",
|
264 |
+
"optional": true,
|
265 |
+
"list": true,
|
266 |
+
"id": "conversationalRetrievalQAChain_0-input-inputModeration-Moderation"
|
267 |
+
}
|
268 |
+
],
|
269 |
+
"inputs": {
|
270 |
+
"inputModeration": [],
|
271 |
+
"model": "{{chatOpenAI_0.data.instance}}",
|
272 |
+
"vectorStoreRetriever": "{{faiss_0.data.instance}}",
|
273 |
+
"memory": "",
|
274 |
+
"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:",
|
275 |
+
"responsePrompt": "You are an informative assistant. Using the provided context, answer the user's question to the best of your ability using only the provided context. \n\nIf there is nothing in the context or inputs relevant to the question at hand, just say \"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 \"I'm not sure.\" Don't try to make up an answer. ",
|
276 |
+
"returnSourceDocuments": true
|
277 |
+
},
|
278 |
+
"outputAnchors": [
|
279 |
+
{
|
280 |
+
"id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|Runnable",
|
281 |
+
"name": "conversationalRetrievalQAChain",
|
282 |
+
"label": "ConversationalRetrievalQAChain",
|
283 |
+
"type": "ConversationalRetrievalQAChain | BaseChain | Runnable"
|
284 |
+
}
|
285 |
+
],
|
286 |
+
"outputs": {},
|
287 |
+
"selected": false
|
288 |
+
},
|
289 |
+
"positionAbsolute": {
|
290 |
+
"x": 1479.8961773397668,
|
291 |
+
"y": 304.1837648607072
|
292 |
+
},
|
293 |
+
"selected": false,
|
294 |
+
"dragging": false
|
295 |
+
},
|
296 |
+
{
|
297 |
+
"width": 300,
|
298 |
+
"height": 664,
|
299 |
+
"id": "chatOpenAI_0",
|
300 |
+
"position": {
|
301 |
+
"x": 1093.9380699660267,
|
302 |
+
"y": -285.2206286861737
|
303 |
+
},
|
304 |
+
"type": "customNode",
|
305 |
+
"data": {
|
306 |
+
"id": "chatOpenAI_0",
|
307 |
+
"label": "ChatOpenAI",
|
308 |
+
"version": 6,
|
309 |
+
"name": "chatOpenAI",
|
310 |
+
"type": "ChatOpenAI",
|
311 |
+
"baseClasses": [
|
312 |
+
"ChatOpenAI",
|
313 |
+
"BaseChatModel",
|
314 |
+
"BaseLanguageModel",
|
315 |
+
"Runnable"
|
316 |
+
],
|
317 |
+
"category": "Chat Models",
|
318 |
+
"description": "Wrapper around OpenAI large language models that use the Chat endpoint",
|
319 |
+
"inputParams": [
|
320 |
+
{
|
321 |
+
"label": "Connect Credential",
|
322 |
+
"name": "credential",
|
323 |
+
"type": "credential",
|
324 |
+
"credentialNames": [
|
325 |
+
"openAIApi"
|
326 |
+
],
|
327 |
+
"id": "chatOpenAI_0-input-credential-credential"
|
328 |
+
},
|
329 |
+
{
|
330 |
+
"label": "Model Name",
|
331 |
+
"name": "modelName",
|
332 |
+
"type": "asyncOptions",
|
333 |
+
"loadMethod": "listModels",
|
334 |
+
"default": "gpt-3.5-turbo",
|
335 |
+
"id": "chatOpenAI_0-input-modelName-options"
|
336 |
+
},
|
337 |
+
{
|
338 |
+
"label": "Temperature",
|
339 |
+
"name": "temperature",
|
340 |
+
"type": "number",
|
341 |
+
"step": 0.1,
|
342 |
+
"default": 0.9,
|
343 |
+
"optional": true,
|
344 |
+
"id": "chatOpenAI_0-input-temperature-number"
|
345 |
+
},
|
346 |
+
{
|
347 |
+
"label": "Max Tokens",
|
348 |
+
"name": "maxTokens",
|
349 |
+
"type": "number",
|
350 |
+
"step": 1,
|
351 |
+
"optional": true,
|
352 |
+
"additionalParams": true,
|
353 |
+
"id": "chatOpenAI_0-input-maxTokens-number"
|
354 |
+
},
|
355 |
+
{
|
356 |
+
"label": "Top Probability",
|
357 |
+
"name": "topP",
|
358 |
+
"type": "number",
|
359 |
+
"step": 0.1,
|
360 |
+
"optional": true,
|
361 |
+
"additionalParams": true,
|
362 |
+
"id": "chatOpenAI_0-input-topP-number"
|
363 |
+
},
|
364 |
+
{
|
365 |
+
"label": "Frequency Penalty",
|
366 |
+
"name": "frequencyPenalty",
|
367 |
+
"type": "number",
|
368 |
+
"step": 0.1,
|
369 |
+
"optional": true,
|
370 |
+
"additionalParams": true,
|
371 |
+
"id": "chatOpenAI_0-input-frequencyPenalty-number"
|
372 |
+
},
|
373 |
+
{
|
374 |
+
"label": "Presence Penalty",
|
375 |
+
"name": "presencePenalty",
|
376 |
+
"type": "number",
|
377 |
+
"step": 0.1,
|
378 |
+
"optional": true,
|
379 |
+
"additionalParams": true,
|
380 |
+
"id": "chatOpenAI_0-input-presencePenalty-number"
|
381 |
+
},
|
382 |
+
{
|
383 |
+
"label": "Timeout",
|
384 |
+
"name": "timeout",
|
385 |
+
"type": "number",
|
386 |
+
"step": 1,
|
387 |
+
"optional": true,
|
388 |
+
"additionalParams": true,
|
389 |
+
"id": "chatOpenAI_0-input-timeout-number"
|
390 |
+
},
|
391 |
+
{
|
392 |
+
"label": "BasePath",
|
393 |
+
"name": "basepath",
|
394 |
+
"type": "string",
|
395 |
+
"optional": true,
|
396 |
+
"additionalParams": true,
|
397 |
+
"id": "chatOpenAI_0-input-basepath-string"
|
398 |
+
},
|
399 |
+
{
|
400 |
+
"label": "BaseOptions",
|
401 |
+
"name": "baseOptions",
|
402 |
+
"type": "json",
|
403 |
+
"optional": true,
|
404 |
+
"additionalParams": true,
|
405 |
+
"id": "chatOpenAI_0-input-baseOptions-json"
|
406 |
+
},
|
407 |
+
{
|
408 |
+
"label": "Allow Image Uploads",
|
409 |
+
"name": "allowImageUploads",
|
410 |
+
"type": "boolean",
|
411 |
+
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
412 |
+
"default": false,
|
413 |
+
"optional": true,
|
414 |
+
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
415 |
+
},
|
416 |
+
{
|
417 |
+
"label": "Image Resolution",
|
418 |
+
"description": "This parameter controls the resolution in which the model views the image.",
|
419 |
+
"name": "imageResolution",
|
420 |
+
"type": "options",
|
421 |
+
"options": [
|
422 |
+
{
|
423 |
+
"label": "Low",
|
424 |
+
"name": "low"
|
425 |
+
},
|
426 |
+
{
|
427 |
+
"label": "High",
|
428 |
+
"name": "high"
|
429 |
+
},
|
430 |
+
{
|
431 |
+
"label": "Auto",
|
432 |
+
"name": "auto"
|
433 |
+
}
|
434 |
+
],
|
435 |
+
"default": "low",
|
436 |
+
"optional": false,
|
437 |
+
"additionalParams": true,
|
438 |
+
"id": "chatOpenAI_0-input-imageResolution-options"
|
439 |
+
}
|
440 |
+
],
|
441 |
+
"inputAnchors": [
|
442 |
+
{
|
443 |
+
"label": "Cache",
|
444 |
+
"name": "cache",
|
445 |
+
"type": "BaseCache",
|
446 |
+
"optional": true,
|
447 |
+
"id": "chatOpenAI_0-input-cache-BaseCache"
|
448 |
+
}
|
449 |
+
],
|
450 |
+
"inputs": {
|
451 |
+
"cache": "",
|
452 |
+
"modelName": "gpt-3.5-turbo-16k",
|
453 |
+
"temperature": "0.6",
|
454 |
+
"maxTokens": "",
|
455 |
+
"topP": "",
|
456 |
+
"frequencyPenalty": "",
|
457 |
+
"presencePenalty": "",
|
458 |
+
"timeout": "",
|
459 |
+
"basepath": "",
|
460 |
+
"baseOptions": "",
|
461 |
+
"allowImageUploads": true,
|
462 |
+
"imageResolution": "low"
|
463 |
+
},
|
464 |
+
"outputAnchors": [
|
465 |
+
{
|
466 |
+
"id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
|
467 |
+
"name": "chatOpenAI",
|
468 |
+
"label": "ChatOpenAI",
|
469 |
+
"type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | Runnable"
|
470 |
+
}
|
471 |
+
],
|
472 |
+
"outputs": {},
|
473 |
+
"selected": false
|
474 |
+
},
|
475 |
+
"selected": false,
|
476 |
+
"positionAbsolute": {
|
477 |
+
"x": 1093.9380699660267,
|
478 |
+
"y": -285.2206286861737
|
479 |
+
},
|
480 |
+
"dragging": false
|
481 |
+
},
|
482 |
+
{
|
483 |
+
"id": "textFile_0",
|
484 |
+
"position": {
|
485 |
+
"x": 515.7023372615639,
|
486 |
+
"y": -850.7776811141198
|
487 |
+
},
|
488 |
+
"type": "customNode",
|
489 |
+
"data": {
|
490 |
+
"id": "textFile_0",
|
491 |
+
"label": "Text File",
|
492 |
+
"version": 3,
|
493 |
+
"name": "textFile",
|
494 |
+
"type": "Document",
|
495 |
+
"baseClasses": [
|
496 |
+
"Document"
|
497 |
+
],
|
498 |
+
"category": "Document Loaders",
|
499 |
+
"description": "Load data from text files",
|
500 |
+
"inputParams": [
|
501 |
+
{
|
502 |
+
"label": "Txt File",
|
503 |
+
"name": "txtFile",
|
504 |
+
"type": "file",
|
505 |
+
"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",
|
506 |
+
"id": "textFile_0-input-txtFile-file"
|
507 |
+
},
|
508 |
+
{
|
509 |
+
"label": "Additional Metadata",
|
510 |
+
"name": "metadata",
|
511 |
+
"type": "json",
|
512 |
+
"description": "Additional metadata to be added to the extracted documents",
|
513 |
+
"optional": true,
|
514 |
+
"additionalParams": true,
|
515 |
+
"id": "textFile_0-input-metadata-json"
|
516 |
+
},
|
517 |
+
{
|
518 |
+
"label": "Omit Metadata Keys",
|
519 |
+
"name": "omitMetadataKeys",
|
520 |
+
"type": "string",
|
521 |
+
"rows": 4,
|
522 |
+
"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",
|
523 |
+
"placeholder": "key1, key2, key3.nestedKey1",
|
524 |
+
"optional": true,
|
525 |
+
"additionalParams": true,
|
526 |
+
"id": "textFile_0-input-omitMetadataKeys-string"
|
527 |
+
}
|
528 |
+
],
|
529 |
+
"inputAnchors": [
|
530 |
+
{
|
531 |
+
"label": "Text Splitter",
|
532 |
+
"name": "textSplitter",
|
533 |
+
"type": "TextSplitter",
|
534 |
+
"optional": true,
|
535 |
+
"id": "textFile_0-input-textSplitter-TextSplitter"
|
536 |
+
}
|
537 |
+
],
|
538 |
+
"inputs": {
|
539 |
+
"textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}",
|
540 |
+
"metadata": "",
|
541 |
+
"omitMetadataKeys": ""
|
542 |
+
},
|
543 |
+
"outputAnchors": [
|
544 |
+
{
|
545 |
+
"name": "output",
|
546 |
+
"label": "Output",
|
547 |
+
"type": "options",
|
548 |
+
"description": "Array of document objects containing metadata and pageContent",
|
549 |
+
"options": [
|
550 |
+
{
|
551 |
+
"id": "textFile_0-output-document-Document|json",
|
552 |
+
"name": "document",
|
553 |
+
"label": "Document",
|
554 |
+
"description": "Array of document objects containing metadata and pageContent",
|
555 |
+
"type": "Document | json"
|
556 |
+
},
|
557 |
+
{
|
558 |
+
"id": "textFile_0-output-text-string|json",
|
559 |
+
"name": "text",
|
560 |
+
"label": "Text",
|
561 |
+
"description": "Concatenated string from pageContent of documents",
|
562 |
+
"type": "string | json"
|
563 |
+
}
|
564 |
+
],
|
565 |
+
"default": "document"
|
566 |
+
}
|
567 |
+
],
|
568 |
+
"outputs": {
|
569 |
+
"output": "document"
|
570 |
+
},
|
571 |
+
"selected": false
|
572 |
+
},
|
573 |
+
"width": 300,
|
574 |
+
"height": 1263,
|
575 |
+
"selected": false,
|
576 |
+
"positionAbsolute": {
|
577 |
+
"x": 515.7023372615639,
|
578 |
+
"y": -850.7776811141198
|
579 |
+
},
|
580 |
+
"dragging": false
|
581 |
+
},
|
582 |
+
{
|
583 |
+
"id": "faiss_0",
|
584 |
+
"position": {
|
585 |
+
"x": 1011.7164640533672,
|
586 |
+
"y": 539.1164591452028
|
587 |
+
},
|
588 |
+
"type": "customNode",
|
589 |
+
"data": {
|
590 |
+
"id": "faiss_0",
|
591 |
+
"label": "Faiss",
|
592 |
+
"version": 1,
|
593 |
+
"name": "faiss",
|
594 |
+
"type": "Faiss",
|
595 |
+
"baseClasses": [
|
596 |
+
"Faiss",
|
597 |
+
"VectorStoreRetriever",
|
598 |
+
"BaseRetriever"
|
599 |
+
],
|
600 |
+
"category": "Vector Stores",
|
601 |
+
"description": "Upsert embedded data and perform similarity search upon query using Faiss library from Meta",
|
602 |
+
"inputParams": [
|
603 |
+
{
|
604 |
+
"label": "Base Path to load",
|
605 |
+
"name": "basePath",
|
606 |
+
"description": "Path to load faiss.index file",
|
607 |
+
"placeholder": "C:\\Users\\User\\Desktop",
|
608 |
+
"type": "string",
|
609 |
+
"id": "faiss_0-input-basePath-string"
|
610 |
+
},
|
611 |
+
{
|
612 |
+
"label": "Top K",
|
613 |
+
"name": "topK",
|
614 |
+
"description": "Number of top results to fetch. Default to 4",
|
615 |
+
"placeholder": "4",
|
616 |
+
"type": "number",
|
617 |
+
"additionalParams": true,
|
618 |
+
"optional": true,
|
619 |
+
"id": "faiss_0-input-topK-number"
|
620 |
+
}
|
621 |
+
],
|
622 |
+
"inputAnchors": [
|
623 |
+
{
|
624 |
+
"label": "Document",
|
625 |
+
"name": "document",
|
626 |
+
"type": "Document",
|
627 |
+
"list": true,
|
628 |
+
"optional": true,
|
629 |
+
"id": "faiss_0-input-document-Document"
|
630 |
+
},
|
631 |
+
{
|
632 |
+
"label": "Embeddings",
|
633 |
+
"name": "embeddings",
|
634 |
+
"type": "Embeddings",
|
635 |
+
"id": "faiss_0-input-embeddings-Embeddings"
|
636 |
+
}
|
637 |
+
],
|
638 |
+
"inputs": {
|
639 |
+
"document": [
|
640 |
+
"{{textFile_0.data.instance}}"
|
641 |
+
],
|
642 |
+
"embeddings": "{{openAIEmbeddings_0.data.instance}}",
|
643 |
+
"basePath": "/Users/cellith1/Desktop/data/",
|
644 |
+
"topK": ""
|
645 |
+
},
|
646 |
+
"outputAnchors": [
|
647 |
+
{
|
648 |
+
"name": "output",
|
649 |
+
"label": "Output",
|
650 |
+
"type": "options",
|
651 |
+
"description": "",
|
652 |
+
"options": [
|
653 |
+
{
|
654 |
+
"id": "faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
|
655 |
+
"name": "retriever",
|
656 |
+
"label": "Faiss Retriever",
|
657 |
+
"description": "",
|
658 |
+
"type": "Faiss | VectorStoreRetriever | BaseRetriever"
|
659 |
+
},
|
660 |
+
{
|
661 |
+
"id": "faiss_0-output-vectorStore-Faiss|SaveableVectorStore|VectorStore",
|
662 |
+
"name": "vectorStore",
|
663 |
+
"label": "Faiss Vector Store",
|
664 |
+
"description": "",
|
665 |
+
"type": "Faiss | SaveableVectorStore | VectorStore"
|
666 |
+
}
|
667 |
+
],
|
668 |
+
"default": "retriever"
|
669 |
+
}
|
670 |
+
],
|
671 |
+
"outputs": {
|
672 |
+
"output": "retriever"
|
673 |
+
},
|
674 |
+
"selected": false
|
675 |
+
},
|
676 |
+
"width": 300,
|
677 |
+
"height": 455,
|
678 |
+
"selected": false,
|
679 |
+
"dragging": false,
|
680 |
+
"positionAbsolute": {
|
681 |
+
"x": 1011.7164640533672,
|
682 |
+
"y": 539.1164591452028
|
683 |
+
}
|
684 |
+
}
|
685 |
+
],
|
686 |
+
"edges": [
|
687 |
+
{
|
688 |
+
"source": "chatOpenAI_0",
|
689 |
+
"sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
|
690 |
+
"target": "conversationalRetrievalQAChain_0",
|
691 |
+
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseChatModel",
|
692 |
+
"type": "buttonedge",
|
693 |
+
"id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseChatModel",
|
694 |
+
"data": {
|
695 |
+
"label": ""
|
696 |
+
}
|
697 |
+
},
|
698 |
+
{
|
699 |
+
"source": "openAIEmbeddings_0",
|
700 |
+
"sourceHandle": "openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings",
|
701 |
+
"target": "faiss_0",
|
702 |
+
"targetHandle": "faiss_0-input-embeddings-Embeddings",
|
703 |
+
"type": "buttonedge",
|
704 |
+
"id": "openAIEmbeddings_0-openAIEmbeddings_0-output-openAIEmbeddings-OpenAIEmbeddings|Embeddings-faiss_0-faiss_0-input-embeddings-Embeddings"
|
705 |
+
},
|
706 |
+
{
|
707 |
+
"source": "faiss_0",
|
708 |
+
"sourceHandle": "faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
|
709 |
+
"target": "conversationalRetrievalQAChain_0",
|
710 |
+
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
711 |
+
"type": "buttonedge",
|
712 |
+
"id": "faiss_0-faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever"
|
713 |
+
},
|
714 |
+
{
|
715 |
+
"source": "recursiveCharacterTextSplitter_0",
|
716 |
+
"sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
|
717 |
+
"target": "textFile_0",
|
718 |
+
"targetHandle": "textFile_0-input-textSplitter-TextSplitter",
|
719 |
+
"type": "buttonedge",
|
720 |
+
"id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter-textFile_0-textFile_0-input-textSplitter-TextSplitter"
|
721 |
+
},
|
722 |
+
{
|
723 |
+
"source": "textFile_0",
|
724 |
+
"sourceHandle": "textFile_0-output-document-Document|json",
|
725 |
+
"target": "faiss_0",
|
726 |
+
"targetHandle": "faiss_0-input-document-Document",
|
727 |
+
"type": "buttonedge",
|
728 |
+
"id": "textFile_0-textFile_0-output-document-Document|json-faiss_0-faiss_0-input-document-Document"
|
729 |
+
}
|
730 |
+
]
|
731 |
+
}
|