mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 11:01:18 +03:00
add vector upsert ability
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
{
|
||||
"description": "QnA chain using local LLM, Embedding models, and Faiss local vector store",
|
||||
"description": "QnA chain using Ollama local LLM, LocalAI embedding model, and Faiss local vector store",
|
||||
"badge": "POPULAR",
|
||||
"nodes": [
|
||||
{
|
||||
"width": 300,
|
||||
"height": 376,
|
||||
"height": 429,
|
||||
"id": "recursiveCharacterTextSplitter_1",
|
||||
"position": {
|
||||
"x": 422.81091375202413,
|
||||
"x": 424.5721426652516,
|
||||
"y": 122.99825010325736
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "recursiveCharacterTextSplitter_1",
|
||||
"label": "Recursive Character Text Splitter",
|
||||
"name": "recursiveCharacterTextSplitter",
|
||||
"version": 2,
|
||||
"name": "recursiveCharacterTextSplitter",
|
||||
"type": "RecursiveCharacterTextSplitter",
|
||||
"baseClasses": ["RecursiveCharacterTextSplitter", "TextSplitter"],
|
||||
"category": "Text Splitters",
|
||||
@@ -65,25 +66,25 @@
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 422.81091375202413,
|
||||
"x": 424.5721426652516,
|
||||
"y": 122.99825010325736
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 428,
|
||||
"height": 480,
|
||||
"id": "conversationalRetrievalQAChain_0",
|
||||
"position": {
|
||||
"x": 1634.455879160561,
|
||||
"y": 428.77742668929807
|
||||
"x": 1604.8865818627112,
|
||||
"y": 329.6333122200366
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "conversationalRetrievalQAChain_0",
|
||||
"label": "Conversational Retrieval QA Chain",
|
||||
"name": "conversationalRetrievalQAChain",
|
||||
"version": 1,
|
||||
"name": "conversationalRetrievalQAChain",
|
||||
"type": "ConversationalRetrievalQAChain",
|
||||
"baseClasses": ["ConversationalRetrievalQAChain", "BaseChain", "BaseLangChain"],
|
||||
"category": "Chains",
|
||||
@@ -155,8 +156,8 @@
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"model": "{{chatLocalAI_0.data.instance}}",
|
||||
"vectorStoreRetriever": "{{faissUpsert_0.data.instance}}",
|
||||
"model": "{{chatOllama_0.data.instance}}",
|
||||
"vectorStoreRetriever": "{{faiss_0.data.instance}}",
|
||||
"memory": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
@@ -172,208 +173,14 @@
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1634.455879160561,
|
||||
"y": 428.77742668929807
|
||||
"x": 1604.8865818627112,
|
||||
"y": 329.6333122200366
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 456,
|
||||
"id": "faissUpsert_0",
|
||||
"position": {
|
||||
"x": 1204.6898035516715,
|
||||
"y": 521.0933926644659
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "faissUpsert_0",
|
||||
"label": "Faiss Upsert Document",
|
||||
"name": "faissUpsert",
|
||||
"version": 1,
|
||||
"type": "Faiss",
|
||||
"baseClasses": ["Faiss", "VectorStoreRetriever", "BaseRetriever"],
|
||||
"category": "Vector Stores",
|
||||
"description": "Upsert documents to Faiss",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Base Path to store",
|
||||
"name": "basePath",
|
||||
"description": "Path to store faiss.index file",
|
||||
"placeholder": "C:\\Users\\User\\Desktop",
|
||||
"type": "string",
|
||||
"id": "faissUpsert_0-input-basePath-string"
|
||||
},
|
||||
{
|
||||
"label": "Top K",
|
||||
"name": "topK",
|
||||
"description": "Number of top results to fetch. Default to 4",
|
||||
"placeholder": "4",
|
||||
"type": "number",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "faissUpsert_0-input-topK-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Document",
|
||||
"name": "document",
|
||||
"type": "Document",
|
||||
"list": true,
|
||||
"id": "faissUpsert_0-input-document-Document"
|
||||
},
|
||||
{
|
||||
"label": "Embeddings",
|
||||
"name": "embeddings",
|
||||
"type": "Embeddings",
|
||||
"id": "faissUpsert_0-input-embeddings-Embeddings"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"document": ["{{textFile_0.data.instance}}"],
|
||||
"embeddings": "{{localAIEmbeddings_0.data.instance}}",
|
||||
"basePath": "C:\\Users\\your-folder",
|
||||
"topK": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"name": "output",
|
||||
"label": "Output",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "faissUpsert_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
|
||||
"name": "retriever",
|
||||
"label": "Faiss Retriever",
|
||||
"type": "Faiss | VectorStoreRetriever | BaseRetriever"
|
||||
},
|
||||
{
|
||||
"id": "faissUpsert_0-output-vectorStore-Faiss|SaveableVectorStore|VectorStore",
|
||||
"name": "vectorStore",
|
||||
"label": "Faiss Vector Store",
|
||||
"type": "Faiss | SaveableVectorStore | VectorStore"
|
||||
}
|
||||
],
|
||||
"default": "retriever"
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"output": "retriever"
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1204.6898035516715,
|
||||
"y": 521.0933926644659
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 526,
|
||||
"id": "chatLocalAI_0",
|
||||
"position": {
|
||||
"x": 1191.9512064167336,
|
||||
"y": -94.05401001663306
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatLocalAI_0",
|
||||
"label": "ChatLocalAI",
|
||||
"name": "chatLocalAI",
|
||||
"version": 2,
|
||||
"type": "ChatLocalAI",
|
||||
"baseClasses": ["ChatLocalAI", "BaseChatModel", "LLM", "BaseLLM", "BaseLanguageModel", "BaseLangChain"],
|
||||
"category": "Chat Models",
|
||||
"description": "Use local LLMs like llama.cpp, gpt4all using LocalAI",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Base Path",
|
||||
"name": "basePath",
|
||||
"type": "string",
|
||||
"placeholder": "http://localhost:8080/v1",
|
||||
"id": "chatLocalAI_0-input-basePath-string"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "string",
|
||||
"placeholder": "gpt4all-lora-quantized.bin",
|
||||
"id": "chatLocalAI_0-input-modelName-string"
|
||||
},
|
||||
{
|
||||
"label": "Temperature",
|
||||
"name": "temperature",
|
||||
"type": "number",
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "chatLocalAI_0-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Max Tokens",
|
||||
"name": "maxTokens",
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatLocalAI_0-input-maxTokens-number"
|
||||
},
|
||||
{
|
||||
"label": "Top Probability",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatLocalAI_0-input-topP-number"
|
||||
},
|
||||
{
|
||||
"label": "Timeout",
|
||||
"name": "timeout",
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatLocalAI_0-input-timeout-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Cache",
|
||||
"name": "cache",
|
||||
"type": "BaseCache",
|
||||
"optional": true,
|
||||
"id": "chatLocalAI_0-input-cache-BaseCache"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"basePath": "http://localhost:8080/v1",
|
||||
"modelName": "ggml-gpt4all-j.bin",
|
||||
"temperature": 0.9,
|
||||
"maxTokens": "",
|
||||
"topP": "",
|
||||
"timeout": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatLocalAI_0-output-chatLocalAI-ChatLocalAI|BaseChatModel|LLM|BaseLLM|BaseLanguageModel|BaseLangChain",
|
||||
"name": "chatLocalAI",
|
||||
"label": "ChatLocalAI",
|
||||
"type": "ChatLocalAI | BaseChatModel | LLM | BaseLLM | BaseLanguageModel | BaseLangChain"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1191.9512064167336,
|
||||
"y": -94.05401001663306
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 410,
|
||||
"height": 419,
|
||||
"id": "textFile_0",
|
||||
"position": {
|
||||
"x": 809.5432731751458,
|
||||
@@ -383,8 +190,8 @@
|
||||
"data": {
|
||||
"id": "textFile_0",
|
||||
"label": "Text File",
|
||||
"name": "textFile",
|
||||
"version": 3,
|
||||
"name": "textFile",
|
||||
"type": "Document",
|
||||
"baseClasses": ["Document"],
|
||||
"category": "Document Loaders",
|
||||
@@ -465,8 +272,8 @@
|
||||
"data": {
|
||||
"id": "localAIEmbeddings_0",
|
||||
"label": "LocalAI Embeddings",
|
||||
"name": "localAIEmbeddings",
|
||||
"version": 1,
|
||||
"name": "localAIEmbeddings",
|
||||
"type": "LocalAI Embeddings",
|
||||
"baseClasses": ["LocalAI Embeddings", "Embeddings"],
|
||||
"category": "Embeddings",
|
||||
@@ -509,31 +316,324 @@
|
||||
"y": 507.4586304746849
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 578,
|
||||
"id": "chatOllama_0",
|
||||
"position": {
|
||||
"x": 1198.006914501795,
|
||||
"y": -78.92345253481488
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "chatOllama_0",
|
||||
"label": "ChatOllama",
|
||||
"version": 2,
|
||||
"name": "chatOllama",
|
||||
"type": "ChatOllama",
|
||||
"baseClasses": ["ChatOllama", "SimpleChatModel", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
"category": "Chat Models",
|
||||
"description": "Chat completion using open-source LLM on Ollama",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Base URL",
|
||||
"name": "baseUrl",
|
||||
"type": "string",
|
||||
"default": "http://localhost:11434",
|
||||
"id": "chatOllama_0-input-baseUrl-string"
|
||||
},
|
||||
{
|
||||
"label": "Model Name",
|
||||
"name": "modelName",
|
||||
"type": "string",
|
||||
"placeholder": "llama2",
|
||||
"id": "chatOllama_0-input-modelName-string"
|
||||
},
|
||||
{
|
||||
"label": "Temperature",
|
||||
"name": "temperature",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"default": 0.9,
|
||||
"optional": true,
|
||||
"id": "chatOllama_0-input-temperature-number"
|
||||
},
|
||||
{
|
||||
"label": "Top P",
|
||||
"name": "topP",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-topP-number"
|
||||
},
|
||||
{
|
||||
"label": "Top K",
|
||||
"name": "topK",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-topK-number"
|
||||
},
|
||||
{
|
||||
"label": "Mirostat",
|
||||
"name": "mirostat",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-mirostat-number"
|
||||
},
|
||||
{
|
||||
"label": "Mirostat ETA",
|
||||
"name": "mirostatEta",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-mirostatEta-number"
|
||||
},
|
||||
{
|
||||
"label": "Mirostat TAU",
|
||||
"name": "mirostatTau",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-mirostatTau-number"
|
||||
},
|
||||
{
|
||||
"label": "Context Window Size",
|
||||
"name": "numCtx",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-numCtx-number"
|
||||
},
|
||||
{
|
||||
"label": "Number of GQA groups",
|
||||
"name": "numGqa",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-numGqa-number"
|
||||
},
|
||||
{
|
||||
"label": "Number of GPU",
|
||||
"name": "numGpu",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-numGpu-number"
|
||||
},
|
||||
{
|
||||
"label": "Number of Thread",
|
||||
"name": "numThread",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-numThread-number"
|
||||
},
|
||||
{
|
||||
"label": "Repeat Last N",
|
||||
"name": "repeatLastN",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-repeatLastN-number"
|
||||
},
|
||||
{
|
||||
"label": "Repeat Penalty",
|
||||
"name": "repeatPenalty",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-repeatPenalty-number"
|
||||
},
|
||||
{
|
||||
"label": "Stop Sequence",
|
||||
"name": "stop",
|
||||
"type": "string",
|
||||
"rows": 4,
|
||||
"placeholder": "AI assistant:",
|
||||
"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",
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-stop-string"
|
||||
},
|
||||
{
|
||||
"label": "Tail Free Sampling",
|
||||
"name": "tfsZ",
|
||||
"type": "number",
|
||||
"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",
|
||||
"step": 0.1,
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOllama_0-input-tfsZ-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Cache",
|
||||
"name": "cache",
|
||||
"type": "BaseCache",
|
||||
"optional": true,
|
||||
"id": "chatOllama_0-input-cache-BaseCache"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"cache": "",
|
||||
"baseUrl": "http://localhost:11434",
|
||||
"modelName": "llama2",
|
||||
"temperature": 0.9,
|
||||
"topP": "",
|
||||
"topK": "",
|
||||
"mirostat": "",
|
||||
"mirostatEta": "",
|
||||
"mirostatTau": "",
|
||||
"numCtx": "",
|
||||
"numGqa": "",
|
||||
"numGpu": "",
|
||||
"numThread": "",
|
||||
"repeatLastN": "",
|
||||
"repeatPenalty": "",
|
||||
"stop": "",
|
||||
"tfsZ": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"id": "chatOllama_0-output-chatOllama-ChatOllama|SimpleChatModel|BaseChatModel|BaseLanguageModel|Runnable",
|
||||
"name": "chatOllama",
|
||||
"label": "ChatOllama",
|
||||
"type": "ChatOllama | SimpleChatModel | BaseChatModel | BaseLanguageModel | Runnable"
|
||||
}
|
||||
],
|
||||
"outputs": {},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1198.006914501795,
|
||||
"y": -78.92345253481488
|
||||
},
|
||||
"dragging": false
|
||||
},
|
||||
{
|
||||
"width": 300,
|
||||
"height": 458,
|
||||
"id": "faiss_0",
|
||||
"position": {
|
||||
"x": 1199.3135683364685,
|
||||
"y": 520.9300176396024
|
||||
},
|
||||
"type": "customNode",
|
||||
"data": {
|
||||
"id": "faiss_0",
|
||||
"label": "Faiss",
|
||||
"version": 1,
|
||||
"name": "faiss",
|
||||
"type": "Faiss",
|
||||
"baseClasses": ["Faiss", "VectorStoreRetriever", "BaseRetriever"],
|
||||
"category": "Vector Stores",
|
||||
"description": "Upsert or Load data to Faiss Vector Store",
|
||||
"inputParams": [
|
||||
{
|
||||
"label": "Base Path to load",
|
||||
"name": "basePath",
|
||||
"description": "Path to load faiss.index file",
|
||||
"placeholder": "C:\\Users\\User\\Desktop",
|
||||
"type": "string",
|
||||
"id": "faiss_0-input-basePath-string"
|
||||
},
|
||||
{
|
||||
"label": "Top K",
|
||||
"name": "topK",
|
||||
"description": "Number of top results to fetch. Default to 4",
|
||||
"placeholder": "4",
|
||||
"type": "number",
|
||||
"additionalParams": true,
|
||||
"optional": true,
|
||||
"id": "faiss_0-input-topK-number"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
{
|
||||
"label": "Document",
|
||||
"name": "document",
|
||||
"type": "Document",
|
||||
"list": true,
|
||||
"optional": true,
|
||||
"id": "faiss_0-input-document-Document"
|
||||
},
|
||||
{
|
||||
"label": "Embeddings",
|
||||
"name": "embeddings",
|
||||
"type": "Embeddings",
|
||||
"id": "faiss_0-input-embeddings-Embeddings"
|
||||
}
|
||||
],
|
||||
"inputs": {
|
||||
"document": ["{{textFile_0.data.instance}}"],
|
||||
"embeddings": "{{localAIEmbeddings_0.data.instance}}",
|
||||
"basePath": "C:\\Users\\your-folder",
|
||||
"topK": ""
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
"name": "output",
|
||||
"label": "Output",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"id": "faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
|
||||
"name": "retriever",
|
||||
"label": "Faiss Retriever",
|
||||
"type": "Faiss | VectorStoreRetriever | BaseRetriever"
|
||||
},
|
||||
{
|
||||
"id": "faiss_0-output-vectorStore-Faiss|SaveableVectorStore|VectorStore",
|
||||
"name": "vectorStore",
|
||||
"label": "Faiss Vector Store",
|
||||
"type": "Faiss | SaveableVectorStore | VectorStore"
|
||||
}
|
||||
],
|
||||
"default": "retriever"
|
||||
}
|
||||
],
|
||||
"outputs": {
|
||||
"output": "retriever"
|
||||
},
|
||||
"selected": false
|
||||
},
|
||||
"selected": false,
|
||||
"positionAbsolute": {
|
||||
"x": 1199.3135683364685,
|
||||
"y": 520.9300176396024
|
||||
},
|
||||
"dragging": false
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"source": "faissUpsert_0",
|
||||
"sourceHandle": "faissUpsert_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
|
||||
"target": "conversationalRetrievalQAChain_0",
|
||||
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
||||
"type": "buttonedge",
|
||||
"id": "faissUpsert_0-faissUpsert_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "chatLocalAI_0",
|
||||
"sourceHandle": "chatLocalAI_0-output-chatLocalAI-ChatLocalAI|BaseChatModel|LLM|BaseLLM|BaseLanguageModel|BaseLangChain",
|
||||
"target": "conversationalRetrievalQAChain_0",
|
||||
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
|
||||
"type": "buttonedge",
|
||||
"id": "chatLocalAI_0-chatLocalAI_0-output-chatLocalAI-ChatLocalAI|BaseChatModel|LLM|BaseLLM|BaseLanguageModel|BaseLangChain-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "recursiveCharacterTextSplitter_1",
|
||||
"sourceHandle": "recursiveCharacterTextSplitter_1-output-recursiveCharacterTextSplitter-RecursiveCharacterTextSplitter|TextSplitter",
|
||||
@@ -546,12 +646,23 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "textFile_0",
|
||||
"sourceHandle": "textFile_0-output-textFile-Document",
|
||||
"target": "faissUpsert_0",
|
||||
"targetHandle": "faissUpsert_0-input-document-Document",
|
||||
"source": "chatOllama_0",
|
||||
"sourceHandle": "chatOllama_0-output-chatOllama-ChatOllama|SimpleChatModel|BaseChatModel|BaseLanguageModel|Runnable",
|
||||
"target": "conversationalRetrievalQAChain_0",
|
||||
"targetHandle": "conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
|
||||
"type": "buttonedge",
|
||||
"id": "textFile_0-textFile_0-output-textFile-Document-faissUpsert_0-faissUpsert_0-input-document-Document",
|
||||
"id": "chatOllama_0-chatOllama_0-output-chatOllama-ChatOllama|SimpleChatModel|BaseChatModel|BaseLanguageModel|Runnable-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-model-BaseLanguageModel",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "textFile_0",
|
||||
"sourceHandle": "textFile_0-output-document-Document",
|
||||
"target": "faiss_0",
|
||||
"targetHandle": "faiss_0-input-document-Document",
|
||||
"type": "buttonedge",
|
||||
"id": "textFile_0-textFile_0-output-document-Document-faiss_0-faiss_0-input-document-Document",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
@@ -559,10 +670,21 @@
|
||||
{
|
||||
"source": "localAIEmbeddings_0",
|
||||
"sourceHandle": "localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings",
|
||||
"target": "faissUpsert_0",
|
||||
"targetHandle": "faissUpsert_0-input-embeddings-Embeddings",
|
||||
"target": "faiss_0",
|
||||
"targetHandle": "faiss_0-input-embeddings-Embeddings",
|
||||
"type": "buttonedge",
|
||||
"id": "localAIEmbeddings_0-localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings-faissUpsert_0-faissUpsert_0-input-embeddings-Embeddings",
|
||||
"id": "localAIEmbeddings_0-localAIEmbeddings_0-output-localAIEmbeddings-LocalAI Embeddings|Embeddings-faiss_0-faiss_0-input-embeddings-Embeddings",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"source": "faiss_0",
|
||||
"sourceHandle": "faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever",
|
||||
"target": "conversationalRetrievalQAChain_0",
|
||||
"targetHandle": "conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
||||
"type": "buttonedge",
|
||||
"id": "faiss_0-faiss_0-output-retriever-Faiss|VectorStoreRetriever|BaseRetriever-conversationalRetrievalQAChain_0-conversationalRetrievalQAChain_0-input-vectorStoreRetriever-BaseRetriever",
|
||||
"data": {
|
||||
"label": ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user