From 75ffe0b11b19e53128f1f1e6ba7577def222103f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= <38133825+joaoguilhermeS@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:41:30 -0300 Subject: [PATCH] feat: Add Elasticsearch VectorStore Component with Ingest and Advanced Search Capabilities (#3899) * feat: adding Elasticsearch VectorStore component code * update: adding langchain-elasticsearch dependency * update: adding langchain-elasticsearch dependency (ruff format fix) * Add `langchain-elasticsearch` dependency to pyproject.toml * Refactor type hints to use PEP 585 syntax in Elasticsearch vector store component * Refactor ElasticsearchVectorStoreComponent for improved readability and error handling - Consolidated import statements and removed unused imports. - Reformatted long strings for better readability. - Enhanced error messages with variable assignment for clarity. - Removed redundant else clause in search_documents method. --------- Co-authored-by: Gabriel Luiz Freitas Almeida --- poetry.lock | 119 ++++++++ pyproject.toml | 2 + .../components/vectorstores/Elasticsearch.py | 264 ++++++++++++++++++ uv.lock | 82 ++++++ 4 files changed, 467 insertions(+) create mode 100644 src/backend/base/langflow/components/vectorstores/Elasticsearch.py diff --git a/poetry.lock b/poetry.lock index cffc9fd75a6..881c7cf1620 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2117,6 +2117,8 @@ files = [ [package.dependencies] elastic-transport = ">=8.13,<9" +numpy = {version = ">=1", optional = true, markers = "extra == \"vectorstore-mmr\""} +simsimd = {version = ">=3", optional = true, markers = "extra == \"vectorstore-mmr\""} [package.extras] async = ["aiohttp (>=3,<4)"] @@ -4715,6 +4717,21 @@ PyYAML = ">=5.3" tenacity = ">=8.1.0,<8.4.0 || >8.4.0,<9.0.0" typing-extensions = ">=4.7" +[[package]] +name = "langchain-elasticsearch" +version = "0.2.2" +description = "An integration package connecting Elasticsearch and LangChain" +optional = false +python-versions = "<4.0,>=3.8.1" +files = [ + {file = "langchain_elasticsearch-0.2.2-py3-none-any.whl", hash = "sha256:2b0ae1637afc6890c371fc67be2151954db3c7f5382a07dafe4cf3bd762c6f26"}, + {file = "langchain_elasticsearch-0.2.2.tar.gz", hash = "sha256:7abe1cdee9f3b1a5f4152d2f79514359d0b95dc6d3923d3adb4ac431be854545"}, +] + +[package.dependencies] +elasticsearch = {version = ">=8.13.1,<9.0.0", extras = ["vectorstore-mmr"]} +langchain-core = ">=0.1.50,<0.3" + [[package]] name = "langchain-experimental" version = "0.0.61" @@ -9805,6 +9822,108 @@ files = [ {file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"}, ] +[[package]] +name = "simsimd" +version = "5.4.2" +description = "Fastest SIMD-Accelerated Vector Similarity Functions for x86 and Arm" +optional = false +python-versions = "*" +files = [ + {file = "simsimd-5.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:66a7c5aad04748a22e872e830a3903d0c75e6cb768de3793dc35e4d882637303"}, + {file = "simsimd-5.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:122017c54782c600fe323d94d58954a742a40966780f778cefdd19d2754f72e1"}, + {file = "simsimd-5.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:abee498ec2d1e58022af112574136e9e0c96eb009d9cdba052ae5991eca1358d"}, + {file = "simsimd-5.4.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2be43ce56c6557299ae4b65fe7a8ba0b347c21cc18d2fde2e6d8601b2ac384f4"}, + {file = "simsimd-5.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:97d5bf0e3e5728f0dc9d18f274d2d62451132ab007ea1f5bb0ec41f0499628b2"}, + {file = "simsimd-5.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6374c10dff1b8273f02e04be7573278e6811881e789d2b23d20f03731d62516"}, + {file = "simsimd-5.4.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:72e3f0dfde8c8b3dd8082cb418c3c73f969fd4b09913e5a22cda4eb1639a4bf7"}, + {file = "simsimd-5.4.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:657bc36805d31c536e0d3c5cf5fec86f4213ea7aea17d802a4fa39ea6ddfd4ad"}, + {file = "simsimd-5.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0163396e23b8c0d764a7847e91135bd3a06ee175d6620889cf21f44602b06d81"}, + {file = "simsimd-5.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:64886dc6c28135d9304f33514cf60d9f055ceaf3cb63a70e77b9fdf283c29589"}, + {file = "simsimd-5.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4c2bcf56a16eeca463b838843ca80ea7c201cf6cd01de82b2ffbb55aa745780e"}, + {file = "simsimd-5.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:f5f4d835afc06a3c6483eecead4670ff395a21cc397822130cf1689dcc93aa31"}, + {file = "simsimd-5.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5c2978807a7f8711a5c98b485243a88ba709d27f39d869305d90eb6066eae6ed"}, + {file = "simsimd-5.4.2-cp310-cp310-win32.whl", hash = "sha256:3f83fe2f9bb1ff4fac7157f3be657fa8a18aff3351fb0488e1cf2d541c79139a"}, + {file = "simsimd-5.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:d52095f31a52f4081c49e0dee43df09fb28a63d018f8a4ed68e454254c97ec8d"}, + {file = "simsimd-5.4.2-cp310-cp310-win_arm64.whl", hash = "sha256:e90ca7cce00d464ba1f045a2a70f3a6ec37b4620b1855c759f158661ca33e3b5"}, + {file = "simsimd-5.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a5a8a0767042b97e3f9e1f3dca3a42007b8b47c7936606d7239c077efd35345"}, + {file = "simsimd-5.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9084bc98f414dd0343dd2cadc878143458480cc79cbcbd47abe389455c905512"}, + {file = "simsimd-5.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:843d2ef7eaeb7ca741cf6acfe49a1854d29fd65f50b9cca37e82b8301a23d175"}, + {file = "simsimd-5.4.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:301865384756be7af15bf24f7544bbf120c381ac24a0b0b837defa1bc7f0726c"}, + {file = "simsimd-5.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00b685c51a87506e58bfa1f53d3b1d346e8e09d99dfadaf5f330672235799a39"}, + {file = "simsimd-5.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:53485eac53af43b867fef7dcc9f4323a63933632fc9ed7171af2ab3aa95ea3d0"}, + {file = "simsimd-5.4.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:ade8e270ef941d4b4148371d5a5f67dc9302843dbf2c6a6e90d8d165f0dea1a1"}, + {file = "simsimd-5.4.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:ed4d7b4dff94296f698de500097c87d5f8c6935b12e210d9c521b5080cac6be9"}, + {file = "simsimd-5.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:429b998a57826a7b8720088320ef5dca1346abcd43e72ce541b5cc5fbe6f4cd6"}, + {file = "simsimd-5.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f24d09407f9ada45ade23afed95294b0f0f01743b8f16cbad6f1c46d69cc15a0"}, + {file = "simsimd-5.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:525f4049618a21ed1ec775c77c6d4a261526605b4fed0f5e3832cb38e9e08fef"}, + {file = "simsimd-5.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:47d5f48b1599718cb7a7968281c2c981cbad7949ca42218e74d7c3f1a9614086"}, + {file = "simsimd-5.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f7b075618654fd7676b2b11493edf723c670c864f63bfbf97b2f68cabd9b01d2"}, + {file = "simsimd-5.4.2-cp311-cp311-win32.whl", hash = "sha256:9dcfe6c9d0ed020f9a886331ea52dac3874703b4790a54963661e7ddd6a7e42a"}, + {file = "simsimd-5.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e6656717cdb4c50c5ae120d01a2ffcec3175dd4bbedf0c3223c2b76c4db3f5ed"}, + {file = "simsimd-5.4.2-cp311-cp311-win_arm64.whl", hash = "sha256:e25fd6110d977737f5a73a701eecf0a393d4d2231301d4ee8cf9223bdade02db"}, + {file = "simsimd-5.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a5e81fb7aa2965fe7758d281280728f44beced50a5f8c7fa21d0f26ffbea7ce3"}, + {file = "simsimd-5.4.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:62d861b019be3c3cf492926b61464954f62e76f4d6f67abeeef5c13046694e53"}, + {file = "simsimd-5.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d0e48b4d40cf54ded06a98509bec8a0ecd2574878afd807b92cce02fc2ed6640"}, + {file = "simsimd-5.4.2-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e42395167d7ee6e052a1ba60789ab0ca1f17eccc4f5d5cd4de7dd8777a271ad"}, + {file = "simsimd-5.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38caa7cb803d037adb16d7a1ebe91bfdf2f7d844de1b3d23a8d4c461eea98f13"}, + {file = "simsimd-5.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:048659b51556558aba3e268b4a0a523eee7b9e2c5cd6683d86d6af75ce598193"}, + {file = "simsimd-5.4.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:b25eb72e4ee9e7a51d9658ea5485afac8a6d4e00dadda61e4e275c0617d706a9"}, + {file = "simsimd-5.4.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:b70b629f538388cf3817a887d9068b393952fe62b236484436324355bfd83809"}, + {file = "simsimd-5.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3039650261f196abf251ee5fa58ce9bfae6bd571d7b48c525deeba6fe3ff1385"}, + {file = "simsimd-5.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:fa4adee01d5bdd64f3fbd8397a54675d8bc32a8a04c68643ae7724281fa53fab"}, + {file = "simsimd-5.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6f2a7469a3775e14e92db5333e13ae76df7bb84105e6d5c35274cde3f77ffe4b"}, + {file = "simsimd-5.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d75dbbddf28ee09e05d112e0f993f09fc2b8500ead7f4dbe6ca2f1ca29708f01"}, + {file = "simsimd-5.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:da4994ad65ca44e5bb2a5d9c1240021c29f86b74931c3a4bd8cc2e3a2c1908a2"}, + {file = "simsimd-5.4.2-cp312-cp312-win32.whl", hash = "sha256:9c3545fff1401abd566a40e2bee63ac59a2bfdc971b47309595435ead0037fa6"}, + {file = "simsimd-5.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:4363255646f9fc1916fd541383a27f6d02483bbfdc9f8e0a501060f258af4fb0"}, + {file = "simsimd-5.4.2-cp312-cp312-win_arm64.whl", hash = "sha256:a099b91cd56c96437dfe03ddf9f47c2135a42a45e57f2a6aa6f571cf1f7125bd"}, + {file = "simsimd-5.4.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dd7d651b7f2c06772eb70d6ae8bcea37e2674f227472a6faf949e6358ec1fb0f"}, + {file = "simsimd-5.4.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1457733032b4177178caab9bc4546f6293c3e6f0fa09fb25460d606dcf2c6e15"}, + {file = "simsimd-5.4.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6fbe6016f1f39a3a6e10d413a86ab9a02f847dba85a4902c05bc40bece2be197"}, + {file = "simsimd-5.4.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:591652ca3c1dc4be6916b9ca1f5783acee71663e5408327acfb7d9454954914a"}, + {file = "simsimd-5.4.2-cp37-cp37m-manylinux_2_28_aarch64.whl", hash = "sha256:2549a455f95cd686017ce96394b87c27ce1b07f14c22e62cf2970a1d0c8c02ae"}, + {file = "simsimd-5.4.2-cp37-cp37m-manylinux_2_28_x86_64.whl", hash = "sha256:08f3d084e72fecfd429ff1da796f4b80a0cf6c501f270a440c35069d3a04a7be"}, + {file = "simsimd-5.4.2-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:7e586811fb00434434bd5a3378babf9a818d1704b1f4a919765ecc20be4f1d98"}, + {file = "simsimd-5.4.2-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:e5ee764939640cbc0af11055f3959a25fb95e6c57c2900f650ea81cfbbfeca4d"}, + {file = "simsimd-5.4.2-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:22f7d140c74d0a28db8e369ff3d9a1334d04500bbea5b0a826b91450dd521ec0"}, + {file = "simsimd-5.4.2-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:d68d392c6482039ce4d25c0352532749c5d7b5bbfaa847f98baa023308728140"}, + {file = "simsimd-5.4.2-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0256d95bb6ffa01e4c200752cfc7f48ba52a22e4d0b655aa88d5ab79d1860c79"}, + {file = "simsimd-5.4.2-cp37-cp37m-win32.whl", hash = "sha256:c63195c2f8551e0aa599959ce119bd29947f561bb98569889ee08eb084bd5a30"}, + {file = "simsimd-5.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:77e13e55ae7e9a7e9dc16fd85a4ce5c48543681dd382a38ec3691f186894dc3d"}, + {file = "simsimd-5.4.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:4833ca6bfd3fe6625e02279d76788850521d2bc3985b4a686cf80a073a3385d8"}, + {file = "simsimd-5.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:84df304e7da94428af75f53970b99f55987660d38ddcd55a48422f73e2c82f04"}, + {file = "simsimd-5.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:203e0dd865e241e8bb9bb3fb54ea7389ec789fc2c8c6498b55acfa43ac976df2"}, + {file = "simsimd-5.4.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96969b2e04bf35b04cb865c9aaa3ce71193169b6b291a49f9db75a5736ec17d8"}, + {file = "simsimd-5.4.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:18012060bea0e4920842d67af4505ae6f9c7712ea8401b058befe17006441661"}, + {file = "simsimd-5.4.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dca1a480f68083fc91ce7e75a2cd8881b7da475484451db31c2cc74423cef73f"}, + {file = "simsimd-5.4.2-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:2affda3fa0344579b0b6f745b87b13ffd6eb6292fb498ec07bb9055cf06216e9"}, + {file = "simsimd-5.4.2-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aee9c2bc6c4dce1e5a500aece59b5aa619c34236e9f77773100056cf8506eff6"}, + {file = "simsimd-5.4.2-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:cf4ec869f7518f2a0dd8d50b0d4307962c1f6ae3f361f6ffdc2f475d18afd57e"}, + {file = "simsimd-5.4.2-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:a0433ffa2fa10389198924c242dff2c267fad33a6670151aaa8280d94af3db16"}, + {file = "simsimd-5.4.2-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:0142ae015a7dbb4902282ba0fc5e72be147d6ea3fa9fed2672e44c6ff00511f7"}, + {file = "simsimd-5.4.2-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:273b858d167d3190ec4d35f3d151e0dee2b5a242ccb385693ca949ee899b6c62"}, + {file = "simsimd-5.4.2-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:292d5e2ca077413a58f5cc31e96e5533f001c5df73468712abe31ad5ddac163a"}, + {file = "simsimd-5.4.2-cp38-cp38-win32.whl", hash = "sha256:3a53a30e814e11cb5cf802695c6ea1e25629dacf1f7d453681943176386c69b7"}, + {file = "simsimd-5.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:20c3d90d2c417145d0953ee1cc2f015e514fad198fcf500d3351984d479e25c0"}, + {file = "simsimd-5.4.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1a94a17bd8cd18ffd611125ab8a42b8c0cc7ebd18d16a651d096a683a2f40818"}, + {file = "simsimd-5.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4577b8d7b746536752297fba97116f74da23be3b52b7a955846c2d6ec7aaea51"}, + {file = "simsimd-5.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:34ae1cde6644caba81ceaed8ae429ee470fef39fc9b6be2cfffb8ea0e1092b20"}, + {file = "simsimd-5.4.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70647c3ff8f24682c0211fc0b88d9fb3a2a7f4a193cd44975d87c215b8f11f34"}, + {file = "simsimd-5.4.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6ef37e04858e3dca6d92ff8e27767c5299d634ee91af1e765382d98fe86c54c0"}, + {file = "simsimd-5.4.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fbef168a7362b46aa972e9f7b33ad120d9eb637291f7cb971e30374fdc92f0e1"}, + {file = "simsimd-5.4.2-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:5f1222baa12b44604ece0febf3adacd279f2866f13751cb0c56d23abf3cc279a"}, + {file = "simsimd-5.4.2-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:dfab8bea75f6cc5717131723c13b727f2d70cb0f8268bf0217e8835b720debd6"}, + {file = "simsimd-5.4.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0fc362bddd831ab2adebee47ea882a170b3b1275bb462ae68329caea0609255b"}, + {file = "simsimd-5.4.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:298ccf4ff37e6fc43201245657d65470098694835771d126322ab671f479a54f"}, + {file = "simsimd-5.4.2-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:6f3a5c87f10dd2cc858df4c6dbff0b27905547e05e96944fa4d960cebfbc1e2b"}, + {file = "simsimd-5.4.2-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:482eb8e6839eba91819f24f1759c5d604fe8b7e0eed576ef99fb1efce7e9675f"}, + {file = "simsimd-5.4.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:f811d03685b177d8054e20a3a7ba4e9c714ab6eb0c956d9d56cad78e4c2c14dc"}, + {file = "simsimd-5.4.2-cp39-cp39-win32.whl", hash = "sha256:daac1a76a6c85cfd837510f79c6dbee62d5bc1f448a013a9b4937d6a66fe1cd1"}, + {file = "simsimd-5.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:bdb92fa486c735cbd7eb6074e0c529cd2665898db9ee70d4801e0581a937febe"}, + {file = "simsimd-5.4.2-cp39-cp39-win_arm64.whl", hash = "sha256:a7b8afe88c1cc8a06b61932126c0aee1af82d0de45a13135e40a9f406d5a909f"}, + {file = "simsimd-5.4.2.tar.gz", hash = "sha256:86ef77a237f47bddbdd8e89b36a8096fad461197d6f7ba20602a863191196542"}, +] + [[package]] name = "six" version = "1.16.0" diff --git a/pyproject.toml b/pyproject.toml index df6c717938e..4c6747c6ab1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -113,6 +113,7 @@ dependencies = [ "pydantic-settings==2.4.0", "ragstack-ai-knowledge-store>=0.2.1", "duckduckgo-search>=6.2.11", + "langchain-elasticsearch>=0.2.0", ] [project.optional-dependencies] @@ -229,6 +230,7 @@ langchain-unstructured = "^0.1.2" pydantic-settings = "2.4.0" ragstack-ai-knowledge-store = "^0.2.1" duckduckgo-search = "^6.2.12" +langchain-elasticsearch = "^0.2.0" opensearch-py = "^2.7.1" diff --git a/src/backend/base/langflow/components/vectorstores/Elasticsearch.py b/src/backend/base/langflow/components/vectorstores/Elasticsearch.py new file mode 100644 index 00000000000..2412b415daa --- /dev/null +++ b/src/backend/base/langflow/components/vectorstores/Elasticsearch.py @@ -0,0 +1,264 @@ +from typing import Any + +from langchain.schema import Document +from langchain_elasticsearch import ElasticsearchStore +from loguru import logger + +from langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store +from langflow.io import ( + DataInput, + DropdownInput, + FloatInput, + HandleInput, + IntInput, + MultilineInput, + SecretStrInput, + StrInput, +) +from langflow.schema import Data + + +class ElasticsearchVectorStoreComponent(LCVectorStoreComponent): + """ + Elasticsearch Vector Store with with advanced, customizable search capabilities. + """ + + display_name: str = "Elasticsearch" + description: str = "Elasticsearch Vector Store with with advanced, customizable search capabilities." + documentation = "https://python.langchain.com/docs/integrations/vectorstores/elasticsearch" + name = "Elasticsearch" + icon = "ElasticsearchStore" + + inputs = [ + StrInput( + name="elasticsearch_url", + display_name="Elasticsearch URL", + value="http://localhost:9200", + info="URL for self-managed Elasticsearch deployments (e.g., http://localhost:9200). " + "Do not use with Elastic Cloud deployments, use Elastic Cloud ID instead.", + ), + SecretStrInput( + name="cloud_id", + display_name="Elastic Cloud ID", + value="", + info="Use this for Elastic Cloud deployments. Do not use together with 'Elasticsearch URL'.", + ), + StrInput( + name="index_name", + display_name="Index Name", + value="langflow", + info="The index name where the vectors will be stored in Elasticsearch cluster.", + ), + MultilineInput( + name="search_input", + display_name="Search Input", + info="Enter a search query. Leave empty to retrieve all documents.", + ), + StrInput( + name="username", + display_name="Username", + value="", + advanced=False, + info=( + "Elasticsearch username (e.g., 'elastic'). " + "Required for both local and Elastic Cloud setups unless API keys are used." + ), + ), + SecretStrInput( + name="password", + display_name="Password", + value="", + advanced=False, + info=( + "Elasticsearch password for the specified user. " + "Required for both local and Elastic Cloud setups unless API keys are used." + ), + ), + DataInput( + name="ingest_data", + display_name="Ingest Data", + is_list=True, + ), + HandleInput( + name="embedding", + display_name="Embedding", + input_types=["Embeddings"], + ), + DropdownInput( + name="search_type", + display_name="Search Type", + options=["similarity", "mmr"], + value="similarity", + advanced=True, + ), + IntInput( + name="number_of_results", + display_name="Number of Results", + info="Number of results to return.", + advanced=True, + value=4, + ), + FloatInput( + name="search_score_threshold", + display_name="Search Score Threshold", + info="Minimum similarity score threshold for search results.", + value=0.0, + advanced=True, + ), + SecretStrInput( + name="api_key", + display_name="Elastic API Key", + value="", + advanced=True, + info="API Key for Elastic Cloud authentication. If used, 'username' and 'password' are not required.", + ), + ] + + @check_cached_vector_store + def build_vector_store(self) -> ElasticsearchStore: + """ + Builds the Elasticsearch Vector Store object. + """ + if self.cloud_id and self.elasticsearch_url: + msg = ( + "Both 'cloud_id' and 'elasticsearch_url' provided. " + "Please use only one based on your deployment (Cloud or Local)." + ) + raise ValueError(msg) + + es_params = { + "index_name": self.index_name, + "embedding": self.embedding, + "es_user": self.username if self.username else None, + "es_password": self.password if self.password else None, + } + + if self.cloud_id: + es_params["es_cloud_id"] = self.cloud_id + else: + es_params["es_url"] = self.elasticsearch_url + + if self.api_key: + es_params["api_key"] = self.api_key + + elasticsearch = ElasticsearchStore(**es_params) + + # If documents are provided, add them to the store + if self.ingest_data: + documents = self._prepare_documents() + if documents: + elasticsearch.add_documents(documents) + + return elasticsearch + + def _prepare_documents(self) -> list[Document]: + """ + Prepares documents from the input data to add to the vector store. + """ + documents = [] + for data in self.ingest_data: + if isinstance(data, Data): + documents.append(data.to_lc_document()) + else: + error_message = "Vector Store Inputs must be Data objects." + logger.error(error_message) + raise ValueError(error_message) + return documents + + def _add_documents_to_vector_store(self, vector_store: "ElasticsearchStore") -> None: + """ + Adds documents to the Vector Store. + """ + documents = self._prepare_documents() + if documents and self.embedding: + logger.debug(f"Adding {len(documents)} documents to the Vector Store.") + vector_store.add_documents(documents) + else: + logger.debug("No documents to add to the Vector Store.") + + def search(self, query: str | None = None) -> list[dict[str, Any]]: + """ + Search for similar documents in the vector store or retrieve all documents + if no query is provided. + """ + vector_store = self.build_vector_store() + search_kwargs = { + "k": self.number_of_results, + "score_threshold": self.search_score_threshold, + } + + if query: + search_type = self.search_type.lower() + try: + if search_type == "similarity": + results = vector_store.similarity_search_with_score(query, **search_kwargs) + elif search_type == "mmr": + results = vector_store.max_marginal_relevance_search(query, **search_kwargs) + else: + msg = f"Invalid search type: {self.search_type}" + raise ValueError(msg) + except Exception as e: + logger.error(f"Search query failed: {str(e)}") + msg = ( + "Error occurred while querying the Elasticsearch VectorStore," + " there is no Data into the VectorStore." + ) + raise ValueError(msg) from e + return [ + {"page_content": doc.page_content, "metadata": doc.metadata, "score": score} for doc, score in results + ] + results = self.get_all_documents(vector_store, **search_kwargs) + return [{"page_content": doc.page_content, "metadata": doc.metadata, "score": score} for doc, score in results] + + def get_all_documents(self, vector_store: ElasticsearchStore, **kwargs) -> list[tuple[Document, float]]: + """ + Retrieve all documents from the vector store. + """ + client = vector_store.client + index_name = self.index_name + + query = { + "query": {"match_all": {}}, + "size": kwargs.get("k", self.number_of_results), + } + + response = client.search(index=index_name, body=query) + + results = [] + for hit in response["hits"]["hits"]: + doc = Document( + page_content=hit["_source"].get("text", ""), + metadata=hit["_source"].get("metadata", {}), + ) + score = hit["_score"] + results.append((doc, score)) + + return results + + def search_documents(self) -> list[Data]: + """ + Search for documents in the vector store based on the search input. + If no search input is provided, retrieve all documents. + """ + results = self.search(self.search_input) + retrieved_data = [ + Data( + text=result["page_content"], + file_path=result["metadata"].get("file_path", ""), + ) + for result in results + ] + self.status = retrieved_data + return retrieved_data + + def get_retriever_kwargs(self): + """ + Get the keyword arguments for the retriever. + """ + return { + "search_type": self.search_type.lower(), + "search_kwargs": { + "k": self.number_of_results, + "score_threshold": self.search_score_threshold, + }, + } diff --git a/uv.lock b/uv.lock index 88d2d41ff91..9b8d54d1c1d 100644 --- a/uv.lock +++ b/uv.lock @@ -1535,6 +1535,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/de/20/6f1d6977f68389116e40a0108a5bfd468f3a0cceabe90b522693834bb5ec/elasticsearch-8.15.1-py3-none-any.whl", hash = "sha256:02a0476e98768a30d7926335fc0d305c04fdb928eea1354c6e6040d8c2814569", size = 524643 }, ] +[package.optional-dependencies] +vectorstore-mmr = [ + { name = "numpy" }, + { name = "simsimd" }, +] + [[package]] name = "embedchain" version = "0.1.122" @@ -3194,6 +3200,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/bc/02/2b2cf9550cee1a7ffa42fe60c55e2d0e7d397535609b42562611fb40e78d/langchain_core-0.2.41-py3-none-any.whl", hash = "sha256:3278fda5ba9a05defae8bb19f1226032add6aab21917db7b3bc74e750e263e84", size = 397013 }, ] +[[package]] +name = "langchain-elasticsearch" +version = "0.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "elasticsearch", extra = ["vectorstore-mmr"] }, + { name = "langchain-core" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/ff/db35bc0ccb3c407b2430b54ef63535649d6bc976fe861a39b9e7f584c701/langchain_elasticsearch-0.2.2.tar.gz", hash = "sha256:7abe1cdee9f3b1a5f4152d2f79514359d0b95dc6d3923d3adb4ac431be854545", size = 22143 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/53/a4/2d2ce49925c730a1ad07e690e9237cef8a29000824cf0b44fdeef86964eb/langchain_elasticsearch-0.2.2-py3-none-any.whl", hash = "sha256:2b0ae1637afc6890c371fc67be2151954db3c7f5382a07dafe4cf3bd762c6f26", size = 23864 }, +] + [[package]] name = "langchain-experimental" version = "0.0.65" @@ -3439,6 +3458,7 @@ dependencies = [ { name = "langchain-aws" }, { name = "langchain-chroma" }, { name = "langchain-cohere" }, + { name = "langchain-elasticsearch" }, { name = "langchain-google-calendar-tools" }, { name = "langchain-google-community" }, { name = "langchain-google-genai" }, @@ -3579,6 +3599,7 @@ requires-dist = [ { name = "langchain-aws", specifier = ">=0.1.16" }, { name = "langchain-chroma", specifier = ">=0.1.1" }, { name = "langchain-cohere", specifier = ">=0.1.5" }, + { name = "langchain-elasticsearch", specifier = ">=0.2.0" }, { name = "langchain-google-calendar-tools", specifier = ">=0.0.1" }, { name = "langchain-google-community", specifier = "==1.0.7" }, { name = "langchain-google-genai", specifier = ">=1.0.8" }, @@ -6766,6 +6787,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a1/32/4a7a205b14c11225609b75b28402c196e4396ac754dab6a81971b811781c/scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f60021ec1574e56632be2a36b946f8143bf4e5e6af4a06d85281adc22938e0dd", size = 12085794 }, { url = "https://files.pythonhosted.org/packages/c6/29/044048c5e911373827c0e1d3051321b9183b2a4f8d4e2f11c08fcff83f13/scikit_learn-1.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:394397841449853c2290a32050382edaec3da89e35b3e03d6cc966aebc6a8ae6", size = 12945797 }, { url = "https://files.pythonhosted.org/packages/aa/ce/c0b912f2f31aeb1b756a6ba56bcd84dd1f8a148470526a48515a3f4d48cd/scikit_learn-1.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:57cc1786cfd6bd118220a92ede80270132aa353647684efa385a74244a41e3b1", size = 10985467 }, + { url = "https://files.pythonhosted.org/packages/a4/50/8891028437858cc510e13578fe7046574a60c2aaaa92b02d64aac5b1b412/scikit_learn-1.5.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9a702e2de732bbb20d3bad29ebd77fc05a6b427dc49964300340e4c9328b3f5", size = 12025584 }, + { url = "https://files.pythonhosted.org/packages/d2/79/17feef8a1c14149436083bec0e61d7befb4812e272d5b20f9d79ea3e9ab1/scikit_learn-1.5.2-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:b0768ad641981f5d3a198430a1d31c3e044ed2e8a6f22166b4d546a5116d7908", size = 10959795 }, + { url = "https://files.pythonhosted.org/packages/b1/c8/f08313f9e2e656bd0905930ae8bf99a573ea21c34666a813b749c338202f/scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:178ddd0a5cb0044464fc1bfc4cca5b1833bfc7bb022d70b05db8530da4bb3dd3", size = 12077302 }, + { url = "https://files.pythonhosted.org/packages/a7/48/fbfb4dc72bed0fe31fe045fb30e924909ad03f717c36694351612973b1a9/scikit_learn-1.5.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7284ade780084d94505632241bf78c44ab3b6f1e8ccab3d2af58e0e950f9c12", size = 13002811 }, + { url = "https://files.pythonhosted.org/packages/a5/e7/0c869f9e60d225a77af90d2aefa7a4a4c0e745b149325d1450f0f0ce5399/scikit_learn-1.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:b7b0f9a0b1040830d38c39b91b3a44e1b643f4b36e36567b80b7c6bd2202a27f", size = 10951354 }, ] [[package]] @@ -6912,6 +6938,62 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755 }, ] +[[package]] +name = "simsimd" +version = "5.4.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/89/68/e7cac967435022636d8d545ae435e89bb3f9268bbc2f32cb66ef9cffcd2f/simsimd-5.4.3.tar.gz", hash = "sha256:dc75ae8bc0bff160439f669eb664cf47cc24d1a450c93b6bb53d8eee68794956", size = 65575 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6c/6d/06dc76bea683e408ff06d0b61ac90de663bca0838d9c2e11525088a5d105/simsimd-5.4.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:83baefb29993842e6877f1df11d70d8524ab0da2a50214c9e804279b3a82330e", size = 141434 }, + { url = "https://files.pythonhosted.org/packages/3f/fd/0e0ff00270367de7a1f21b0b9b5eea85c931cde41f8b2a84cb04b6202941/simsimd-5.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:deacf8310437e18d83d5fc1e6b0212060f65d1a76f6941978637724ac0b4195e", size = 82085 }, + { url = "https://files.pythonhosted.org/packages/51/ab/a5892281158c375442b58030120682ca31f2eda79c53f7cbdc313769d41e/simsimd-5.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a369099fef78322e2ff11cff127d91e0a1a406807f1c68d5354cf53b22a5693a", size = 81313 }, + { url = "https://files.pythonhosted.org/packages/11/cc/e0d04eef084fd8c6666ea54b8043acb279ca0e8d9aa153ba3e494a43c8e5/simsimd-5.4.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0881ce6f96c118567cf110648e93380c1046551be0603634aa31a6e80e28365a", size = 229539 }, + { url = "https://files.pythonhosted.org/packages/be/0a/e5191ac7c155e86cea5ff9372d177540b9657b265df3b21bfb8f32988dea/simsimd-5.4.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:96ba2e86a1904d2fdc63a60c19054d65fecf753f0464311be3aa5de06dea99f1", size = 281712 }, + { url = "https://files.pythonhosted.org/packages/0b/c7/20915743742a543146ef71a4ec334244950102af73b0f9a233b174c020ce/simsimd-5.4.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:434e0a35d7e9485c058faf15a99c8ff108ccae94c4d7831be9aaf772cc2d6e8a", size = 207482 }, + { url = "https://files.pythonhosted.org/packages/07/2a/29a577f788e4907037b81c4251ba96dc19d34cf58a8f7b0fb1a652499999/simsimd-5.4.3-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:f9460bafcef2d6c484f9971fbcdefa0eed60db3c5f41631ca6125518e0aabd66", size = 406369 }, + { url = "https://files.pythonhosted.org/packages/0e/6c/f46cf1d3fa785fd1aaf9dffd75a6654e29bfc515b205568da865d76803c1/simsimd-5.4.3-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a068f6d30143262646d31f6e7573acf89601ca9f3583a9e4bca2d732057481d9", size = 663787 }, + { url = "https://files.pythonhosted.org/packages/9b/a4/6031adea005d78f2b868b06ddc155c446ca1192ba4bdd4c58536a56052cd/simsimd-5.4.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5ca7b165ee928acb19ff129b6d3776a2cb983e31d62fb5480a209e1aa45065be", size = 448432 }, + { url = "https://files.pythonhosted.org/packages/a4/c8/0b91b84d1df4288f05a7573ce7f9c50958016ba8375b1cd9f7723b8bbeb0/simsimd-5.4.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:269c7d32ce9bbc8f99dc63ef1c87faf4d454cbf4aa569d77a4dbbb8fc4542bfb", size = 323845 }, + { url = "https://files.pythonhosted.org/packages/57/5b/43a852558c1d7cbe805b57396454217d4e3f8da6fc6dee02b54a35ce62f4/simsimd-5.4.3-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d9bc53af558a7a33046091275e760f16421963870b779be1e243bf192793bf63", size = 376465 }, + { url = "https://files.pythonhosted.org/packages/2a/6a/1ea24bc78455e9d33ac509a9f4270cbbe94f9d07b78de72eb82f43f52b94/simsimd-5.4.3-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:d6f5e2f53f932e7ddf5a81aeb6bcbb5e8f7a3b46dc0cd5de6c91265859100f54", size = 293770 }, + { url = "https://files.pythonhosted.org/packages/8e/01/4e2ab46a006f31f1b4c027a54bb4e90c22f18c1046c2d00fd12c4e0afb0d/simsimd-5.4.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4dc2736276a5ada456a052828e7e4ba4db9bfb6dfb7c9b16ba5f33160876377", size = 592654 }, + { url = "https://files.pythonhosted.org/packages/d8/78/30db59824c439c6b2db17c669dc934ccddc8be6fb6989ee925acdd04d41a/simsimd-5.4.3-cp310-cp310-win32.whl", hash = "sha256:fc2c8b1f92d9ab0a73a57282eea3fd8dac79f50517ac76d81a4646e9037b1ffa", size = 46130 }, + { url = "https://files.pythonhosted.org/packages/d4/c2/a4a63bc86c60934dd35885bcd903e1f1f3871ae81f3d037f5fe6695a28c4/simsimd-5.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:d744be6222edd143d777b40fa55de23889c281ae505a3c8d650a19e4266c0518", size = 63714 }, + { url = "https://files.pythonhosted.org/packages/81/0c/7bdf28e417c4f7351bafa566d02c9980024d5604d2e69adc129e5801e358/simsimd-5.4.3-cp310-cp310-win_arm64.whl", hash = "sha256:804f37fd965115cd0a960551c305f68d8fada6bb27b33a67038306bae6d3bc6a", size = 48911 }, + { url = "https://files.pythonhosted.org/packages/cc/9b/e9c0744c5fd4e754434e6133512e3d57461e5ae061c552c85b4bc7f208c1/simsimd-5.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:32f6d6336c1cca6129ea7907d64f4fb91eab64fce8bdfa224098003953801ab5", size = 141433 }, + { url = "https://files.pythonhosted.org/packages/e7/fb/5cb4f721f6135690ad87f74397a11fffbd2bbae39160e75566064ff97c86/simsimd-5.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:470aa4fbc03d49a6f021985f0bc18a772f9a55f44cb1328052dbbd027412db1e", size = 82088 }, + { url = "https://files.pythonhosted.org/packages/f9/27/772d3bc0c27711cba5601a59fb20e25cfd386f455579643fe41fd47a0650/simsimd-5.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:01d4c36f38f925555a1b85b16aa688b69d5df7a8be91b6c81ea1675486cf8242", size = 81307 }, + { url = "https://files.pythonhosted.org/packages/f0/d9/e312381395c99e0d408582f2f4bd4f65589a518528721f68dc9d430ab166/simsimd-5.4.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d4b8130b4d82c2eb02c40a05f00e277a5dca290332777a3b011cb9adc6512439", size = 229661 }, + { url = "https://files.pythonhosted.org/packages/66/a0/136563eba3f545a9076da757293eda69a9dc388308ec6160ae81f2d3e5df/simsimd-5.4.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd05002f204da0f25d1e5b0c5e3dfa550a8742c272b09db8ecf7799ec21d67d", size = 281782 }, + { url = "https://files.pythonhosted.org/packages/0d/de/8501c5e28eadf0bd47656bdc5d01b43246d821d5b580d2acb826efd0e82f/simsimd-5.4.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d674cd79d64e87fa772693275c49ce38f9893bf0b4d9fb08e45952ae54ba707b", size = 207537 }, + { url = "https://files.pythonhosted.org/packages/39/03/504f51fce1d0adc9bdac7b759d68b3f4716c466c2afa321484be7b1ac01d/simsimd-5.4.3-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:c7d00820f4dfca80eb86cd3c70997bf6590f54557a92bee7ff868844a88376e3", size = 406467 }, + { url = "https://files.pythonhosted.org/packages/47/c4/1b3dda287659889a59fc3b4ddfb95eb7e6ae97c995046901ccfbd251420b/simsimd-5.4.3-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:e960d14f77818e18f7629258f8debd08b5ad3cd62dab2ae53fb5ff5b54f7c08c", size = 663850 }, + { url = "https://files.pythonhosted.org/packages/d6/3a/a77d6fedf004aa753f3bfa94c47b0230fd4a6a0d8604ad34ce5318bfd59f/simsimd-5.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f8af17e36af232014286c854473ad78758616ed7bcb7cf5a5762b8a5b1b074e5", size = 448516 }, + { url = "https://files.pythonhosted.org/packages/46/00/66cc283aeaf23afe070ba1b53015ef4aa5407111ced69bf9676edff26e17/simsimd-5.4.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:436a17bd78372e86f7d01ecfff16f75c573a44f1037b5e4199f7a2ecc1a31de9", size = 323961 }, + { url = "https://files.pythonhosted.org/packages/2f/20/ee1abf6bab6f80b395c51b37ab5c43a5ce35682b46fcb0313316603a878b/simsimd-5.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:75f8f0fd937c2935e96da41fe4380f3705e1eec0f3433a643ac9384ed689eb9c", size = 376522 }, + { url = "https://files.pythonhosted.org/packages/ca/af/33b17ab7179fc1edb5090f3bc4d1b647910e064549bbe9885ea4b9158d88/simsimd-5.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1c098aa69fd29a53a350a5a06e0da7ff25258bc76d0deccdf87ba3c862e35fe0", size = 293858 }, + { url = "https://files.pythonhosted.org/packages/07/1f/137d96b390e34e15924f20e1a3d6a4b9e25477eb69253f1c16d84051e2c9/simsimd-5.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bbdb970f64cce2496c7bc54463610c9ddaa43615aa73b6fb1bc1f0df5863565", size = 592709 }, + { url = "https://files.pythonhosted.org/packages/f3/ea/6ad262783aca90043b90236f5a8c4d47e25cd43ecb849852d1a7ad482c75/simsimd-5.4.3-cp311-cp311-win32.whl", hash = "sha256:aa58035f67b2c7083cc05a4c49b06b57a0aa15dfbb9608ed1e83ab59b965768f", size = 46132 }, + { url = "https://files.pythonhosted.org/packages/87/97/718531d12a82000754b8f5f35abfd596973230d51887d239a13ddc8df52a/simsimd-5.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:de14931d37087ccfbd1cc6321ad22ce76fef51fc75c98264ff2537170062d361", size = 63713 }, + { url = "https://files.pythonhosted.org/packages/9f/19/3a7f1a20a55415b915c8f269fa2a0464dc9ddd69e4d77986c49ca8a031e3/simsimd-5.4.3-cp311-cp311-win_arm64.whl", hash = "sha256:d5474b49d97546b55940c27fcd63fce159f5f939cc53983f91bae56cea34dd52", size = 48911 }, + { url = "https://files.pythonhosted.org/packages/ac/df/62f42d37d516360d61841a6e8b918b4bd7988b8393b9d09d2f840aab5c13/simsimd-5.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:31b1fd618dab62c49cca99fd78e4876b511273ead272584b34aeaca5e5ded532", size = 141481 }, + { url = "https://files.pythonhosted.org/packages/3b/cb/e2c19b6304fc4c661465d0ef8713d04acea160c4ba55d02748476f244c15/simsimd-5.4.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:43487d7f9756d5f8de6f778910b0fd8aa236716612ccd3afe50e8d8c50f1c20b", size = 82169 }, + { url = "https://files.pythonhosted.org/packages/3b/3c/2fd35c4b87f20000d5d62ccecdb37b54f5c8c16a50e39ca3fd986a2d50ea/simsimd-5.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ccd196db72fd716664441c6c0f3077f5d0d5ae6c15454a39c23b7fd729fae5d0", size = 81333 }, + { url = "https://files.pythonhosted.org/packages/9d/32/f22edb7848ebb8ddcf5937438cb25771571be858e3158c26018d4777a154/simsimd-5.4.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1ea3e3dcb0471d9fb2dd8d09a84826e859d84f55fc01ec0b89df4c7b9bc67d96", size = 229965 }, + { url = "https://files.pythonhosted.org/packages/9d/bc/7c0e3ba8ee32113b3d0a26dd1551d4bed46a794062e969ea0902be8d4a27/simsimd-5.4.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db4b4fb06397d9689e2fab06b822a6432b85da99c92e060836b532ad94be0dea", size = 282135 }, + { url = "https://files.pythonhosted.org/packages/de/1d/a6963f19976906c24831d68d50f50b69c00415b247dd1b9c6596a056df88/simsimd-5.4.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:576ebb0bcfeca4086d12925ab3130167ea2b89021d19c09f9b14cccc0e22c739", size = 208064 }, + { url = "https://files.pythonhosted.org/packages/68/0a/a9162f0868eb11c2e8d5a6dc3ca89f785eaff85b02f762fa0a689d015042/simsimd-5.4.3-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:87c6bffa7275e250ac2d4605cccb66b0652ad033b734d2a7539eabc3eedbd882", size = 406558 }, + { url = "https://files.pythonhosted.org/packages/e2/f9/388cb1f893880fded89b0231cfca868cd44885ff12fe76868dfbc37ae3b5/simsimd-5.4.3-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:b48ab95d9a4bc8fd9ce9ce137b36e125e64a114fdd352f2f7a057e92dfbe4571", size = 664179 }, + { url = "https://files.pythonhosted.org/packages/6a/9d/13af783bd32366baa6c75cf331b4c1cb677fb45fe93b0bbe60b73a9eb230/simsimd-5.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f10dca118c1e7a9a89ccf32eb76f8eb09eb963817ee8817379e73ac1c11d55b3", size = 448656 }, + { url = "https://files.pythonhosted.org/packages/98/df/464652cc92e48534179ebe7beca69cb6fc0e078dd4b1763620f052eaf5d7/simsimd-5.4.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba1472565cb786a4f537877fb15cdaaac139369d6eda14d4bfce6f4cf794b72", size = 324111 }, + { url = "https://files.pythonhosted.org/packages/71/78/c5f52b14c7057d455944520aec40946f38c28eb913f835e17ad0ab2c2e34/simsimd-5.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:ef92e699883da0f42b2513f4e923480516595a8da883aeae90980c02d8c40958", size = 376694 }, + { url = "https://files.pythonhosted.org/packages/88/13/d93276e872ed4512286a1f1c48541829ab8924d799079fadf99b00addb69/simsimd-5.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:adc121c840b306a9b84506a02b00dab8f1e3db152b38fb1f72e5796be7d977b2", size = 294077 }, + { url = "https://files.pythonhosted.org/packages/bc/6d/c197c331877b3098e1bf99727c6f14ff5cedcd3a2c84fc5c369540ed78b5/simsimd-5.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:04381217e516e597ebc9d68e37341e2b32677d8de847041e94654834ec6fc366", size = 592959 }, + { url = "https://files.pythonhosted.org/packages/2f/72/eb85a44115e445d83c37c400b8920b3cece094e13ea736fec07e0d7d8063/simsimd-5.4.3-cp312-cp312-win32.whl", hash = "sha256:b087189a27f925f348b40c34b7e11aaae9161e764a6376614620fb993f41d9fd", size = 46143 }, + { url = "https://files.pythonhosted.org/packages/9c/15/a4f3cceda2f8af3823b1f6f4b1ceedca61c652897c2f4ef4942431e50544/simsimd-5.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:f409ce2dc0b6bac7240432b6e7d7f44c9234a60bf7369bced16d2275dcb8afa1", size = 63974 }, + { url = "https://files.pythonhosted.org/packages/0e/10/63a4a35034d4ce0fb58592d5d21fd8a3319922cd5a103ce98341a0fac379/simsimd-5.4.3-cp312-cp312-win_arm64.whl", hash = "sha256:77cfe8260aa86a1fb27f884dc13d1ebb25e423a470e71020ea2037ea8d54c14d", size = 48935 }, +] + [[package]] name = "six" version = "1.16.0"