diff --git a/poetry.lock b/poetry.lock index 8ddbb21a6..ef442f1a9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -471,17 +471,17 @@ files = [ [[package]] name = "boto3" -version = "1.34.123" +version = "1.34.124" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.34.123-py3-none-any.whl", hash = "sha256:56bec52d485d5670ce96d53ae7b2cd4ae4e8a705fb2298a21093cdd77d642331"}, - {file = "boto3-1.34.123.tar.gz", hash = "sha256:42b140fc850cf261ee4b1e8ef527fa071b1f1592a6d6a68d34b29f37cc46b4dd"}, + {file = "boto3-1.34.124-py3-none-any.whl", hash = "sha256:549d9735bbb7cf8e1a2f4b3b676be32946717c59f33c47234586835dc904d04e"}, + {file = "boto3-1.34.124.tar.gz", hash = "sha256:a91ee58fa54b170f17b2e144f038e155f92cf515f1c073ac2595e9ee45f125a8"}, ] [package.dependencies] -botocore = ">=1.34.123,<1.35.0" +botocore = ">=1.34.124,<1.35.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -490,13 +490,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.34.123" +version = "1.34.124" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.34.123-py3-none-any.whl", hash = "sha256:8c34ada2a708c82e7174bff700611643db7ce2cb18f1130c35045c24310d299d"}, - {file = "botocore-1.34.123.tar.gz", hash = "sha256:a8577f6574600c4d159b5cd103ee05744a443d77f7778304e17307940b369c4f"}, + {file = "botocore-1.34.124-py3-none-any.whl", hash = "sha256:fede092c7f8f414f78f3e7991e47cb0cf2279d90c027606ad7cba79fa370b827"}, + {file = "botocore-1.34.124.tar.gz", hash = "sha256:3f0bf79c17d656acdfdb53581224f6a38867ff2829f7428c586198f67a90ea26"}, ] [package.dependencies] @@ -3057,13 +3057,13 @@ test = ["objgraph", "psutil"] [[package]] name = "groq" -version = "0.8.0" +version = "0.9.0" description = "The official Python library for the groq API" optional = false python-versions = ">=3.7" files = [ - {file = "groq-0.8.0-py3-none-any.whl", hash = "sha256:f5e4e892d45001241a930db451e633ca1f0007e3f749deaa5d7360062fcd61e3"}, - {file = "groq-0.8.0.tar.gz", hash = "sha256:37ceb2f706bd516d0bfcac8e89048a24b375172987a0d6bd9efb521c54f6deff"}, + {file = "groq-0.9.0-py3-none-any.whl", hash = "sha256:d0e46f4ad645504672bb09c8100af3ced3a7db0d5119dc13e4aca535fc455874"}, + {file = "groq-0.9.0.tar.gz", hash = "sha256:130ed5e35d3acfaab46b9e7a078eeaebf91052f4a9d71f86f87fb319b5fec332"}, ] [package.dependencies] @@ -10513,4 +10513,4 @@ local = ["ctransformers", "llama-cpp-python", "sentence-transformers"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "6cfa9f164710bf283b50a8e12e9d0c91c58f5d0176bbb277b5f5d3630ec8b2cb" +content-hash = "6f5103d7e9f32094f0ebe8f192b1b967043382a1b2b97db42c3680cd0bc11efd" diff --git a/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json b/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json index 11a497cf3..832856bd4 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/VectorStore-RAG-Flows.json @@ -8,19 +8,12 @@ "dataType": "TextOutput", "id": "TextOutput-BDknO", "name": "Text", - "output_types": [ - "Text" - ] + "output_types": ["Text"] }, "targetHandle": { "fieldName": "context", "id": "Prompt-xeI6K", - "inputTypes": [ - "Document", - "Message", - "Record", - "Text" - ], + "inputTypes": ["Document", "Message", "Record", "Text"], "type": "str" } }, @@ -41,19 +34,12 @@ "dataType": "ChatInput", "id": "ChatInput-yxMKE", "name": "message", - "output_types": [ - "Message" - ] + "output_types": ["Message"] }, "targetHandle": { "fieldName": "question", "id": "Prompt-xeI6K", - "inputTypes": [ - "Document", - "Message", - "Record", - "Text" - ], + "inputTypes": ["Document", "Message", "Record", "Text"], "type": "str" } }, @@ -74,18 +60,12 @@ "dataType": "Prompt", "id": "Prompt-xeI6K", "name": "prompt", - "output_types": [ - "Prompt" - ] + "output_types": ["Prompt"] }, "targetHandle": { "fieldName": "input_value", "id": "OpenAIModel-EjXlN", - "inputTypes": [ - "Text", - "Record", - "Prompt" - ], + "inputTypes": ["Text", "Record", "Prompt"], "type": "str" } }, @@ -106,16 +86,12 @@ "dataType": "OpenAIModel", "id": "OpenAIModel-EjXlN", "name": "text", - "output_types": [ - "Text" - ] + "output_types": ["Text"] }, "targetHandle": { "fieldName": "input_value", "id": "ChatOutput-Q39I8", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" } }, @@ -136,17 +112,12 @@ "dataType": "File", "id": "File-t0a6a", "name": "record", - "output_types": [ - "Record" - ] + "output_types": ["Record"] }, "targetHandle": { "fieldName": "inputs", "id": "RecursiveCharacterTextSplitter-tR9QM", - "inputTypes": [ - "Document", - "Record" - ], + "inputTypes": ["Document", "Record"], "type": "Document" } }, @@ -167,9 +138,7 @@ "dataType": "OpenAIEmbeddings", "id": "OpenAIEmbeddings-ZlOk1", "name": "embeddings", - "output_types": [ - "Embeddings" - ] + "output_types": ["Embeddings"] }, "targetHandle": { "fieldName": "embedding", @@ -194,16 +163,12 @@ "dataType": "ChatInput", "id": "ChatInput-yxMKE", "name": "message", - "output_types": [ - "Message" - ] + "output_types": ["Message"] }, "targetHandle": { "fieldName": "input_value", "id": "AstraDBSearch-41nRz", - "inputTypes": [ - "Text" - ], + "inputTypes": ["Text"], "type": "str" } }, @@ -223,9 +188,7 @@ "dataType": "RecursiveCharacterTextSplitter", "id": "RecursiveCharacterTextSplitter-tR9QM", "name": "record", - "output_types": [ - "Record" - ] + "output_types": ["Record"] }, "targetHandle": { "fieldName": "inputs", @@ -251,9 +214,7 @@ "dataType": "OpenAIEmbeddings", "id": "OpenAIEmbeddings-9TPjc", "name": "embeddings", - "output_types": [ - "Embeddings" - ] + "output_types": ["Embeddings"] }, "targetHandle": { "fieldName": "embedding", @@ -279,17 +240,12 @@ "dataType": "AstraDBSearch", "id": "AstraDBSearch-41nRz", "name": "record", - "output_types": [ - "Record" - ] + "output_types": ["Record"] }, "targetHandle": { "fieldName": "input_value", "id": "TextOutput-BDknO", - "inputTypes": [ - "Record", - "Text" - ], + "inputTypes": ["Record", "Text"], "type": "str" } }, @@ -308,12 +264,7 @@ "data": { "id": "ChatInput-yxMKE", "node": { - "base_classes": [ - "Text", - "str", - "object", - "Record" - ], + "base_classes": ["Text", "str", "object", "Record"], "beta": false, "custom_fields": { "input_value": null, @@ -337,9 +288,7 @@ "method": "text_response", "name": "text", "selected": "Text", - "types": [ - "Text" - ], + "types": ["Text"], "value": "__UNDEFINED__" }, { @@ -348,9 +297,7 @@ "method": "message_response", "name": "message", "selected": "Message", - "types": [ - "Message" - ], + "types": ["Message"], "value": "__UNDEFINED__" } ], @@ -401,17 +348,12 @@ "fileTypes": [], "file_path": "", "info": "Type of sender.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, "name": "sender", - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "password": false, "placeholder": "", "required": false, @@ -427,9 +369,7 @@ "fileTypes": [], "file_path": "", "info": "Name of the sender.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -449,9 +389,7 @@ "fileTypes": [], "file_path": "", "info": "Session ID for the message.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -482,11 +420,7 @@ "data": { "id": "TextOutput-BDknO", "node": { - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "beta": false, "custom_fields": { "input_value": null, @@ -499,16 +433,12 @@ "field_order": [], "frozen": false, "icon": "type", - "output_types": [ - "Text" - ], + "output_types": ["Text"], "outputs": [ { "name": "Text", "selected": "Text", - "types": [ - "Text" - ] + "types": ["Text"] } ], "template": { @@ -538,10 +468,7 @@ "fileTypes": [], "file_path": "", "info": "Text or Record to be passed as output.", - "input_types": [ - "Record", - "Text" - ], + "input_types": ["Record", "Text"], "list": false, "load_from_db": false, "multiline": false, @@ -561,9 +488,7 @@ "fileTypes": [], "file_path": "", "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": true, @@ -599,9 +524,7 @@ "data": { "id": "OpenAIEmbeddings-ZlOk1", "node": { - "base_classes": [ - "Embeddings" - ], + "base_classes": ["Embeddings"], "beta": false, "custom_fields": { "allowed_special": null, @@ -633,9 +556,7 @@ "field_formatters": {}, "field_order": [], "frozen": false, - "output_types": [ - "Embeddings" - ], + "output_types": ["Embeddings"], "outputs": [ { "cache": true, @@ -643,9 +564,7 @@ "method": null, "name": "embeddings", "selected": "Embeddings", - "types": [ - "Embeddings" - ], + "types": ["Embeddings"], "value": "__UNDEFINED__" } ], @@ -658,9 +577,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -754,9 +671,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -776,9 +691,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -789,9 +702,7 @@ "show": true, "title_case": false, "type": "str", - "value": [ - "all" - ] + "value": ["all"] }, "embedding_ctx_length": { "advanced": true, @@ -838,9 +749,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -884,9 +793,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -905,9 +812,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -927,9 +832,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -948,9 +851,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -969,9 +870,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -990,9 +889,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1092,9 +989,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1125,11 +1020,7 @@ "data": { "id": "OpenAIModel-EjXlN", "node": { - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "beta": false, "custom_fields": { "input_value": null, @@ -1159,9 +1050,7 @@ ], "frozen": false, "icon": "OpenAI", - "output_types": [ - "Text" - ], + "output_types": ["Text"], "outputs": [ { "cache": true, @@ -1169,9 +1058,7 @@ "method": null, "name": "text", "selected": "Text", - "types": [ - "Text" - ], + "types": ["Text"], "value": "__UNDEFINED__" } ], @@ -1202,11 +1089,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text", - "Record", - "Prompt" - ], + "input_types": ["Text", "Record", "Prompt"], "list": false, "load_from_db": false, "multiline": false, @@ -1263,9 +1146,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -1292,9 +1173,7 @@ "fileTypes": [], "file_path": "", "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1.\n\nYou can change this to use other APIs like JinaChat, LocalAI and Prem.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1313,9 +1192,7 @@ "fileTypes": [], "file_path": "", "info": "The OpenAI API Key to use for the OpenAI model.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1354,9 +1231,7 @@ "fileTypes": [], "file_path": "", "info": "System message to pass to the model.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1418,17 +1293,10 @@ "display_name": "Prompt", "id": "Prompt-xeI6K", "node": { - "base_classes": [ - "object", - "Text", - "str" - ], + "base_classes": ["object", "Text", "str"], "beta": false, "custom_fields": { - "template": [ - "context", - "question" - ] + "template": ["context", "question"] }, "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", @@ -1451,9 +1319,7 @@ "method": "build_prompt", "name": "prompt", "selected": "Prompt", - "types": [ - "Prompt" - ], + "types": ["Prompt"], "value": "__UNDEFINED__" }, { @@ -1462,9 +1328,7 @@ "method": "format_prompt", "name": "text", "selected": "Text", - "types": [ - "Text" - ], + "types": ["Text"], "value": "__UNDEFINED__" } ], @@ -1496,12 +1360,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Document", - "Message", - "Record", - "Text" - ], + "input_types": ["Document", "Message", "Record", "Text"], "list": false, "load_from_db": false, "multiline": true, @@ -1522,12 +1381,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Document", - "Message", - "Record", - "Text" - ], + "input_types": ["Document", "Message", "Record", "Text"], "list": false, "load_from_db": false, "multiline": true, @@ -1547,9 +1401,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1585,12 +1437,7 @@ "data": { "id": "ChatOutput-Q39I8", "node": { - "base_classes": [ - "object", - "Text", - "Record", - "str" - ], + "base_classes": ["object", "Text", "Record", "str"], "beta": false, "custom_fields": { "input_value": null, @@ -1615,9 +1462,7 @@ "method": "text_response", "name": "text", "selected": "Text", - "types": [ - "Text" - ], + "types": ["Text"], "value": "__UNDEFINED__" }, { @@ -1626,9 +1471,7 @@ "method": "message_response", "name": "message", "selected": "Message", - "types": [ - "Message" - ], + "types": ["Message"], "value": "__UNDEFINED__" } ], @@ -1659,9 +1502,7 @@ "fileTypes": [], "file_path": "", "info": "Message to be passed as output.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": true, @@ -1681,9 +1522,7 @@ "fileTypes": [], "file_path": "", "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1703,17 +1542,12 @@ "fileTypes": [], "file_path": "", "info": "Type of sender.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, "name": "sender", - "options": [ - "Machine", - "User" - ], + "options": ["Machine", "User"], "password": false, "placeholder": "", "required": false, @@ -1729,9 +1563,7 @@ "fileTypes": [], "file_path": "", "info": "Name of the sender.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1751,9 +1583,7 @@ "fileTypes": [], "file_path": "", "info": "Session ID for the message.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -1789,9 +1619,7 @@ "data": { "id": "File-t0a6a", "node": { - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "beta": false, "custom_fields": { "path": null, @@ -1804,9 +1632,7 @@ "field_order": [], "frozen": false, "icon": "file-text", - "output_types": [ - "Record" - ], + "output_types": ["Record"], "outputs": [ { "cache": true, @@ -1814,9 +1640,7 @@ "method": null, "name": "record", "selected": "Record", - "types": [ - "Record" - ], + "types": ["Record"], "value": "__UNDEFINED__" } ], @@ -1920,9 +1744,7 @@ "data": { "id": "RecursiveCharacterTextSplitter-tR9QM", "node": { - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "beta": false, "custom_fields": { "chunk_overlap": null, @@ -1936,9 +1758,7 @@ "field_formatters": {}, "field_order": [], "frozen": false, - "output_types": [ - "Record" - ], + "output_types": ["Record"], "outputs": [ { "cache": true, @@ -1946,9 +1766,7 @@ "method": null, "name": "record", "selected": "Record", - "types": [ - "Record" - ], + "types": ["Record"], "value": "__UNDEFINED__" } ], @@ -2017,10 +1835,7 @@ "fileTypes": [], "file_path": "", "info": "The texts to split.", - "input_types": [ - "Document", - "Record" - ], + "input_types": ["Document", "Record"], "list": true, "load_from_db": false, "multiline": false, @@ -2039,9 +1854,7 @@ "fileTypes": [], "file_path": "", "info": "The characters to split on.\nIf left empty defaults to [\"\\n\\n\", \"\\n\", \" \", \"\"].", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -2052,9 +1865,7 @@ "show": true, "title_case": false, "type": "str", - "value": [ - "" - ] + "value": [""] } } }, @@ -2079,9 +1890,7 @@ "data": { "id": "AstraDBSearch-41nRz", "node": { - "base_classes": [ - "Record" - ], + "base_classes": ["Record"], "beta": false, "custom_fields": { "api_endpoint": null, @@ -2116,9 +1925,7 @@ ], "frozen": false, "icon": "AstraDB", - "output_types": [ - "Record" - ], + "output_types": ["Record"], "outputs": [ { "cache": true, @@ -2126,9 +1933,7 @@ "method": null, "name": "record", "selected": "Record", - "types": [ - "Record" - ], + "types": ["Record"], "value": "__UNDEFINED__" } ], @@ -2141,9 +1946,7 @@ "fileTypes": [], "file_path": "", "info": "API endpoint URL for the Astra DB service.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": true, "multiline": false, @@ -2271,9 +2074,7 @@ "fileTypes": [], "file_path": "", "info": "The name of the collection within Astra DB where the vectors will be stored.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2311,9 +2112,7 @@ "fileTypes": [], "file_path": "", "info": "Input value to search", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2332,9 +2131,7 @@ "fileTypes": [], "file_path": "", "info": "Optional list of metadata fields to exclude from the indexing.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -2353,9 +2150,7 @@ "fileTypes": [], "file_path": "", "info": "Optional list of metadata fields to include in the indexing.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -2374,9 +2169,7 @@ "fileTypes": [], "file_path": "", "info": "Optional distance metric for vector comparisons in the vector store.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2395,9 +2188,7 @@ "fileTypes": [], "file_path": "", "info": "Optional namespace within Astra DB to use for the collection.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2454,17 +2245,12 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, "name": "search_type", - "options": [ - "Similarity", - "MMR" - ], + "options": ["Similarity", "MMR"], "password": false, "placeholder": "", "required": false, @@ -2480,18 +2266,12 @@ "fileTypes": [], "file_path": "", "info": "Configuration mode for setting up the vector store, with options like “Sync”, “Async”, or “Off”.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, "name": "setup_mode", - "options": [ - "Sync", - "Async", - "Off" - ], + "options": ["Sync", "Async", "Off"], "password": false, "placeholder": "", "required": false, @@ -2507,9 +2287,7 @@ "fileTypes": [], "file_path": "", "info": "Authentication token for accessing Astra DB.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": true, "multiline": false, @@ -2545,9 +2323,7 @@ "data": { "id": "AstraDB-eUCSS", "node": { - "base_classes": [ - "VectorStore" - ], + "base_classes": ["VectorStore"], "beta": false, "custom_fields": { "api_endpoint": null, @@ -2580,10 +2356,7 @@ ], "frozen": false, "icon": "AstraDB", - "output_types": [ - "VectorStore", - "BaseRetriever" - ], + "output_types": ["VectorStore", "BaseRetriever"], "outputs": [ { "cache": true, @@ -2591,9 +2364,7 @@ "method": null, "name": "vectorstore", "selected": "VectorStore", - "types": [ - "VectorStore" - ], + "types": ["VectorStore"], "value": "__UNDEFINED__" }, { @@ -2602,9 +2373,7 @@ "method": null, "name": "baseretriever", "selected": "BaseRetriever", - "types": [ - "BaseRetriever" - ], + "types": ["BaseRetriever"], "value": "__UNDEFINED__" } ], @@ -2617,9 +2386,7 @@ "fileTypes": [], "file_path": "", "info": "API endpoint URL for the Astra DB service.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": true, "multiline": false, @@ -2720,7 +2487,7 @@ "show": true, "title_case": false, "type": "code", - "value": "from typing import List, Optional, Union\n\nfrom langchain_core.retrievers import BaseRetriever\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Embeddings, VectorStore\nfrom langflow.schema import Record\n\n\nclass AstraDBVectorStoreComponent(CustomComponent):\n display_name = \"Astra DB\"\n description = \"Builds or loads an Astra DB Vector Store.\"\n icon = \"AstraDB\"\n field_order = [\"token\", \"api_endpoint\", \"collection_name\", \"inputs\", \"embedding\"]\n\n def build_config(self):\n return {\n \"inputs\": {\n \"display_name\": \"Inputs\",\n \"info\": \"Optional list of records to be processed and stored in the vector store.\",\n },\n \"embedding\": {\"display_name\": \"Embedding\", \"info\": \"Embedding to use\"},\n \"collection_name\": {\n \"display_name\": \"Collection Name\",\n \"info\": \"The name of the collection within Astra DB where the vectors will be stored.\",\n },\n \"token\": {\n \"display_name\": \"Token\",\n \"info\": \"Authentication token for accessing Astra DB.\",\n \"password\": True,\n },\n \"api_endpoint\": {\n \"display_name\": \"API Endpoint\",\n \"info\": \"API endpoint URL for the Astra DB service.\",\n },\n \"namespace\": {\n \"display_name\": \"Namespace\",\n \"info\": \"Optional namespace within Astra DB to use for the collection.\",\n \"advanced\": True,\n },\n \"metric\": {\n \"display_name\": \"Metric\",\n \"info\": \"Optional distance metric for vector comparisons in the vector store.\",\n \"advanced\": True,\n },\n \"batch_size\": {\n \"display_name\": \"Batch Size\",\n \"info\": \"Optional number of records to process in a single batch.\",\n \"advanced\": True,\n },\n \"bulk_insert_batch_concurrency\": {\n \"display_name\": \"Bulk Insert Batch Concurrency\",\n \"info\": \"Optional concurrency level for bulk insert operations.\",\n \"advanced\": True,\n },\n \"bulk_insert_overwrite_concurrency\": {\n \"display_name\": \"Bulk Insert Overwrite Concurrency\",\n \"info\": \"Optional concurrency level for bulk insert operations that overwrite existing records.\",\n \"advanced\": True,\n },\n \"bulk_delete_concurrency\": {\n \"display_name\": \"Bulk Delete Concurrency\",\n \"info\": \"Optional concurrency level for bulk delete operations.\",\n \"advanced\": True,\n },\n \"setup_mode\": {\n \"display_name\": \"Setup Mode\",\n \"info\": \"Configuration mode for setting up the vector store, with options like “Sync”, “Async”, or “Off”.\",\n \"options\": [\"Sync\", \"Async\", \"Off\"],\n \"advanced\": True,\n },\n \"pre_delete_collection\": {\n \"display_name\": \"Pre Delete Collection\",\n \"info\": \"Boolean flag to determine whether to delete the collection before creating a new one.\",\n \"advanced\": True,\n },\n \"metadata_indexing_include\": {\n \"display_name\": \"Metadata Indexing Include\",\n \"info\": \"Optional list of metadata fields to include in the indexing.\",\n \"advanced\": True,\n },\n \"metadata_indexing_exclude\": {\n \"display_name\": \"Metadata Indexing Exclude\",\n \"info\": \"Optional list of metadata fields to exclude from the indexing.\",\n \"advanced\": True,\n },\n \"collection_indexing_policy\": {\n \"display_name\": \"Collection Indexing Policy\",\n \"info\": \"Optional dictionary defining the indexing policy for the collection.\",\n \"advanced\": True,\n },\n }\n\n def build(\n self,\n embedding: Embeddings,\n token: str,\n api_endpoint: str,\n collection_name: str,\n inputs: Optional[List[Record]] = None,\n namespace: Optional[str] = None,\n metric: Optional[str] = None,\n batch_size: Optional[int] = None,\n bulk_insert_batch_concurrency: Optional[int] = None,\n bulk_insert_overwrite_concurrency: Optional[int] = None,\n bulk_delete_concurrency: Optional[int] = None,\n setup_mode: str = \"Sync\",\n pre_delete_collection: bool = False,\n metadata_indexing_include: Optional[List[str]] = None,\n metadata_indexing_exclude: Optional[List[str]] = None,\n collection_indexing_policy: Optional[dict] = None,\n ) -> Union[VectorStore, BaseRetriever]:\n try:\n from langchain_astradb import AstraDBVectorStore\n from langchain_astradb.utils.astradb import SetupMode\n except ImportError:\n raise ImportError(\n \"Could not import langchain Astra DB integration package. \"\n \"Please install it with `pip install langchain-astradb`.\"\n )\n\n try:\n setup_mode_value = SetupMode[setup_mode.upper()]\n except KeyError:\n raise ValueError(f\"Invalid setup mode: {setup_mode}\")\n if inputs:\n documents = [_input.to_lc_document() for _input in inputs]\n\n vector_store = AstraDBVectorStore.from_documents(\n documents=documents,\n embedding=embedding,\n collection_name=collection_name,\n token=token,\n api_endpoint=api_endpoint,\n namespace=namespace,\n metric=metric,\n batch_size=batch_size,\n bulk_insert_batch_concurrency=bulk_insert_batch_concurrency,\n bulk_insert_overwrite_concurrency=bulk_insert_overwrite_concurrency,\n bulk_delete_concurrency=bulk_delete_concurrency,\n setup_mode=setup_mode_value,\n pre_delete_collection=pre_delete_collection,\n metadata_indexing_include=metadata_indexing_include,\n metadata_indexing_exclude=metadata_indexing_exclude,\n collection_indexing_policy=collection_indexing_policy,\n )\n else:\n vector_store = AstraDBVectorStore(\n embedding=embedding,\n collection_name=collection_name,\n token=token,\n api_endpoint=api_endpoint,\n namespace=namespace,\n metric=metric,\n batch_size=batch_size,\n bulk_insert_batch_concurrency=bulk_insert_batch_concurrency,\n bulk_insert_overwrite_concurrency=bulk_insert_overwrite_concurrency,\n bulk_delete_concurrency=bulk_delete_concurrency,\n setup_mode=setup_mode_value,\n pre_delete_collection=pre_delete_collection,\n metadata_indexing_include=metadata_indexing_include,\n metadata_indexing_exclude=metadata_indexing_exclude,\n collection_indexing_policy=collection_indexing_policy,\n )\n\n return vector_store\n return vector_store\n" + "value": "from typing import List, Optional, Union\n\nfrom langflow.custom import CustomComponent\nfrom langflow.field_typing import Embeddings, VectorStore\nfrom langflow.schema import Record\nfrom langchain_core.retrievers import BaseRetriever\n\n\nclass AstraDBVectorStoreComponent(CustomComponent):\n display_name = \"Astra DB\"\n description = \"Builds or loads an Astra DB Vector Store.\"\n icon = \"AstraDB\"\n field_order = [\"token\", \"api_endpoint\", \"collection_name\", \"inputs\", \"embedding\"]\n\n def build_config(self):\n return {\n \"inputs\": {\n \"display_name\": \"Inputs\",\n \"info\": \"Optional list of records to be processed and stored in the vector store.\",\n },\n \"embedding\": {\"display_name\": \"Embedding\", \"info\": \"Embedding to use\"},\n \"collection_name\": {\n \"display_name\": \"Collection Name\",\n \"info\": \"The name of the collection within Astra DB where the vectors will be stored.\",\n },\n \"token\": {\n \"display_name\": \"Token\",\n \"info\": \"Authentication token for accessing Astra DB.\",\n \"password\": True,\n },\n \"api_endpoint\": {\n \"display_name\": \"API Endpoint\",\n \"info\": \"API endpoint URL for the Astra DB service.\",\n },\n \"namespace\": {\n \"display_name\": \"Namespace\",\n \"info\": \"Optional namespace within Astra DB to use for the collection.\",\n \"advanced\": True,\n },\n \"metric\": {\n \"display_name\": \"Metric\",\n \"info\": \"Optional distance metric for vector comparisons in the vector store.\",\n \"advanced\": True,\n },\n \"batch_size\": {\n \"display_name\": \"Batch Size\",\n \"info\": \"Optional number of records to process in a single batch.\",\n \"advanced\": True,\n },\n \"bulk_insert_batch_concurrency\": {\n \"display_name\": \"Bulk Insert Batch Concurrency\",\n \"info\": \"Optional concurrency level for bulk insert operations.\",\n \"advanced\": True,\n },\n \"bulk_insert_overwrite_concurrency\": {\n \"display_name\": \"Bulk Insert Overwrite Concurrency\",\n \"info\": \"Optional concurrency level for bulk insert operations that overwrite existing records.\",\n \"advanced\": True,\n },\n \"bulk_delete_concurrency\": {\n \"display_name\": \"Bulk Delete Concurrency\",\n \"info\": \"Optional concurrency level for bulk delete operations.\",\n \"advanced\": True,\n },\n \"setup_mode\": {\n \"display_name\": \"Setup Mode\",\n \"info\": \"Configuration mode for setting up the vector store, with options like “Sync”, “Async”, or “Off”.\",\n \"options\": [\"Sync\", \"Async\", \"Off\"],\n \"advanced\": True,\n },\n \"pre_delete_collection\": {\n \"display_name\": \"Pre Delete Collection\",\n \"info\": \"Boolean flag to determine whether to delete the collection before creating a new one.\",\n \"advanced\": True,\n },\n \"metadata_indexing_include\": {\n \"display_name\": \"Metadata Indexing Include\",\n \"info\": \"Optional list of metadata fields to include in the indexing.\",\n \"advanced\": True,\n },\n \"metadata_indexing_exclude\": {\n \"display_name\": \"Metadata Indexing Exclude\",\n \"info\": \"Optional list of metadata fields to exclude from the indexing.\",\n \"advanced\": True,\n },\n \"collection_indexing_policy\": {\n \"display_name\": \"Collection Indexing Policy\",\n \"info\": \"Optional dictionary defining the indexing policy for the collection.\",\n \"advanced\": True,\n },\n }\n\n def build(\n self,\n embedding: Embeddings,\n token: str,\n api_endpoint: str,\n collection_name: str,\n inputs: Optional[List[Record]] = None,\n namespace: Optional[str] = None,\n metric: Optional[str] = None,\n batch_size: Optional[int] = None,\n bulk_insert_batch_concurrency: Optional[int] = None,\n bulk_insert_overwrite_concurrency: Optional[int] = None,\n bulk_delete_concurrency: Optional[int] = None,\n setup_mode: str = \"Sync\",\n pre_delete_collection: bool = False,\n metadata_indexing_include: Optional[List[str]] = None,\n metadata_indexing_exclude: Optional[List[str]] = None,\n collection_indexing_policy: Optional[dict] = None,\n ) -> Union[VectorStore, BaseRetriever]:\n try:\n from langchain_astradb import AstraDBVectorStore\n from langchain_astradb.utils.astradb import SetupMode\n except ImportError:\n raise ImportError(\n \"Could not import langchain Astra DB integration package. \"\n \"Please install it with `pip install langchain-astradb`.\"\n )\n\n try:\n setup_mode_value = SetupMode[setup_mode.upper()]\n except KeyError:\n raise ValueError(f\"Invalid setup mode: {setup_mode}\")\n if inputs:\n documents = [_input.to_lc_document() for _input in inputs]\n\n vector_store = AstraDBVectorStore.from_documents(\n documents=documents,\n embedding=embedding,\n collection_name=collection_name,\n token=token,\n api_endpoint=api_endpoint,\n namespace=namespace,\n metric=metric,\n batch_size=batch_size,\n bulk_insert_batch_concurrency=bulk_insert_batch_concurrency,\n bulk_insert_overwrite_concurrency=bulk_insert_overwrite_concurrency,\n bulk_delete_concurrency=bulk_delete_concurrency,\n setup_mode=setup_mode_value,\n pre_delete_collection=pre_delete_collection,\n metadata_indexing_include=metadata_indexing_include,\n metadata_indexing_exclude=metadata_indexing_exclude,\n collection_indexing_policy=collection_indexing_policy,\n )\n else:\n vector_store = AstraDBVectorStore(\n embedding=embedding,\n collection_name=collection_name,\n token=token,\n api_endpoint=api_endpoint,\n namespace=namespace,\n metric=metric,\n batch_size=batch_size,\n bulk_insert_batch_concurrency=bulk_insert_batch_concurrency,\n bulk_insert_overwrite_concurrency=bulk_insert_overwrite_concurrency,\n bulk_delete_concurrency=bulk_delete_concurrency,\n setup_mode=setup_mode_value,\n pre_delete_collection=pre_delete_collection,\n metadata_indexing_include=metadata_indexing_include,\n metadata_indexing_exclude=metadata_indexing_exclude,\n collection_indexing_policy=collection_indexing_policy,\n )\n\n return vector_store\n return vector_store\n" }, "collection_indexing_policy": { "advanced": true, @@ -2747,9 +2514,7 @@ "fileTypes": [], "file_path": "", "info": "The name of the collection within Astra DB where the vectors will be stored.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2805,9 +2570,7 @@ "fileTypes": [], "file_path": "", "info": "Optional list of metadata fields to exclude from the indexing.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -2826,9 +2589,7 @@ "fileTypes": [], "file_path": "", "info": "Optional list of metadata fields to include in the indexing.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -2847,9 +2608,7 @@ "fileTypes": [], "file_path": "", "info": "Optional distance metric for vector comparisons in the vector store.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2868,9 +2627,7 @@ "fileTypes": [], "file_path": "", "info": "Optional namespace within Astra DB to use for the collection.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -2908,18 +2665,12 @@ "fileTypes": [], "file_path": "", "info": "Configuration mode for setting up the vector store, with options like “Sync”, “Async”, or “Off”.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, "name": "setup_mode", - "options": [ - "Sync", - "Async", - "Off" - ], + "options": ["Sync", "Async", "Off"], "password": false, "placeholder": "", "required": false, @@ -2935,9 +2686,7 @@ "fileTypes": [], "file_path": "", "info": "Authentication token for accessing Astra DB.", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": true, "multiline": false, @@ -2973,9 +2722,7 @@ "data": { "id": "OpenAIEmbeddings-9TPjc", "node": { - "base_classes": [ - "Embeddings" - ], + "base_classes": ["Embeddings"], "beta": false, "custom_fields": { "allowed_special": null, @@ -3007,9 +2754,7 @@ "field_formatters": {}, "field_order": [], "frozen": false, - "output_types": [ - "Embeddings" - ], + "output_types": ["Embeddings"], "outputs": [ { "cache": true, @@ -3017,9 +2762,7 @@ "method": null, "name": "embeddings", "selected": "Embeddings", - "types": [ - "Embeddings" - ], + "types": ["Embeddings"], "value": "__UNDEFINED__" } ], @@ -3032,9 +2775,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -3128,9 +2869,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3150,9 +2889,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -3163,9 +2900,7 @@ "show": true, "title_case": false, "type": "str", - "value": [ - "all" - ] + "value": ["all"] }, "embedding_ctx_length": { "advanced": true, @@ -3212,9 +2947,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": true, "load_from_db": false, "multiline": false, @@ -3258,9 +2991,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3279,9 +3010,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3301,9 +3030,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3322,9 +3049,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3343,9 +3068,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3364,9 +3087,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3466,9 +3187,7 @@ "fileTypes": [], "file_path": "", "info": "", - "input_types": [ - "Text" - ], + "input_types": ["Text"], "list": false, "load_from_db": false, "multiline": false, @@ -3511,4 +3230,4 @@ "is_component": false, "last_tested_version": "1.0.0a0", "name": "Vector Store RAG" -} \ No newline at end of file +}