| { | |
| "nodes": [ | |
| { | |
| "id": "recursiveCharacterTextSplitter_0", | |
| "position": { | |
| "x": 213.66633969673887, | |
| "y": 277.61843101631064 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "recursiveCharacterTextSplitter_0", | |
| "label": "Recursive Character Text Splitter", | |
| "version": 2, | |
| "name": "recursiveCharacterTextSplitter", | |
| "type": "RecursiveCharacterTextSplitter", | |
| "baseClasses": [ | |
| "RecursiveCharacterTextSplitter", | |
| "TextSplitter", | |
| "BaseDocumentTransformer", | |
| "Runnable" | |
| ], | |
| "category": "Text Splitters", | |
| "description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"", | |
| "inputParams": [ | |
| { | |
| "label": "Chunk Size", | |
| "name": "chunkSize", | |
| "type": "number", | |
| "description": "Number of characters in each chunk. Default is 1000.", | |
| "default": 1000, | |
| "optional": true, | |
| "id": "recursiveCharacterTextSplitter_0-input-chunkSize-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Chunk Overlap", | |
| "name": "chunkOverlap", | |
| "type": "number", | |
| "description": "Number of characters to overlap between chunks. Default is 200.", | |
| "default": 200, | |
| "optional": true, | |
| "id": "recursiveCharacterTextSplitter_0-input-chunkOverlap-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Custom Separators", | |
| "name": "separators", | |
| "type": "string", | |
| "rows": 4, | |
| "description": "Array of custom separators to determine when to split the text, will override the default separators", | |
| "placeholder": "[\"|\", \"##\", \">\", \"-\"]", | |
| "additionalParams": true, | |
| "optional": true, | |
| "id": "recursiveCharacterTextSplitter_0-input-separators-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [], | |
| "inputs": { | |
| "chunkSize": 1000, | |
| "chunkOverlap": "100", | |
| "separators": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable", | |
| "name": "recursiveCharacterTextSplitter", | |
| "label": "RecursiveCharacterTextSplitter", | |
| "description": "Split documents recursively by different characters - starting with \"\\n\\n\", then \"\\n\", then \" \"", | |
| "type": "RecursiveCharacterTextSplitter | TextSplitter | BaseDocumentTransformer | Runnable" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 432, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 213.66633969673887, | |
| "y": 277.61843101631064 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "cheerioWebScraper_0", | |
| "position": { | |
| "x": 634.3134396320586, | |
| "y": 396.07236301516616 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "cheerioWebScraper_0", | |
| "label": "Cheerio Web Scraper", | |
| "version": 2, | |
| "name": "cheerioWebScraper", | |
| "type": "Document", | |
| "baseClasses": [ | |
| "Document" | |
| ], | |
| "category": "Document Loaders", | |
| "description": "Load data from webpages", | |
| "inputParams": [ | |
| { | |
| "label": "URL", | |
| "name": "url", | |
| "type": "string", | |
| "id": "cheerioWebScraper_0-input-url-string", | |
| "display": true | |
| }, | |
| { | |
| "label": "Get Relative Links Method", | |
| "name": "relativeLinksMethod", | |
| "type": "options", | |
| "description": "Select a method to retrieve relative links", | |
| "options": [ | |
| { | |
| "label": "Web Crawl", | |
| "name": "webCrawl", | |
| "description": "Crawl relative links from HTML URL" | |
| }, | |
| { | |
| "label": "Scrape XML Sitemap", | |
| "name": "scrapeXMLSitemap", | |
| "description": "Scrape relative links from XML sitemap URL" | |
| } | |
| ], | |
| "default": "webCrawl", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "cheerioWebScraper_0-input-relativeLinksMethod-options", | |
| "display": true | |
| }, | |
| { | |
| "label": "Get Relative Links Limit", | |
| "name": "limit", | |
| "type": "number", | |
| "optional": true, | |
| "default": "10", | |
| "additionalParams": true, | |
| "description": "Only used when \"Get Relative Links Method\" is selected. Set 0 to retrieve all relative links, default limit is 10.", | |
| "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)", | |
| "id": "cheerioWebScraper_0-input-limit-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Selector (CSS)", | |
| "name": "selector", | |
| "type": "string", | |
| "description": "Specify a CSS selector to select the content to be extracted", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "cheerioWebScraper_0-input-selector-string", | |
| "display": true | |
| }, | |
| { | |
| "label": "Additional Metadata", | |
| "name": "metadata", | |
| "type": "json", | |
| "description": "Additional metadata to be added to the extracted documents", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "cheerioWebScraper_0-input-metadata-json", | |
| "display": true | |
| }, | |
| { | |
| "label": "Omit Metadata Keys", | |
| "name": "omitMetadataKeys", | |
| "type": "string", | |
| "rows": 4, | |
| "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", | |
| "placeholder": "key1, key2, key3.nestedKey1", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "cheerioWebScraper_0-input-omitMetadataKeys-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Text Splitter", | |
| "name": "textSplitter", | |
| "type": "TextSplitter", | |
| "optional": true, | |
| "id": "cheerioWebScraper_0-input-textSplitter-TextSplitter", | |
| "display": true | |
| } | |
| ], | |
| "inputs": { | |
| "url": "https://recht.nrw.de/lmi/owa/br_text_anzeigen?v_id=10000000000000000654", | |
| "textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}", | |
| "relativeLinksMethod": "webCrawl", | |
| "limit": "10", | |
| "selector": "", | |
| "metadata": "", | |
| "omitMetadataKeys": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "name": "output", | |
| "label": "Output", | |
| "type": "options", | |
| "description": "Array of document objects containing metadata and pageContent", | |
| "options": [ | |
| { | |
| "id": "cheerioWebScraper_0-output-document-Document|json", | |
| "name": "document", | |
| "label": "Document", | |
| "description": "Array of document objects containing metadata and pageContent", | |
| "type": "Document | json" | |
| }, | |
| { | |
| "id": "cheerioWebScraper_0-output-text-string|json", | |
| "name": "text", | |
| "label": "Text", | |
| "description": "Concatenated string from pageContent of documents", | |
| "type": "string | json" | |
| } | |
| ], | |
| "default": "document" | |
| } | |
| ], | |
| "outputs": { | |
| "output": "document" | |
| }, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 455, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 634.3134396320586, | |
| "y": 396.07236301516616 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "fileLoader_0", | |
| "position": { | |
| "x": 650.8786850888786, | |
| "y": -99.61017668321267 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "fileLoader_0", | |
| "label": "File Loader", | |
| "version": 2, | |
| "name": "fileLoader", | |
| "type": "Document", | |
| "baseClasses": [ | |
| "Document" | |
| ], | |
| "category": "Document Loaders", | |
| "description": "A generic file loader that can load different file types", | |
| "inputParams": [ | |
| { | |
| "label": "File", | |
| "name": "file", | |
| "type": "file", | |
| "fileType": "*", | |
| "id": "fileLoader_0-input-file-file", | |
| "display": true | |
| }, | |
| { | |
| "label": "Pdf Usage", | |
| "name": "usage", | |
| "type": "options", | |
| "description": "Only when loading PDF files", | |
| "options": [ | |
| { | |
| "label": "One document per page", | |
| "name": "perPage" | |
| }, | |
| { | |
| "label": "One document per file", | |
| "name": "perFile" | |
| } | |
| ], | |
| "default": "perPage", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "fileLoader_0-input-usage-options", | |
| "display": true | |
| }, | |
| { | |
| "label": "Use Legacy Build", | |
| "name": "legacyBuild", | |
| "type": "boolean", | |
| "description": "Use legacy build for PDF compatibility issues", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "fileLoader_0-input-legacyBuild-boolean", | |
| "display": true | |
| }, | |
| { | |
| "label": "JSONL Pointer Extraction", | |
| "name": "pointerName", | |
| "type": "string", | |
| "description": "Only when loading JSONL files", | |
| "placeholder": "<pointerName>", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "fileLoader_0-input-pointerName-string", | |
| "display": true | |
| }, | |
| { | |
| "label": "Additional Metadata", | |
| "name": "metadata", | |
| "type": "json", | |
| "description": "Additional metadata to be added to the extracted documents", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "fileLoader_0-input-metadata-json", | |
| "display": true | |
| }, | |
| { | |
| "label": "Omit Metadata Keys", | |
| "name": "omitMetadataKeys", | |
| "type": "string", | |
| "rows": 4, | |
| "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", | |
| "placeholder": "key1, key2, key3.nestedKey1", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "fileLoader_0-input-omitMetadataKeys-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Text Splitter", | |
| "name": "textSplitter", | |
| "type": "TextSplitter", | |
| "optional": true, | |
| "id": "fileLoader_0-input-textSplitter-TextSplitter", | |
| "display": true | |
| } | |
| ], | |
| "inputs": { | |
| "textSplitter": "{{recursiveCharacterTextSplitter_0.data.instance}}", | |
| "usage": "perPage", | |
| "legacyBuild": "", | |
| "pointerName": "", | |
| "metadata": "", | |
| "omitMetadataKeys": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "name": "output", | |
| "label": "Output", | |
| "type": "options", | |
| "description": "Array of document objects containing metadata and pageContent", | |
| "options": [ | |
| { | |
| "id": "fileLoader_0-output-document-Document|json", | |
| "name": "document", | |
| "label": "Document", | |
| "description": "Array of document objects containing metadata and pageContent", | |
| "type": "Document | json" | |
| }, | |
| { | |
| "id": "fileLoader_0-output-text-string|json", | |
| "name": "text", | |
| "label": "Text", | |
| "description": "Concatenated string from pageContent of documents", | |
| "type": "string | json" | |
| } | |
| ], | |
| "default": "document" | |
| } | |
| ], | |
| "outputs": { | |
| "output": "document" | |
| }, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 459, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 650.8786850888786, | |
| "y": -99.61017668321267 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "memoryVectorStore_0", | |
| "position": { | |
| "x": 1223.0565194111455, | |
| "y": 354.4959534107418 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "memoryVectorStore_0", | |
| "label": "In-Memory Vector Store", | |
| "version": 1, | |
| "name": "memoryVectorStore", | |
| "type": "Memory", | |
| "baseClasses": [ | |
| "Memory", | |
| "VectorStoreRetriever", | |
| "BaseRetriever" | |
| ], | |
| "category": "Vector Stores", | |
| "description": "In-memory vectorstore that stores embeddings and does an exact, linear search for the most similar embeddings.", | |
| "inputParams": [ | |
| { | |
| "label": "Top K", | |
| "name": "topK", | |
| "description": "Number of top results to fetch. Default to 4", | |
| "placeholder": "4", | |
| "type": "number", | |
| "optional": true, | |
| "id": "memoryVectorStore_0-input-topK-number", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Document", | |
| "name": "document", | |
| "type": "Document", | |
| "list": true, | |
| "optional": true, | |
| "id": "memoryVectorStore_0-input-document-Document", | |
| "display": true | |
| }, | |
| { | |
| "label": "Embeddings", | |
| "name": "embeddings", | |
| "type": "Embeddings", | |
| "id": "memoryVectorStore_0-input-embeddings-Embeddings", | |
| "display": true | |
| } | |
| ], | |
| "inputs": { | |
| "document": [ | |
| "{{fileLoader_0.data.instance}}", | |
| "{{cheerioWebScraper_0.data.instance}}" | |
| ], | |
| "embeddings": "{{huggingFaceInferenceEmbeddings_0.data.instance}}", | |
| "topK": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "name": "output", | |
| "label": "Output", | |
| "type": "options", | |
| "description": "", | |
| "options": [ | |
| { | |
| "id": "memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever", | |
| "name": "retriever", | |
| "label": "Memory Retriever", | |
| "description": "", | |
| "type": "Memory | VectorStoreRetriever | BaseRetriever" | |
| }, | |
| { | |
| "id": "memoryVectorStore_0-output-vectorStore-Memory|VectorStore", | |
| "name": "vectorStore", | |
| "label": "Memory Vector Store", | |
| "description": "", | |
| "type": "Memory | VectorStore" | |
| } | |
| ], | |
| "default": "retriever" | |
| } | |
| ], | |
| "outputs": { | |
| "output": "retriever" | |
| }, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 409, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 1223.0565194111455, | |
| "y": 354.4959534107418 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "huggingFaceInferenceEmbeddings_0", | |
| "position": { | |
| "x": 800.5209198760278, | |
| "y": 938.3403835917181 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "huggingFaceInferenceEmbeddings_0", | |
| "label": "HuggingFace Inference Embeddings", | |
| "version": 1, | |
| "name": "huggingFaceInferenceEmbeddings", | |
| "type": "HuggingFaceInferenceEmbeddings", | |
| "baseClasses": [ | |
| "HuggingFaceInferenceEmbeddings", | |
| "Embeddings" | |
| ], | |
| "category": "Embeddings", | |
| "description": "HuggingFace Inference API to generate embeddings for a given text", | |
| "inputParams": [ | |
| { | |
| "label": "Connect Credential", | |
| "name": "credential", | |
| "type": "credential", | |
| "credentialNames": [ | |
| "huggingFaceApi" | |
| ], | |
| "id": "huggingFaceInferenceEmbeddings_0-input-credential-credential", | |
| "display": true | |
| }, | |
| { | |
| "label": "Model", | |
| "name": "modelName", | |
| "type": "string", | |
| "description": "If using own inference endpoint, leave this blank", | |
| "placeholder": "sentence-transformers/distilbert-base-nli-mean-tokens", | |
| "optional": true, | |
| "id": "huggingFaceInferenceEmbeddings_0-input-modelName-string", | |
| "display": true | |
| }, | |
| { | |
| "label": "Endpoint", | |
| "name": "endpoint", | |
| "type": "string", | |
| "placeholder": "https://xyz.eu-west-1.aws.endpoints.huggingface.cloud/sentence-transformers/all-MiniLM-L6-v2", | |
| "description": "Using your own inference endpoint", | |
| "optional": true, | |
| "id": "huggingFaceInferenceEmbeddings_0-input-endpoint-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [], | |
| "inputs": { | |
| "modelName": "", | |
| "endpoint": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings", | |
| "name": "huggingFaceInferenceEmbeddings", | |
| "label": "HuggingFaceInferenceEmbeddings", | |
| "description": "HuggingFace Inference API to generate embeddings for a given text", | |
| "type": "HuggingFaceInferenceEmbeddings | Embeddings" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 475, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 800.5209198760278, | |
| "y": 938.3403835917181 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "chatMistralAI_0", | |
| "position": { | |
| "x": 1595.917318086838, | |
| "y": -45.513470613474084 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "chatMistralAI_0", | |
| "label": "ChatMistralAI", | |
| "version": 4, | |
| "name": "chatMistralAI", | |
| "type": "ChatMistralAI", | |
| "baseClasses": [ | |
| "ChatMistralAI", | |
| "BaseChatModel", | |
| "BaseLanguageModel", | |
| "Runnable" | |
| ], | |
| "category": "Chat Models", | |
| "description": "Wrapper around Mistral large language models that use the Chat endpoint", | |
| "inputParams": [ | |
| { | |
| "label": "Connect Credential", | |
| "name": "credential", | |
| "type": "credential", | |
| "credentialNames": [ | |
| "mistralAIApi" | |
| ], | |
| "id": "chatMistralAI_0-input-credential-credential", | |
| "display": true | |
| }, | |
| { | |
| "label": "Model Name", | |
| "name": "modelName", | |
| "type": "asyncOptions", | |
| "loadMethod": "listModels", | |
| "default": "mistral-tiny", | |
| "id": "chatMistralAI_0-input-modelName-asyncOptions", | |
| "display": true | |
| }, | |
| { | |
| "label": "Temperature", | |
| "name": "temperature", | |
| "type": "number", | |
| "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.", | |
| "step": 0.1, | |
| "default": 0.9, | |
| "optional": true, | |
| "id": "chatMistralAI_0-input-temperature-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Streaming", | |
| "name": "streaming", | |
| "type": "boolean", | |
| "default": true, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatMistralAI_0-input-streaming-boolean", | |
| "display": true | |
| }, | |
| { | |
| "label": "Max Output Tokens", | |
| "name": "maxOutputTokens", | |
| "type": "number", | |
| "description": "The maximum number of tokens to generate in the completion.", | |
| "step": 1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatMistralAI_0-input-maxOutputTokens-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Top Probability", | |
| "name": "topP", | |
| "type": "number", | |
| "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.", | |
| "step": 0.1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatMistralAI_0-input-topP-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Random Seed", | |
| "name": "randomSeed", | |
| "type": "number", | |
| "description": "The seed to use for random sampling. If set, different calls will generate deterministic results.", | |
| "step": 1, | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatMistralAI_0-input-randomSeed-number", | |
| "display": true | |
| }, | |
| { | |
| "label": "Safe Mode", | |
| "name": "safeMode", | |
| "type": "boolean", | |
| "description": "Whether to inject a safety prompt before all conversations.", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatMistralAI_0-input-safeMode-boolean", | |
| "display": true | |
| }, | |
| { | |
| "label": "Override Endpoint", | |
| "name": "overrideEndpoint", | |
| "type": "string", | |
| "optional": true, | |
| "additionalParams": true, | |
| "id": "chatMistralAI_0-input-overrideEndpoint-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Cache", | |
| "name": "cache", | |
| "type": "BaseCache", | |
| "optional": true, | |
| "id": "chatMistralAI_0-input-cache-BaseCache", | |
| "display": true | |
| } | |
| ], | |
| "inputs": { | |
| "cache": "", | |
| "modelName": "mistral-tiny", | |
| "temperature": 0.9, | |
| "streaming": true, | |
| "maxOutputTokens": "", | |
| "topP": "", | |
| "randomSeed": "", | |
| "safeMode": "", | |
| "overrideEndpoint": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable", | |
| "name": "chatMistralAI", | |
| "label": "ChatMistralAI", | |
| "description": "Wrapper around Mistral large language models that use the Chat endpoint", | |
| "type": "ChatMistralAI | BaseChatModel | BaseLanguageModel | Runnable" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 574, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 1595.917318086838, | |
| "y": -45.513470613474084 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "conversationalRetrievalQAChain_0", | |
| "position": { | |
| "x": 2050.4776365303856, | |
| "y": 510.2391804991254 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "conversationalRetrievalQAChain_0", | |
| "label": "Conversational Retrieval QA Chain", | |
| "version": 3, | |
| "name": "conversationalRetrievalQAChain", | |
| "type": "ConversationalRetrievalQAChain", | |
| "baseClasses": [ | |
| "ConversationalRetrievalQAChain", | |
| "BaseChain", | |
| "Runnable" | |
| ], | |
| "category": "Chains", | |
| "description": "Document QA - built on RetrievalQAChain to provide a chat history component", | |
| "inputParams": [ | |
| { | |
| "label": "Return Source Documents", | |
| "name": "returnSourceDocuments", | |
| "type": "boolean", | |
| "optional": true, | |
| "id": "conversationalRetrievalQAChain_0-input-returnSourceDocuments-boolean", | |
| "display": true | |
| }, | |
| { | |
| "label": "Rephrase Prompt", | |
| "name": "rephrasePrompt", | |
| "type": "string", | |
| "description": "Using previous chat history, rephrase question into a standalone question", | |
| "warning": "Prompt must include input variables: {chat_history} and {question}", | |
| "rows": 4, | |
| "additionalParams": true, | |
| "optional": true, | |
| "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:", | |
| "id": "conversationalRetrievalQAChain_0-input-rephrasePrompt-string", | |
| "display": true | |
| }, | |
| { | |
| "label": "Response Prompt", | |
| "name": "responsePrompt", | |
| "type": "string", | |
| "description": "Taking the rephrased question, search for answer from the provided context", | |
| "warning": "Prompt must include input variable: {context}", | |
| "rows": 4, | |
| "additionalParams": true, | |
| "optional": true, | |
| "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.", | |
| "id": "conversationalRetrievalQAChain_0-input-responsePrompt-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [ | |
| { | |
| "label": "Chat Model", | |
| "name": "model", | |
| "type": "BaseChatModel", | |
| "id": "conversationalRetrievalQAChain_0-input-model-BaseChatModel", | |
| "display": true | |
| }, | |
| { | |
| "label": "Vector Store Retriever", | |
| "name": "vectorStoreRetriever", | |
| "type": "BaseRetriever", | |
| "id": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever", | |
| "display": true | |
| }, | |
| { | |
| "label": "Memory", | |
| "name": "memory", | |
| "type": "BaseMemory", | |
| "optional": true, | |
| "description": "If left empty, a default BufferMemory will be used", | |
| "id": "conversationalRetrievalQAChain_0-input-memory-BaseMemory", | |
| "display": true | |
| }, | |
| { | |
| "label": "Input Moderation", | |
| "description": "Detect text that could generate harmful output and prevent it from being sent to the language model", | |
| "name": "inputModeration", | |
| "type": "Moderation", | |
| "optional": true, | |
| "list": true, | |
| "id": "conversationalRetrievalQAChain_0-input-inputModeration-Moderation", | |
| "display": true | |
| } | |
| ], | |
| "inputs": { | |
| "model": "{{chatMistralAI_0.data.instance}}", | |
| "vectorStoreRetriever": "{{memoryVectorStore_0.data.instance}}", | |
| "memory": "{{bufferMemory_0.data.instance}}", | |
| "returnSourceDocuments": "", | |
| "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:", | |
| "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.", | |
| "inputModeration": "" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "conversationalRetrievalQAChain_0-output-conversationalRetrievalQAChain-ConversationalRetrievalQAChain|BaseChain|Runnable", | |
| "name": "conversationalRetrievalQAChain", | |
| "label": "ConversationalRetrievalQAChain", | |
| "description": "Document QA - built on RetrievalQAChain to provide a chat history component", | |
| "type": "ConversationalRetrievalQAChain | BaseChain | Runnable" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 532, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 2050.4776365303856, | |
| "y": 510.2391804991254 | |
| }, | |
| "dragging": false | |
| }, | |
| { | |
| "id": "bufferMemory_0", | |
| "position": { | |
| "x": 1582.3823941244955, | |
| "y": 983.0773590603847 | |
| }, | |
| "type": "customNode", | |
| "data": { | |
| "id": "bufferMemory_0", | |
| "label": "Buffer Memory", | |
| "version": 2, | |
| "name": "bufferMemory", | |
| "type": "BufferMemory", | |
| "baseClasses": [ | |
| "BufferMemory", | |
| "BaseChatMemory", | |
| "BaseMemory" | |
| ], | |
| "category": "Memory", | |
| "description": "Retrieve chat messages stored in database", | |
| "inputParams": [ | |
| { | |
| "label": "Session Id", | |
| "name": "sessionId", | |
| "type": "string", | |
| "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>", | |
| "default": "", | |
| "additionalParams": true, | |
| "optional": true, | |
| "id": "bufferMemory_0-input-sessionId-string", | |
| "display": true | |
| }, | |
| { | |
| "label": "Memory Key", | |
| "name": "memoryKey", | |
| "type": "string", | |
| "default": "chat_history", | |
| "additionalParams": true, | |
| "id": "bufferMemory_0-input-memoryKey-string", | |
| "display": true | |
| } | |
| ], | |
| "inputAnchors": [], | |
| "inputs": { | |
| "sessionId": "", | |
| "memoryKey": "chat_history" | |
| }, | |
| "outputAnchors": [ | |
| { | |
| "id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory", | |
| "name": "bufferMemory", | |
| "label": "BufferMemory", | |
| "description": "Retrieve chat messages stored in database", | |
| "type": "BufferMemory | BaseChatMemory | BaseMemory" | |
| } | |
| ], | |
| "outputs": {}, | |
| "selected": false | |
| }, | |
| "width": 300, | |
| "height": 256, | |
| "selected": false, | |
| "positionAbsolute": { | |
| "x": 1582.3823941244955, | |
| "y": 983.0773590603847 | |
| }, | |
| "dragging": false | |
| } | |
| ], | |
| "edges": [ | |
| { | |
| "source": "recursiveCharacterTextSplitter_0", | |
| "sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable", | |
| "target": "cheerioWebScraper_0", | |
| "targetHandle": "cheerioWebScraper_0-input-textSplitter-TextSplitter", | |
| "type": "buttonedge", | |
| "id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-cheerioWebScraper_0-cheerioWebScraper_0-input-textSplitter-TextSplitter" | |
| }, | |
| { | |
| "source": "recursiveCharacterTextSplitter_0", | |
| "sourceHandle": "recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable", | |
| "target": "fileLoader_0", | |
| "targetHandle": "fileLoader_0-input-textSplitter-TextSplitter", | |
| "type": "buttonedge", | |
| "id": "recursiveCharacterTextSplitter_0-recursiveCharacterTextSplitter_0-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter|BaseDocumentTransformer|Runnable-fileLoader_0-fileLoader_0-input-textSplitter-TextSplitter" | |
| }, | |
| { | |
| "source": "fileLoader_0", | |
| "sourceHandle": "fileLoader_0-output-document-Document|json", | |
| "target": "memoryVectorStore_0", | |
| "targetHandle": "memoryVectorStore_0-input-document-Document", | |
| "type": "buttonedge", | |
| "id": "fileLoader_0-fileLoader_0-output-document-Document|json-memoryVectorStore_0-memoryVectorStore_0-input-document-Document" | |
| }, | |
| { | |
| "source": "cheerioWebScraper_0", | |
| "sourceHandle": "cheerioWebScraper_0-output-document-Document|json", | |
| "target": "memoryVectorStore_0", | |
| "targetHandle": "memoryVectorStore_0-input-document-Document", | |
| "type": "buttonedge", | |
| "id": "cheerioWebScraper_0-cheerioWebScraper_0-output-document-Document|json-memoryVectorStore_0-memoryVectorStore_0-input-document-Document" | |
| }, | |
| { | |
| "source": "huggingFaceInferenceEmbeddings_0", | |
| "sourceHandle": "huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings", | |
| "target": "memoryVectorStore_0", | |
| "targetHandle": "memoryVectorStore_0-input-embeddings-Embeddings", | |
| "type": "buttonedge", | |
| "id": "huggingFaceInferenceEmbeddings_0-huggingFaceInferenceEmbeddings_0-output-huggingFaceInferenceEmbeddings-HuggingFaceInferenceEmbeddings|Embeddings-memoryVectorStore_0-memoryVectorStore_0-input-embeddings-Embeddings" | |
| }, | |
| { | |
| "source": "chatMistralAI_0", | |
| "sourceHandle": "chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable", | |
| "target": "conversationalRetrievalQAChain_0", | |
| "targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseChatModel", | |
| "type": "buttonedge", | |
| "id": "chatMistralAI_0-chatMistralAI_0-output-chatMistralAI-ChatMistralAI|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseChatModel" | |
| }, | |
| { | |
| "source": "memoryVectorStore_0", | |
| "sourceHandle": "memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever", | |
| "target": "conversationalRetrievalQAChain_0", | |
| "targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever", | |
| "type": "buttonedge", | |
| "id": "memoryVectorStore_0-memoryVectorStore_0-output-retriever-Memory|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever" | |
| }, | |
| { | |
| "source": "bufferMemory_0", | |
| "sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory", | |
| "target": "conversationalRetrievalQAChain_0", | |
| "targetHandle": "conversationalRetrievalQAChain_0-input-memory-BaseMemory", | |
| "type": "buttonedge", | |
| "id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-memory-BaseMemory" | |
| } | |
| ] | |
| } |