From dbca910affa931c68c8f67a21bc1631da769c25f Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 10:11:11 +0800 Subject: [PATCH 1/9] Add dependency lingua-language-detector --- poetry.lock | 426 +++++++++++++++++++++++++------------------ pyproject.toml | 3 +- requirements-dev.txt | 27 +-- requirements.txt | 28 +-- 4 files changed, 277 insertions(+), 207 deletions(-) diff --git a/poetry.lock b/poetry.lock index 64e4fd9..3b772fc 100644 --- a/poetry.lock +++ b/poetry.lock @@ -138,24 +138,25 @@ frozenlist = ">=1.1.0" [[package]] name = "anyio" -version = "3.6.2" +version = "3.7.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" category = "main" optional = false -python-versions = ">=3.6.2" +python-versions = ">=3.7" files = [ - {file = "anyio-3.6.2-py3-none-any.whl", hash = "sha256:fbbe32bd270d2a2ef3ed1c5d45041250284e31fc0a4df4a5a6071842051a51e3"}, - {file = "anyio-3.6.2.tar.gz", hash = "sha256:25ea0d673ae30af41a0c442f81cf3b38c7e79fdc7b60335a4c14e05eb0947421"}, + {file = "anyio-3.7.0-py3-none-any.whl", hash = "sha256:eddca883c4175f14df8aedce21054bfca3adb70ffe76a9f607aef9d7fa2ea7f0"}, + {file = "anyio-3.7.0.tar.gz", hash = "sha256:275d9973793619a5374e1c89a4f4ad3f4b0a5510a2b5b939444bee8f4c4d37ce"}, ] [package.dependencies] +exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" [package.extras] -doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["contextlib2", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] -trio = ["trio (>=0.16,<0.22)"] +doc = ["Sphinx (>=6.1.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme", "sphinxcontrib-jquery"] +test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (<0.22)"] [[package]] name = "arrow" @@ -414,7 +415,7 @@ dev = ["black", "coveralls", "mypy", "pre-commit", "pylint", "pytest (>=5)", "py name = "exceptiongroup" version = "1.1.1" description = "Backport of PEP 654 (exception groups)" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -681,14 +682,14 @@ files = [ [[package]] name = "httpcore" -version = "0.17.1" +version = "0.17.2" description = "A minimal low-level HTTP client." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "httpcore-0.17.1-py3-none-any.whl", hash = "sha256:628e768aaeec1f7effdc6408ba1c3cdbd7487c1fc570f7d66844ec4f003e1ca4"}, - {file = "httpcore-0.17.1.tar.gz", hash = "sha256:caf508597c525f9b8bfff187e270666309f63115af30f7d68b16143a403c8356"}, + {file = "httpcore-0.17.2-py3-none-any.whl", hash = "sha256:5581b9c12379c4288fe70f43c710d16060c10080617001e6b22a3b6dbcbefd36"}, + {file = "httpcore-0.17.2.tar.gz", hash = "sha256:125f8375ab60036db632f34f4b627a9ad085048eef7cb7d2616fea0f739f98af"}, ] [package.dependencies] @@ -757,14 +758,14 @@ test = ["Cython (>=0.29.24,<0.30.0)"] [[package]] name = "httpx" -version = "0.24.0" +version = "0.24.1" description = "The next generation HTTP client." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "httpx-0.24.0-py3-none-any.whl", hash = "sha256:447556b50c1921c351ea54b4fe79d91b724ed2b027462ab9a329465d147d5a4e"}, - {file = "httpx-0.24.0.tar.gz", hash = "sha256:507d676fc3e26110d41df7d35ebd8b3b8585052450f4097401c9be59d928c63e"}, + {file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd"}, + {file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd"}, ] [package.dependencies] @@ -816,6 +817,22 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[[package]] +name = "lingua-language-detector" +version = "1.3.2" +description = "An accurate natural language detection library, suitable for long and short text alike" +category = "main" +optional = false +python-versions = ">=3.8,<4.0" +files = [ + {file = "lingua_language_detector-1.3.2-py3-none-any.whl", hash = "sha256:59ff9a9930ea7509d053bca47c0464fca69b94c7274d5dbd1902ab59e744dfa2"}, + {file = "lingua_language_detector-1.3.2.tar.gz", hash = "sha256:6541d69a917ba8d5bfcebee004c63c08314c0139cc8bc8a64a20cd363b7d89e1"}, +] + +[package.dependencies] +numpy = ">=1.24.1,<2.0.0" +regex = ">=2022.10.31,<2023.0.0" + [[package]] name = "markdown-it-py" version = "2.2.0" @@ -989,14 +1006,14 @@ files = [ [[package]] name = "openai" -version = "0.27.6" +version = "0.27.7" description = "Python client library for the OpenAI API" category = "main" optional = false python-versions = ">=3.7.1" files = [ - {file = "openai-0.27.6-py3-none-any.whl", hash = "sha256:1f07ed06f1cfc6c25126107193726fe4cf476edcc4e1485cd9eb708f068f2606"}, - {file = "openai-0.27.6.tar.gz", hash = "sha256:63ca9f6ac619daef8c1ddec6d987fe6aa1c87a9bfdce31ff253204d077222375"}, + {file = "openai-0.27.7-py3-none-any.whl", hash = "sha256:788fb7fa85bf7caac6c1ed7eea5984254a1bdaf09ef485acf0e5718c8b2dc25a"}, + {file = "openai-0.27.7.tar.gz", hash = "sha256:bca95fd4c3054ef38924def096396122130454442ec52005915ecf8269626b1d"}, ] [package.dependencies] @@ -1066,39 +1083,59 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "portalocker" +version = "2.7.0" +description = "Wraps the portalocker recipe for easy usage" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "portalocker-2.7.0-py2.py3-none-any.whl", hash = "sha256:a07c5b4f3985c3cf4798369631fb7011adb498e2a46d8440efc75a8f29a0f983"}, + {file = "portalocker-2.7.0.tar.gz", hash = "sha256:032e81d534a88ec1736d03f780ba073f047a06c478b06e2937486f334e955c51"}, +] + +[package.dependencies] +pywin32 = {version = ">=226", markers = "platform_system == \"Windows\""} + +[package.extras] +docs = ["sphinx (>=1.7.1)"] +redis = ["redis"] +tests = ["pytest (>=5.4.1)", "pytest-cov (>=2.8.1)", "pytest-mypy (>=0.8.0)", "pytest-timeout (>=2.1.0)", "redis", "sphinx (>=6.0.0)"] + [[package]] name = "protobuf" -version = "4.23.1" +version = "4.23.2" description = "" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "protobuf-4.23.1-cp310-abi3-win32.whl", hash = "sha256:410bcc0a5b279f634d3e16082ce221dfef7c3392fac723500e2e64d1806dd2be"}, - {file = "protobuf-4.23.1-cp310-abi3-win_amd64.whl", hash = "sha256:32e78beda26d7a101fecf15d7a4a792278a0d26a31bc327ff05564a9d68ab8ee"}, - {file = "protobuf-4.23.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:f9510cac91e764e86acd74e2b7f7bc5e6127a7f3fb646d7c8033cfb84fd1176a"}, - {file = "protobuf-4.23.1-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:346990f634272caac1f09efbcfbbacb23098b1f606d172534c6fa2d9758bb436"}, - {file = "protobuf-4.23.1-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:3ce113b3f3362493bddc9069c2163a38f240a9ed685ff83e7bcb756b05e1deb0"}, - {file = "protobuf-4.23.1-cp37-cp37m-win32.whl", hash = "sha256:2036a3a1e7fc27f973fa0a7888dce712393af644f4695385f117886abc792e39"}, - {file = "protobuf-4.23.1-cp37-cp37m-win_amd64.whl", hash = "sha256:3b8905eafe4439076e1f58e9d1fa327025fd2777cf90f14083092ae47f77b0aa"}, - {file = "protobuf-4.23.1-cp38-cp38-win32.whl", hash = "sha256:5b9cd6097e6acae48a68cb29b56bc79339be84eca65b486910bb1e7a30e2b7c1"}, - {file = "protobuf-4.23.1-cp38-cp38-win_amd64.whl", hash = "sha256:decf119d54e820f298ee6d89c72d6b289ea240c32c521f00433f9dc420595f38"}, - {file = "protobuf-4.23.1-cp39-cp39-win32.whl", hash = "sha256:91fac0753c3c4951fbb98a93271c43cc7cf3b93cf67747b3e600bb1e5cc14d61"}, - {file = "protobuf-4.23.1-cp39-cp39-win_amd64.whl", hash = "sha256:ac50be82491369a9ec3710565777e4da87c6d2e20404e0abb1f3a8f10ffd20f0"}, - {file = "protobuf-4.23.1-py3-none-any.whl", hash = "sha256:65f0ac96ef67d7dd09b19a46aad81a851b6f85f89725577f16de38f2d68ad477"}, - {file = "protobuf-4.23.1.tar.gz", hash = "sha256:95789b569418a3e32a53f43d7763be3d490a831e9c08042539462b6d972c2d7e"}, + {file = "protobuf-4.23.2-cp310-abi3-win32.whl", hash = "sha256:384dd44cb4c43f2ccddd3645389a23ae61aeb8cfa15ca3a0f60e7c3ea09b28b3"}, + {file = "protobuf-4.23.2-cp310-abi3-win_amd64.whl", hash = "sha256:09310bce43353b46d73ba7e3bca78273b9bc50349509b9698e64d288c6372c2a"}, + {file = "protobuf-4.23.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:b2cfab63a230b39ae603834718db74ac11e52bccaaf19bf20f5cce1a84cf76df"}, + {file = "protobuf-4.23.2-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:c52cfcbfba8eb791255edd675c1fe6056f723bf832fa67f0442218f8817c076e"}, + {file = "protobuf-4.23.2-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:86df87016d290143c7ce3be3ad52d055714ebaebb57cc659c387e76cfacd81aa"}, + {file = "protobuf-4.23.2-cp37-cp37m-win32.whl", hash = "sha256:281342ea5eb631c86697e1e048cb7e73b8a4e85f3299a128c116f05f5c668f8f"}, + {file = "protobuf-4.23.2-cp37-cp37m-win_amd64.whl", hash = "sha256:ce744938406de1e64b91410f473736e815f28c3b71201302612a68bf01517fea"}, + {file = "protobuf-4.23.2-cp38-cp38-win32.whl", hash = "sha256:6c081863c379bb1741be8f8193e893511312b1d7329b4a75445d1ea9955be69e"}, + {file = "protobuf-4.23.2-cp38-cp38-win_amd64.whl", hash = "sha256:25e3370eda26469b58b602e29dff069cfaae8eaa0ef4550039cc5ef8dc004511"}, + {file = "protobuf-4.23.2-cp39-cp39-win32.whl", hash = "sha256:efabbbbac1ab519a514579ba9ec52f006c28ae19d97915951f69fa70da2c9e91"}, + {file = "protobuf-4.23.2-cp39-cp39-win_amd64.whl", hash = "sha256:54a533b971288af3b9926e53850c7eb186886c0c84e61daa8444385a4720297f"}, + {file = "protobuf-4.23.2-py3-none-any.whl", hash = "sha256:8da6070310d634c99c0db7df48f10da495cc283fd9e9234877f0cd182d43ab7f"}, + {file = "protobuf-4.23.2.tar.gz", hash = "sha256:20874e7ca4436f683b64ebdbee2129a5a2c301579a67d1a7dda2cdf62fb7f5f7"}, ] [[package]] name = "pyassorted" -version = "0.6.0" +version = "0.7.0" description = "A library has light-weight assorted utils in Prue-Python." category = "main" optional = false python-versions = ">=3.7.1,<4.0.0" files = [ - {file = "pyassorted-0.6.0-py3-none-any.whl", hash = "sha256:58d13da75d9e2b93ba36a0a252fc0e7bf30e50884a3eeef414e02d957c315705"}, - {file = "pyassorted-0.6.0.tar.gz", hash = "sha256:cc276d00dc451ad3a79b570a48797d8e400de4f480dcaa333efd8cda451b1877"}, + {file = "pyassorted-0.7.0-py3-none-any.whl", hash = "sha256:22c54be0fdfa5231fc9254f376962fc0e400e74b6cfaac84f024fb0921ce3135"}, + {file = "pyassorted-0.7.0.tar.gz", hash = "sha256:0af408647fb4b9296025063dc7464763043dce1af9da894a6ed5f316d0bffb5c"}, ] [package.dependencies] @@ -1107,48 +1144,48 @@ rich = "*" [[package]] name = "pydantic" -version = "1.10.7" +version = "1.10.8" description = "Data validation and settings management using python type hints" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e79e999e539872e903767c417c897e729e015872040e56b96e67968c3b918b2d"}, - {file = "pydantic-1.10.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:01aea3a42c13f2602b7ecbbea484a98169fb568ebd9e247593ea05f01b884b2e"}, - {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:516f1ed9bc2406a0467dd777afc636c7091d71f214d5e413d64fef45174cfc7a"}, - {file = "pydantic-1.10.7-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae150a63564929c675d7f2303008d88426a0add46efd76c3fc797cd71cb1b46f"}, - {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:ecbbc51391248116c0a055899e6c3e7ffbb11fb5e2a4cd6f2d0b93272118a209"}, - {file = "pydantic-1.10.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f4a2b50e2b03d5776e7f21af73e2070e1b5c0d0df255a827e7c632962f8315af"}, - {file = "pydantic-1.10.7-cp310-cp310-win_amd64.whl", hash = "sha256:a7cd2251439988b413cb0a985c4ed82b6c6aac382dbaff53ae03c4b23a70e80a"}, - {file = "pydantic-1.10.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:68792151e174a4aa9e9fc1b4e653e65a354a2fa0fed169f7b3d09902ad2cb6f1"}, - {file = "pydantic-1.10.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe2507b8ef209da71b6fb5f4e597b50c5a34b78d7e857c4f8f3115effaef5fe"}, - {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10a86d8c8db68086f1e30a530f7d5f83eb0685e632e411dbbcf2d5c0150e8dcd"}, - {file = "pydantic-1.10.7-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d75ae19d2a3dbb146b6f324031c24f8a3f52ff5d6a9f22f0683694b3afcb16fb"}, - {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:464855a7ff7f2cc2cf537ecc421291b9132aa9c79aef44e917ad711b4a93163b"}, - {file = "pydantic-1.10.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:193924c563fae6ddcb71d3f06fa153866423ac1b793a47936656e806b64e24ca"}, - {file = "pydantic-1.10.7-cp311-cp311-win_amd64.whl", hash = "sha256:b4a849d10f211389502059c33332e91327bc154acc1845f375a99eca3afa802d"}, - {file = "pydantic-1.10.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cc1dde4e50a5fc1336ee0581c1612215bc64ed6d28d2c7c6f25d2fe3e7c3e918"}, - {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0cfe895a504c060e5d36b287ee696e2fdad02d89e0d895f83037245218a87fe"}, - {file = "pydantic-1.10.7-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:670bb4683ad1e48b0ecb06f0cfe2178dcf74ff27921cdf1606e527d2617a81ee"}, - {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:950ce33857841f9a337ce07ddf46bc84e1c4946d2a3bba18f8280297157a3fd1"}, - {file = "pydantic-1.10.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c15582f9055fbc1bfe50266a19771bbbef33dd28c45e78afbe1996fd70966c2a"}, - {file = "pydantic-1.10.7-cp37-cp37m-win_amd64.whl", hash = "sha256:82dffb306dd20bd5268fd6379bc4bfe75242a9c2b79fec58e1041fbbdb1f7914"}, - {file = "pydantic-1.10.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8c7f51861d73e8b9ddcb9916ae7ac39fb52761d9ea0df41128e81e2ba42886cd"}, - {file = "pydantic-1.10.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6434b49c0b03a51021ade5c4daa7d70c98f7a79e95b551201fff682fc1661245"}, - {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64d34ab766fa056df49013bb6e79921a0265204c071984e75a09cbceacbbdd5d"}, - {file = "pydantic-1.10.7-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:701daea9ffe9d26f97b52f1d157e0d4121644f0fcf80b443248434958fd03dc3"}, - {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:cf135c46099ff3f919d2150a948ce94b9ce545598ef2c6c7bf55dca98a304b52"}, - {file = "pydantic-1.10.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0f85904f73161817b80781cc150f8b906d521fa11e3cdabae19a581c3606209"}, - {file = "pydantic-1.10.7-cp38-cp38-win_amd64.whl", hash = "sha256:9f6f0fd68d73257ad6685419478c5aece46432f4bdd8d32c7345f1986496171e"}, - {file = "pydantic-1.10.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c230c0d8a322276d6e7b88c3f7ce885f9ed16e0910354510e0bae84d54991143"}, - {file = "pydantic-1.10.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:976cae77ba6a49d80f461fd8bba183ff7ba79f44aa5cfa82f1346b5626542f8e"}, - {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7d45fc99d64af9aaf7e308054a0067fdcd87ffe974f2442312372dfa66e1001d"}, - {file = "pydantic-1.10.7-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d2a5ebb48958754d386195fe9e9c5106f11275867051bf017a8059410e9abf1f"}, - {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:abfb7d4a7cd5cc4e1d1887c43503a7c5dd608eadf8bc615413fc498d3e4645cd"}, - {file = "pydantic-1.10.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:80b1fab4deb08a8292d15e43a6edccdffa5377a36a4597bb545b93e79c5ff0a5"}, - {file = "pydantic-1.10.7-cp39-cp39-win_amd64.whl", hash = "sha256:d71e69699498b020ea198468e2480a2f1e7433e32a3a99760058c6520e2bea7e"}, - {file = "pydantic-1.10.7-py3-none-any.whl", hash = "sha256:0cd181f1d0b1d00e2b705f1bf1ac7799a2d938cce3376b8007df62b29be3c2c6"}, - {file = "pydantic-1.10.7.tar.gz", hash = "sha256:cfc83c0678b6ba51b0532bea66860617c4cd4251ecf76e9846fa5a9f3454e97e"}, + {file = "pydantic-1.10.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1243d28e9b05003a89d72e7915fdb26ffd1d39bdd39b00b7dbe4afae4b557f9d"}, + {file = "pydantic-1.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0ab53b609c11dfc0c060d94335993cc2b95b2150e25583bec37a49b2d6c6c3f"}, + {file = "pydantic-1.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9613fadad06b4f3bc5db2653ce2f22e0de84a7c6c293909b48f6ed37b83c61f"}, + {file = "pydantic-1.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:df7800cb1984d8f6e249351139667a8c50a379009271ee6236138a22a0c0f319"}, + {file = "pydantic-1.10.8-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0c6fafa0965b539d7aab0a673a046466d23b86e4b0e8019d25fd53f4df62c277"}, + {file = "pydantic-1.10.8-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:e82d4566fcd527eae8b244fa952d99f2ca3172b7e97add0b43e2d97ee77f81ab"}, + {file = "pydantic-1.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:ab523c31e22943713d80d8d342d23b6f6ac4b792a1e54064a8d0cf78fd64e800"}, + {file = "pydantic-1.10.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:666bdf6066bf6dbc107b30d034615d2627e2121506c555f73f90b54a463d1f33"}, + {file = "pydantic-1.10.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:35db5301b82e8661fa9c505c800d0990bc14e9f36f98932bb1d248c0ac5cada5"}, + {file = "pydantic-1.10.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f90c1e29f447557e9e26afb1c4dbf8768a10cc676e3781b6a577841ade126b85"}, + {file = "pydantic-1.10.8-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93e766b4a8226e0708ef243e843105bf124e21331694367f95f4e3b4a92bbb3f"}, + {file = "pydantic-1.10.8-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:88f195f582851e8db960b4a94c3e3ad25692c1c1539e2552f3df7a9e972ef60e"}, + {file = "pydantic-1.10.8-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:34d327c81e68a1ecb52fe9c8d50c8a9b3e90d3c8ad991bfc8f953fb477d42fb4"}, + {file = "pydantic-1.10.8-cp311-cp311-win_amd64.whl", hash = "sha256:d532bf00f381bd6bc62cabc7d1372096b75a33bc197a312b03f5838b4fb84edd"}, + {file = "pydantic-1.10.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d5b8641c24886d764a74ec541d2fc2c7fb19f6da2a4001e6d580ba4a38f7878"}, + {file = "pydantic-1.10.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b1f6cb446470b7ddf86c2e57cd119a24959af2b01e552f60705910663af09a4"}, + {file = "pydantic-1.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c33b60054b2136aef8cf190cd4c52a3daa20b2263917c49adad20eaf381e823b"}, + {file = "pydantic-1.10.8-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1952526ba40b220b912cdc43c1c32bcf4a58e3f192fa313ee665916b26befb68"}, + {file = "pydantic-1.10.8-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:bb14388ec45a7a0dc429e87def6396f9e73c8c77818c927b6a60706603d5f2ea"}, + {file = "pydantic-1.10.8-cp37-cp37m-win_amd64.whl", hash = "sha256:16f8c3e33af1e9bb16c7a91fc7d5fa9fe27298e9f299cff6cb744d89d573d62c"}, + {file = "pydantic-1.10.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1ced8375969673929809d7f36ad322934c35de4af3b5e5b09ec967c21f9f7887"}, + {file = "pydantic-1.10.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:93e6bcfccbd831894a6a434b0aeb1947f9e70b7468f274154d03d71fabb1d7c6"}, + {file = "pydantic-1.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:191ba419b605f897ede9892f6c56fb182f40a15d309ef0142212200a10af4c18"}, + {file = "pydantic-1.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:052d8654cb65174d6f9490cc9b9a200083a82cf5c3c5d3985db765757eb3b375"}, + {file = "pydantic-1.10.8-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ceb6a23bf1ba4b837d0cfe378329ad3f351b5897c8d4914ce95b85fba96da5a1"}, + {file = "pydantic-1.10.8-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f2e754d5566f050954727c77f094e01793bcb5725b663bf628fa6743a5a9108"}, + {file = "pydantic-1.10.8-cp38-cp38-win_amd64.whl", hash = "sha256:6a82d6cda82258efca32b40040228ecf43a548671cb174a1e81477195ed3ed56"}, + {file = "pydantic-1.10.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e59417ba8a17265e632af99cc5f35ec309de5980c440c255ab1ca3ae96a3e0e"}, + {file = "pydantic-1.10.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:84d80219c3f8d4cad44575e18404099c76851bc924ce5ab1c4c8bb5e2a2227d0"}, + {file = "pydantic-1.10.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e4148e635994d57d834be1182a44bdb07dd867fa3c2d1b37002000646cc5459"}, + {file = "pydantic-1.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12f7b0bf8553e310e530e9f3a2f5734c68699f42218bf3568ef49cd9b0e44df4"}, + {file = "pydantic-1.10.8-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:42aa0c4b5c3025483240a25b09f3c09a189481ddda2ea3a831a9d25f444e03c1"}, + {file = "pydantic-1.10.8-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:17aef11cc1b997f9d574b91909fed40761e13fac438d72b81f902226a69dac01"}, + {file = "pydantic-1.10.8-cp39-cp39-win_amd64.whl", hash = "sha256:66a703d1983c675a6e0fed8953b0971c44dba48a929a2000a493c3772eb61a5a"}, + {file = "pydantic-1.10.8-py3-none-any.whl", hash = "sha256:7456eb22ed9aaa24ff3e7b4757da20d9e5ce2a81018c1b3ebd81a0b88a18f3b2"}, + {file = "pydantic-1.10.8.tar.gz", hash = "sha256:1410275520dfa70effadf4c21811d755e7ef9bb1f1d077a21958153a92c8d9ca"}, ] [package.dependencies] @@ -1258,6 +1295,30 @@ files = [ {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, ] +[[package]] +name = "pywin32" +version = "306" +description = "Python for Window Extensions" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"}, + {file = "pywin32-306-cp310-cp310-win_amd64.whl", hash = "sha256:84f4471dbca1887ea3803d8848a1616429ac94a4a8d05f4bc9c5dcfd42ca99c8"}, + {file = "pywin32-306-cp311-cp311-win32.whl", hash = "sha256:e65028133d15b64d2ed8f06dd9fbc268352478d4f9289e69c190ecd6818b6407"}, + {file = "pywin32-306-cp311-cp311-win_amd64.whl", hash = "sha256:a7639f51c184c0272e93f244eb24dafca9b1855707d94c192d4a0b4c01e1100e"}, + {file = "pywin32-306-cp311-cp311-win_arm64.whl", hash = "sha256:70dba0c913d19f942a2db25217d9a1b726c278f483a919f1abfed79c9cf64d3a"}, + {file = "pywin32-306-cp312-cp312-win32.whl", hash = "sha256:383229d515657f4e3ed1343da8be101000562bf514591ff383ae940cad65458b"}, + {file = "pywin32-306-cp312-cp312-win_amd64.whl", hash = "sha256:37257794c1ad39ee9be652da0462dc2e394c8159dfd913a8a4e8eb6fd346da0e"}, + {file = "pywin32-306-cp312-cp312-win_arm64.whl", hash = "sha256:5821ec52f6d321aa59e2db7e0a35b997de60c201943557d108af9d4ae1ec7040"}, + {file = "pywin32-306-cp37-cp37m-win32.whl", hash = "sha256:1c73ea9a0d2283d889001998059f5eaaba3b6238f767c9cf2833b13e6a685f65"}, + {file = "pywin32-306-cp37-cp37m-win_amd64.whl", hash = "sha256:72c5f621542d7bdd4fdb716227be0dd3f8565c11b280be6315b06ace35487d36"}, + {file = "pywin32-306-cp38-cp38-win32.whl", hash = "sha256:e4c092e2589b5cf0d365849e73e02c391c1349958c5ac3e9d5ccb9a28e017b3a"}, + {file = "pywin32-306-cp38-cp38-win_amd64.whl", hash = "sha256:e8ac1ae3601bee6ca9f7cb4b5363bf1c0badb935ef243c4733ff9a393b1690c0"}, + {file = "pywin32-306-cp39-cp39-win32.whl", hash = "sha256:e25fd5b485b55ac9c057f67d94bc203f3f6595078d1fb3b458c9c28b7153a802"}, + {file = "pywin32-306-cp39-cp39-win_amd64.whl", hash = "sha256:39b61c15272833b5c329a2989999dcae836b1eed650252ab1b7bfbe1d59f30f4"}, +] + [[package]] name = "pyyaml" version = "6.0" @@ -1310,132 +1371,134 @@ files = [ [[package]] name = "qdrant-client" -version = "1.0.1" +version = "1.2.0" description = "Client library for the Qdrant vector search engine" category = "main" optional = false -python-versions = ">=3.7,<=3.11" +python-versions = ">=3.7,<3.12" files = [ - {file = "qdrant_client-1.0.1-py3-none-any.whl", hash = "sha256:a4162882481a7cc461b3592fb781c995481627516d6a9ba89bbabfe1734d33e9"}, - {file = "qdrant_client-1.0.1.tar.gz", hash = "sha256:d703ed9d30b877348cc842945315ff17c99984df04174816894141902cb9e096"}, + {file = "qdrant_client-1.2.0-py3-none-any.whl", hash = "sha256:e84e43bee529e27990aa5bad487bab4204eb20bda0414916498d8bb80ce601e6"}, + {file = "qdrant_client-1.2.0.tar.gz", hash = "sha256:5a3d9f89adce392a2ba619cfd5b9f7afb13e5146c49e88ed80469993f0fadbf0"}, ] [package.dependencies] grpcio = ">=1.41.0" grpcio-tools = ">=1.41.0" httpx = {version = ">=0.14.0", extras = ["http2"]} -numpy = ">=1.21" +numpy = {version = ">=1.21", markers = "python_version >= \"3.8\""} +portalocker = ">=2.7.0,<3.0.0" pydantic = ">=1.8,<2.0" -typing-extensions = ">=4.0.0,<5.0.0" +typing-extensions = ">=4.0.0,<4.6.0" +urllib3 = ">=1.26.14,<2.0.0" [[package]] name = "regex" -version = "2023.5.5" +version = "2022.10.31" description = "Alternative regular expression module, to replace re." category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "regex-2023.5.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:48c9ec56579d4ba1c88f42302194b8ae2350265cb60c64b7b9a88dcb7fbde309"}, - {file = "regex-2023.5.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02f4541550459c08fdd6f97aa4e24c6f1932eec780d58a2faa2068253df7d6ff"}, - {file = "regex-2023.5.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:53e22e4460f0245b468ee645156a4f84d0fc35a12d9ba79bd7d79bdcd2f9629d"}, - {file = "regex-2023.5.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4b870b6f632fc74941cadc2a0f3064ed8409e6f8ee226cdfd2a85ae50473aa94"}, - {file = "regex-2023.5.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:171c52e320fe29260da550d81c6b99f6f8402450dc7777ef5ced2e848f3b6f8f"}, - {file = "regex-2023.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aad5524c2aedaf9aa14ef1bc9327f8abd915699dea457d339bebbe2f0d218f86"}, - {file = "regex-2023.5.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5a0f874ee8c0bc820e649c900243c6d1e6dc435b81da1492046716f14f1a2a96"}, - {file = "regex-2023.5.5-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e645c757183ee0e13f0bbe56508598e2d9cd42b8abc6c0599d53b0d0b8dd1479"}, - {file = "regex-2023.5.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:a4c5da39bca4f7979eefcbb36efea04471cd68db2d38fcbb4ee2c6d440699833"}, - {file = "regex-2023.5.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5e3f4468b8c6fd2fd33c218bbd0a1559e6a6fcf185af8bb0cc43f3b5bfb7d636"}, - {file = "regex-2023.5.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:59e4b729eae1a0919f9e4c0fc635fbcc9db59c74ad98d684f4877be3d2607dd6"}, - {file = "regex-2023.5.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ba73a14e9c8f9ac409863543cde3290dba39098fc261f717dc337ea72d3ebad2"}, - {file = "regex-2023.5.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0bbd5dcb19603ab8d2781fac60114fb89aee8494f4505ae7ad141a3314abb1f9"}, - {file = "regex-2023.5.5-cp310-cp310-win32.whl", hash = "sha256:40005cbd383438aecf715a7b47fe1e3dcbc889a36461ed416bdec07e0ef1db66"}, - {file = "regex-2023.5.5-cp310-cp310-win_amd64.whl", hash = "sha256:59597cd6315d3439ed4b074febe84a439c33928dd34396941b4d377692eca810"}, - {file = "regex-2023.5.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8f08276466fedb9e36e5193a96cb944928301152879ec20c2d723d1031cd4ddd"}, - {file = "regex-2023.5.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cd46f30e758629c3ee91713529cfbe107ac50d27110fdcc326a42ce2acf4dafc"}, - {file = "regex-2023.5.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2910502f718828cecc8beff004917dcf577fc5f8f5dd40ffb1ea7612124547b"}, - {file = "regex-2023.5.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:445d6f4fc3bd9fc2bf0416164454f90acab8858cd5a041403d7a11e3356980e8"}, - {file = "regex-2023.5.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18196c16a584619c7c1d843497c069955d7629ad4a3fdee240eb347f4a2c9dbe"}, - {file = "regex-2023.5.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33d430a23b661629661f1fe8395be2004006bc792bb9fc7c53911d661b69dd7e"}, - {file = "regex-2023.5.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:72a28979cc667e5f82ef433db009184e7ac277844eea0f7f4d254b789517941d"}, - {file = "regex-2023.5.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f764e4dfafa288e2eba21231f455d209f4709436baeebb05bdecfb5d8ddc3d35"}, - {file = "regex-2023.5.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:23d86ad2121b3c4fc78c58f95e19173790e22ac05996df69b84e12da5816cb17"}, - {file = "regex-2023.5.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:690a17db524ee6ac4a27efc5406530dd90e7a7a69d8360235323d0e5dafb8f5b"}, - {file = "regex-2023.5.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:1ecf3dcff71f0c0fe3e555201cbe749fa66aae8d18f80d2cc4de8e66df37390a"}, - {file = "regex-2023.5.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:811040d7f3dd9c55eb0d8b00b5dcb7fd9ae1761c454f444fd9f37fe5ec57143a"}, - {file = "regex-2023.5.5-cp311-cp311-win32.whl", hash = "sha256:c8c143a65ce3ca42e54d8e6fcaf465b6b672ed1c6c90022794a802fb93105d22"}, - {file = "regex-2023.5.5-cp311-cp311-win_amd64.whl", hash = "sha256:586a011f77f8a2da4b888774174cd266e69e917a67ba072c7fc0e91878178a80"}, - {file = "regex-2023.5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b6365703e8cf1644b82104cdd05270d1a9f043119a168d66c55684b1b557d008"}, - {file = "regex-2023.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a56c18f21ac98209da9c54ae3ebb3b6f6e772038681d6cb43b8d53da3b09ee81"}, - {file = "regex-2023.5.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8b942d8b3ce765dbc3b1dad0a944712a89b5de290ce8f72681e22b3c55f3cc8"}, - {file = "regex-2023.5.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:844671c9c1150fcdac46d43198364034b961bd520f2c4fdaabfc7c7d7138a2dd"}, - {file = "regex-2023.5.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c2ce65bdeaf0a386bb3b533a28de3994e8e13b464ac15e1e67e4603dd88787fa"}, - {file = "regex-2023.5.5-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fee0016cc35a8a91e8cc9312ab26a6fe638d484131a7afa79e1ce6165328a135"}, - {file = "regex-2023.5.5-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:18f05d14f14a812fe9723f13afafefe6b74ca042d99f8884e62dbd34dcccf3e2"}, - {file = "regex-2023.5.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:941b3f1b2392f0bcd6abf1bc7a322787d6db4e7457be6d1ffd3a693426a755f2"}, - {file = "regex-2023.5.5-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:921473a93bcea4d00295799ab929522fc650e85c6b9f27ae1e6bb32a790ea7d3"}, - {file = "regex-2023.5.5-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:e2205a81f815b5bb17e46e74cc946c575b484e5f0acfcb805fb252d67e22938d"}, - {file = "regex-2023.5.5-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:385992d5ecf1a93cb85adff2f73e0402dd9ac29b71b7006d342cc920816e6f32"}, - {file = "regex-2023.5.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:890a09cb0a62198bff92eda98b2b507305dd3abf974778bae3287f98b48907d3"}, - {file = "regex-2023.5.5-cp36-cp36m-win32.whl", hash = "sha256:821a88b878b6589c5068f4cc2cfeb2c64e343a196bc9d7ac68ea8c2a776acd46"}, - {file = "regex-2023.5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:7918a1b83dd70dc04ab5ed24c78ae833ae8ea228cef84e08597c408286edc926"}, - {file = "regex-2023.5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:338994d3d4ca4cf12f09822e025731a5bdd3a37aaa571fa52659e85ca793fb67"}, - {file = "regex-2023.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a69cf0c00c4d4a929c6c7717fd918414cab0d6132a49a6d8fc3ded1988ed2ea"}, - {file = "regex-2023.5.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8f5e06df94fff8c4c85f98c6487f6636848e1dc85ce17ab7d1931df4a081f657"}, - {file = "regex-2023.5.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8906669b03c63266b6a7693d1f487b02647beb12adea20f8840c1a087e2dfb5"}, - {file = "regex-2023.5.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fda3e50abad8d0f48df621cf75adc73c63f7243cbe0e3b2171392b445401550"}, - {file = "regex-2023.5.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ac2b7d341dc1bd102be849d6dd33b09701223a851105b2754339e390be0627a"}, - {file = "regex-2023.5.5-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:fb2b495dd94b02de8215625948132cc2ea360ae84fe6634cd19b6567709c8ae2"}, - {file = "regex-2023.5.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:aa7d032c1d84726aa9edeb6accf079b4caa87151ca9fabacef31fa028186c66d"}, - {file = "regex-2023.5.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:3d45864693351c15531f7e76f545ec35000d50848daa833cead96edae1665559"}, - {file = "regex-2023.5.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21e90a288e6ba4bf44c25c6a946cb9b0f00b73044d74308b5e0afd190338297c"}, - {file = "regex-2023.5.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:10250a093741ec7bf74bcd2039e697f519b028518f605ff2aa7ac1e9c9f97423"}, - {file = "regex-2023.5.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6b8d0c153f07a953636b9cdb3011b733cadd4178123ef728ccc4d5969e67f3c2"}, - {file = "regex-2023.5.5-cp37-cp37m-win32.whl", hash = "sha256:10374c84ee58c44575b667310d5bbfa89fb2e64e52349720a0182c0017512f6c"}, - {file = "regex-2023.5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9b320677521aabf666cdd6e99baee4fb5ac3996349c3b7f8e7c4eee1c00dfe3a"}, - {file = "regex-2023.5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:afb1c70ec1e594a547f38ad6bf5e3d60304ce7539e677c1429eebab115bce56e"}, - {file = "regex-2023.5.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cf123225945aa58b3057d0fba67e8061c62d14cc8a4202630f8057df70189051"}, - {file = "regex-2023.5.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a99757ad7fe5c8a2bb44829fc57ced11253e10f462233c1255fe03888e06bc19"}, - {file = "regex-2023.5.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a623564d810e7a953ff1357f7799c14bc9beeab699aacc8b7ab7822da1e952b8"}, - {file = "regex-2023.5.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ced02e3bd55e16e89c08bbc8128cff0884d96e7f7a5633d3dc366b6d95fcd1d6"}, - {file = "regex-2023.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d1cbe6b5be3b9b698d8cc4ee4dee7e017ad655e83361cd0ea8e653d65e469468"}, - {file = "regex-2023.5.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a6e4b0e0531223f53bad07ddf733af490ba2b8367f62342b92b39b29f72735a"}, - {file = "regex-2023.5.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:2e9c4f778514a560a9c9aa8e5538bee759b55f6c1dcd35613ad72523fd9175b8"}, - {file = "regex-2023.5.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:256f7f4c6ba145f62f7a441a003c94b8b1af78cee2cccacfc1e835f93bc09426"}, - {file = "regex-2023.5.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:bd7b68fd2e79d59d86dcbc1ccd6e2ca09c505343445daaa4e07f43c8a9cc34da"}, - {file = "regex-2023.5.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4a5059bd585e9e9504ef9c07e4bc15b0a621ba20504388875d66b8b30a5c4d18"}, - {file = "regex-2023.5.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:6893544e06bae009916a5658ce7207e26ed17385149f35a3125f5259951f1bbe"}, - {file = "regex-2023.5.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c64d5abe91a3dfe5ff250c6bb267ef00dbc01501518225b45a5f9def458f31fb"}, - {file = "regex-2023.5.5-cp38-cp38-win32.whl", hash = "sha256:7923470d6056a9590247ff729c05e8e0f06bbd4efa6569c916943cb2d9b68b91"}, - {file = "regex-2023.5.5-cp38-cp38-win_amd64.whl", hash = "sha256:4035d6945cb961c90c3e1c1ca2feb526175bcfed44dfb1cc77db4fdced060d3e"}, - {file = "regex-2023.5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:50fd2d9b36938d4dcecbd684777dd12a407add4f9f934f235c66372e630772b0"}, - {file = "regex-2023.5.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d19e57f888b00cd04fc38f5e18d0efbd91ccba2d45039453ab2236e6eec48d4d"}, - {file = "regex-2023.5.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd966475e963122ee0a7118ec9024388c602d12ac72860f6eea119a3928be053"}, - {file = "regex-2023.5.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db09e6c18977a33fea26fe67b7a842f706c67cf8bda1450974d0ae0dd63570df"}, - {file = "regex-2023.5.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6164d4e2a82f9ebd7752a06bd6c504791bedc6418c0196cd0a23afb7f3e12b2d"}, - {file = "regex-2023.5.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:84397d3f750d153ebd7f958efaa92b45fea170200e2df5e0e1fd4d85b7e3f58a"}, - {file = "regex-2023.5.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c3efee9bb53cbe7b285760c81f28ac80dc15fa48b5fe7e58b52752e642553f1"}, - {file = "regex-2023.5.5-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:144b5b017646b5a9392a5554a1e5db0000ae637be4971c9747566775fc96e1b2"}, - {file = "regex-2023.5.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1189fbbb21e2c117fda5303653b61905aeeeea23de4a94d400b0487eb16d2d60"}, - {file = "regex-2023.5.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f83fe9e10f9d0b6cf580564d4d23845b9d692e4c91bd8be57733958e4c602956"}, - {file = "regex-2023.5.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:72aa4746993a28c841e05889f3f1b1e5d14df8d3daa157d6001a34c98102b393"}, - {file = "regex-2023.5.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:de2f780c3242ea114dd01f84848655356af4dd561501896c751d7b885ea6d3a1"}, - {file = "regex-2023.5.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:290fd35219486dfbc00b0de72f455ecdd63e59b528991a6aec9fdfc0ce85672e"}, - {file = "regex-2023.5.5-cp39-cp39-win32.whl", hash = "sha256:732176f5427e72fa2325b05c58ad0b45af341c459910d766f814b0584ac1f9ac"}, - {file = "regex-2023.5.5-cp39-cp39-win_amd64.whl", hash = "sha256:1307aa4daa1cbb23823d8238e1f61292fd07e4e5d8d38a6efff00b67a7cdb764"}, - {file = "regex-2023.5.5.tar.gz", hash = "sha256:7d76a8a1fc9da08296462a18f16620ba73bcbf5909e42383b253ef34d9d5141e"}, + {file = "regex-2022.10.31-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a8ff454ef0bb061e37df03557afda9d785c905dab15584860f982e88be73015f"}, + {file = "regex-2022.10.31-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1eba476b1b242620c266edf6325b443a2e22b633217a9835a52d8da2b5c051f9"}, + {file = "regex-2022.10.31-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0e5af9a9effb88535a472e19169e09ce750c3d442fb222254a276d77808620b"}, + {file = "regex-2022.10.31-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d03fe67b2325cb3f09be029fd5da8df9e6974f0cde2c2ac6a79d2634e791dd57"}, + {file = "regex-2022.10.31-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a9d0b68ac1743964755ae2d89772c7e6fb0118acd4d0b7464eaf3921c6b49dd4"}, + {file = "regex-2022.10.31-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a45b6514861916c429e6059a55cf7db74670eaed2052a648e3e4d04f070e001"}, + {file = "regex-2022.10.31-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8b0886885f7323beea6f552c28bff62cbe0983b9fbb94126531693ea6c5ebb90"}, + {file = "regex-2022.10.31-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5aefb84a301327ad115e9d346c8e2760009131d9d4b4c6b213648d02e2abe144"}, + {file = "regex-2022.10.31-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:702d8fc6f25bbf412ee706bd73019da5e44a8400861dfff7ff31eb5b4a1276dc"}, + {file = "regex-2022.10.31-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a3c1ebd4ed8e76e886507c9eddb1a891673686c813adf889b864a17fafcf6d66"}, + {file = "regex-2022.10.31-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:50921c140561d3db2ab9f5b11c5184846cde686bb5a9dc64cae442926e86f3af"}, + {file = "regex-2022.10.31-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:7db345956ecce0c99b97b042b4ca7326feeec6b75facd8390af73b18e2650ffc"}, + {file = "regex-2022.10.31-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:763b64853b0a8f4f9cfb41a76a4a85a9bcda7fdda5cb057016e7706fde928e66"}, + {file = "regex-2022.10.31-cp310-cp310-win32.whl", hash = "sha256:44136355e2f5e06bf6b23d337a75386371ba742ffa771440b85bed367c1318d1"}, + {file = "regex-2022.10.31-cp310-cp310-win_amd64.whl", hash = "sha256:bfff48c7bd23c6e2aec6454aaf6edc44444b229e94743b34bdcdda2e35126cf5"}, + {file = "regex-2022.10.31-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4b4b1fe58cd102d75ef0552cf17242705ce0759f9695334a56644ad2d83903fe"}, + {file = "regex-2022.10.31-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:542e3e306d1669b25936b64917285cdffcd4f5c6f0247636fec037187bd93542"}, + {file = "regex-2022.10.31-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c27cc1e4b197092e50ddbf0118c788d9977f3f8f35bfbbd3e76c1846a3443df7"}, + {file = "regex-2022.10.31-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8e38472739028e5f2c3a4aded0ab7eadc447f0d84f310c7a8bb697ec417229e"}, + {file = "regex-2022.10.31-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:76c598ca73ec73a2f568e2a72ba46c3b6c8690ad9a07092b18e48ceb936e9f0c"}, + {file = "regex-2022.10.31-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c28d3309ebd6d6b2cf82969b5179bed5fefe6142c70f354ece94324fa11bf6a1"}, + {file = "regex-2022.10.31-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9af69f6746120998cd9c355e9c3c6aec7dff70d47247188feb4f829502be8ab4"}, + {file = "regex-2022.10.31-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a5f9505efd574d1e5b4a76ac9dd92a12acb2b309551e9aa874c13c11caefbe4f"}, + {file = "regex-2022.10.31-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5ff525698de226c0ca743bfa71fc6b378cda2ddcf0d22d7c37b1cc925c9650a5"}, + {file = "regex-2022.10.31-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:4fe7fda2fe7c8890d454f2cbc91d6c01baf206fbc96d89a80241a02985118c0c"}, + {file = "regex-2022.10.31-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:2cdc55ca07b4e70dda898d2ab7150ecf17c990076d3acd7a5f3b25cb23a69f1c"}, + {file = "regex-2022.10.31-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:44a6c2f6374e0033873e9ed577a54a3602b4f609867794c1a3ebba65e4c93ee7"}, + {file = "regex-2022.10.31-cp311-cp311-win32.whl", hash = "sha256:d8716f82502997b3d0895d1c64c3b834181b1eaca28f3f6336a71777e437c2af"}, + {file = "regex-2022.10.31-cp311-cp311-win_amd64.whl", hash = "sha256:61edbca89aa3f5ef7ecac8c23d975fe7261c12665f1d90a6b1af527bba86ce61"}, + {file = "regex-2022.10.31-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:0a069c8483466806ab94ea9068c34b200b8bfc66b6762f45a831c4baaa9e8cdd"}, + {file = "regex-2022.10.31-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d26166acf62f731f50bdd885b04b38828436d74e8e362bfcb8df221d868b5d9b"}, + {file = "regex-2022.10.31-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac741bf78b9bb432e2d314439275235f41656e189856b11fb4e774d9f7246d81"}, + {file = "regex-2022.10.31-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:75f591b2055523fc02a4bbe598aa867df9e953255f0b7f7715d2a36a9c30065c"}, + {file = "regex-2022.10.31-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b30bddd61d2a3261f025ad0f9ee2586988c6a00c780a2fb0a92cea2aa702c54"}, + {file = "regex-2022.10.31-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef4163770525257876f10e8ece1cf25b71468316f61451ded1a6f44273eedeb5"}, + {file = "regex-2022.10.31-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:7b280948d00bd3973c1998f92e22aa3ecb76682e3a4255f33e1020bd32adf443"}, + {file = "regex-2022.10.31-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:d0213671691e341f6849bf33cd9fad21f7b1cb88b89e024f33370733fec58742"}, + {file = "regex-2022.10.31-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:22e7ebc231d28393dfdc19b185d97e14a0f178bedd78e85aad660e93b646604e"}, + {file = "regex-2022.10.31-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:8ad241da7fac963d7573cc67a064c57c58766b62a9a20c452ca1f21050868dfa"}, + {file = "regex-2022.10.31-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:586b36ebda81e6c1a9c5a5d0bfdc236399ba6595e1397842fd4a45648c30f35e"}, + {file = "regex-2022.10.31-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0653d012b3bf45f194e5e6a41df9258811ac8fc395579fa82958a8b76286bea4"}, + {file = "regex-2022.10.31-cp36-cp36m-win32.whl", hash = "sha256:144486e029793a733e43b2e37df16a16df4ceb62102636ff3db6033994711066"}, + {file = "regex-2022.10.31-cp36-cp36m-win_amd64.whl", hash = "sha256:c14b63c9d7bab795d17392c7c1f9aaabbffd4cf4387725a0ac69109fb3b550c6"}, + {file = "regex-2022.10.31-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4cac3405d8dda8bc6ed499557625585544dd5cbf32072dcc72b5a176cb1271c8"}, + {file = "regex-2022.10.31-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23cbb932cc53a86ebde0fb72e7e645f9a5eec1a5af7aa9ce333e46286caef783"}, + {file = "regex-2022.10.31-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:74bcab50a13960f2a610cdcd066e25f1fd59e23b69637c92ad470784a51b1347"}, + {file = "regex-2022.10.31-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78d680ef3e4d405f36f0d6d1ea54e740366f061645930072d39bca16a10d8c93"}, + {file = "regex-2022.10.31-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce6910b56b700bea7be82c54ddf2e0ed792a577dfaa4a76b9af07d550af435c6"}, + {file = "regex-2022.10.31-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:659175b2144d199560d99a8d13b2228b85e6019b6e09e556209dfb8c37b78a11"}, + {file = "regex-2022.10.31-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1ddf14031a3882f684b8642cb74eea3af93a2be68893901b2b387c5fd92a03ec"}, + {file = "regex-2022.10.31-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b683e5fd7f74fb66e89a1ed16076dbab3f8e9f34c18b1979ded614fe10cdc4d9"}, + {file = "regex-2022.10.31-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2bde29cc44fa81c0a0c8686992c3080b37c488df167a371500b2a43ce9f026d1"}, + {file = "regex-2022.10.31-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:4919899577ba37f505aaebdf6e7dc812d55e8f097331312db7f1aab18767cce8"}, + {file = "regex-2022.10.31-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:9c94f7cc91ab16b36ba5ce476f1904c91d6c92441f01cd61a8e2729442d6fcf5"}, + {file = "regex-2022.10.31-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ae1e96785696b543394a4e3f15f3f225d44f3c55dafe3f206493031419fedf95"}, + {file = "regex-2022.10.31-cp37-cp37m-win32.whl", hash = "sha256:c670f4773f2f6f1957ff8a3962c7dd12e4be54d05839b216cb7fd70b5a1df394"}, + {file = "regex-2022.10.31-cp37-cp37m-win_amd64.whl", hash = "sha256:8e0caeff18b96ea90fc0eb6e3bdb2b10ab5b01a95128dfeccb64a7238decf5f0"}, + {file = "regex-2022.10.31-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:131d4be09bea7ce2577f9623e415cab287a3c8e0624f778c1d955ec7c281bd4d"}, + {file = "regex-2022.10.31-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e613a98ead2005c4ce037c7b061f2409a1a4e45099edb0ef3200ee26ed2a69a8"}, + {file = "regex-2022.10.31-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:052b670fafbe30966bbe5d025e90b2a491f85dfe5b2583a163b5e60a85a321ad"}, + {file = "regex-2022.10.31-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa62a07ac93b7cb6b7d0389d8ef57ffc321d78f60c037b19dfa78d6b17c928ee"}, + {file = "regex-2022.10.31-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5352bea8a8f84b89d45ccc503f390a6be77917932b1c98c4cdc3565137acc714"}, + {file = "regex-2022.10.31-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20f61c9944f0be2dc2b75689ba409938c14876c19d02f7585af4460b6a21403e"}, + {file = "regex-2022.10.31-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:29c04741b9ae13d1e94cf93fca257730b97ce6ea64cfe1eba11cf9ac4e85afb6"}, + {file = "regex-2022.10.31-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:543883e3496c8b6d58bd036c99486c3c8387c2fc01f7a342b760c1ea3158a318"}, + {file = "regex-2022.10.31-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b7a8b43ee64ca8f4befa2bea4083f7c52c92864d8518244bfa6e88c751fa8fff"}, + {file = "regex-2022.10.31-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:6a9a19bea8495bb419dc5d38c4519567781cd8d571c72efc6aa959473d10221a"}, + {file = "regex-2022.10.31-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:6ffd55b5aedc6f25fd8d9f905c9376ca44fcf768673ffb9d160dd6f409bfda73"}, + {file = "regex-2022.10.31-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:4bdd56ee719a8f751cf5a593476a441c4e56c9b64dc1f0f30902858c4ef8771d"}, + {file = "regex-2022.10.31-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8ca88da1bd78990b536c4a7765f719803eb4f8f9971cc22d6ca965c10a7f2c4c"}, + {file = "regex-2022.10.31-cp38-cp38-win32.whl", hash = "sha256:5a260758454580f11dd8743fa98319bb046037dfab4f7828008909d0aa5292bc"}, + {file = "regex-2022.10.31-cp38-cp38-win_amd64.whl", hash = "sha256:5e6a5567078b3eaed93558842346c9d678e116ab0135e22eb72db8325e90b453"}, + {file = "regex-2022.10.31-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5217c25229b6a85049416a5c1e6451e9060a1edcf988641e309dbe3ab26d3e49"}, + {file = "regex-2022.10.31-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4bf41b8b0a80708f7e0384519795e80dcb44d7199a35d52c15cc674d10b3081b"}, + {file = "regex-2022.10.31-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cf0da36a212978be2c2e2e2d04bdff46f850108fccc1851332bcae51c8907cc"}, + {file = "regex-2022.10.31-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d403d781b0e06d2922435ce3b8d2376579f0c217ae491e273bab8d092727d244"}, + {file = "regex-2022.10.31-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a37d51fa9a00d265cf73f3de3930fa9c41548177ba4f0faf76e61d512c774690"}, + {file = "regex-2022.10.31-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4f781ffedd17b0b834c8731b75cce2639d5a8afe961c1e58ee7f1f20b3af185"}, + {file = "regex-2022.10.31-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d243b36fbf3d73c25e48014961e83c19c9cc92530516ce3c43050ea6276a2ab7"}, + {file = "regex-2022.10.31-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:370f6e97d02bf2dd20d7468ce4f38e173a124e769762d00beadec3bc2f4b3bc4"}, + {file = "regex-2022.10.31-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:597f899f4ed42a38df7b0e46714880fb4e19a25c2f66e5c908805466721760f5"}, + {file = "regex-2022.10.31-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7dbdce0c534bbf52274b94768b3498abdf675a691fec5f751b6057b3030f34c1"}, + {file = "regex-2022.10.31-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:22960019a842777a9fa5134c2364efaed5fbf9610ddc5c904bd3a400973b0eb8"}, + {file = "regex-2022.10.31-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:7f5a3ffc731494f1a57bd91c47dc483a1e10048131ffb52d901bfe2beb6102e8"}, + {file = "regex-2022.10.31-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7ef6b5942e6bfc5706301a18a62300c60db9af7f6368042227ccb7eeb22d0892"}, + {file = "regex-2022.10.31-cp39-cp39-win32.whl", hash = "sha256:395161bbdbd04a8333b9ff9763a05e9ceb4fe210e3c7690f5e68cedd3d65d8e1"}, + {file = "regex-2022.10.31-cp39-cp39-win_amd64.whl", hash = "sha256:957403a978e10fb3ca42572a23e6f7badff39aa1ce2f4ade68ee452dc6807692"}, + {file = "regex-2022.10.31.tar.gz", hash = "sha256:a3a98921da9a1bf8457aeee6a551948a83601689e5ecdd736894ea9bbec77e83"}, ] [[package]] name = "requests" -version = "2.30.0" +version = "2.31.0" description = "Python HTTP for Humans." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "requests-2.30.0-py3-none-any.whl", hash = "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294"}, - {file = "requests-2.30.0.tar.gz", hash = "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4"}, + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, ] [package.dependencies] @@ -1533,19 +1596,19 @@ files = [ [[package]] name = "setuptools" -version = "67.7.2" +version = "67.8.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"}, - {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"}, + {file = "setuptools-67.8.0-py3-none-any.whl", hash = "sha256:5df61bf30bb10c6f756eb19e7c9f3b473051f48db77fddbe06ff2ca307df9a6f"}, + {file = "setuptools-67.8.0.tar.gz", hash = "sha256:62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"}, ] [package.extras] docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] [[package]] @@ -1767,21 +1830,20 @@ files = [ [[package]] name = "urllib3" -version = "2.0.2" +version = "1.26.16" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=3.7" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-2.0.2-py3-none-any.whl", hash = "sha256:d055c2f9d38dc53c808f6fdc8eab7360b6fdbbde02340ed25cfbcd817c62469e"}, - {file = "urllib3-2.0.2.tar.gz", hash = "sha256:61717a1095d7e155cdb737ac7bb2f4324a858a1e2e6466f6d03ff630ca68d3cc"}, + {file = "urllib3-1.26.16-py2.py3-none-any.whl", hash = "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f"}, + {file = "urllib3-1.26.16.tar.gz", hash = "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] -secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] -socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] -zstd = ["zstandard (>=0.18.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "uvloop" @@ -1999,4 +2061,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.8.0,<3.11.0" -content-hash = "cfbb22f8dcd217af77e7d9b7f414ba7f10310c40d3936549f40578d47d35a1ea" +content-hash = "9c57747acdc21736910774afe9a00d540292c9b47ad56754740ba97d9d1761f5" diff --git a/pyproject.toml b/pyproject.toml index ea21fe1..ce91d84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ packages = [{include = "wiki_retrieval"}] python = ">=3.8.0,<3.11.0" rich = "*" pytz = "*" -urllib3 = "*" +urllib3 = "1.*" sanic = {extras = ["ext"], version = ">=23.3.0"} openai = ">=0.27.0" tiktoken = "*" @@ -20,6 +20,7 @@ pyassorted = "*" pymediawiki = "*" qdrant-client = "*" arrow = "*" +lingua-language-detector = "*" [tool.poetry.group.dev.dependencies] black = "*" diff --git a/requirements-dev.txt b/requirements-dev.txt index 86552c6..e7ed898 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ aiofiles==23.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" aiohttp==3.8.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" aiosignal==1.3.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -anyio==3.6.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +anyio==3.7.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" arrow==1.2.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" async-timeout==4.0.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" attrs==23.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" @@ -20,40 +20,43 @@ h11==0.14.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" h2==4.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" hpack==4.0.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" html5tagger==1.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -httpcore==0.17.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +httpcore==0.17.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" httptools==0.5.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -httpx[http2]==0.24.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +httpx[http2]==0.24.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" hyperframe==6.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" idna==3.4 ; python_version >= "3.8" and python_full_version < "3.11.0" iniconfig==2.0.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +lingua-language-detector==1.3.2 ; python_version >= "3.8" and python_full_version < "3.11.0" markdown-it-py==2.2.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" mdurl==0.1.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" multidict==6.0.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" mypy-extensions==1.0.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" numpy==1.24.3 ; python_version >= "3.8" and python_full_version < "3.11.0" -openai==0.27.6 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +openai==0.27.7 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" packaging==23.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pathspec==0.11.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" platformdirs==3.5.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pluggy==1.0.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -protobuf==4.23.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pyassorted==0.6.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pydantic==1.10.7 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +portalocker==2.7.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +protobuf==4.23.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +pyassorted==0.7.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +pydantic==1.10.8 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pygments==2.15.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pymediawiki==0.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pytest-asyncio==0.21.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pytest==7.3.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" python-dateutil==2.8.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pytz==2023.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +pywin32==306 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" and platform_system == "Windows" pyyaml==6.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -qdrant-client==1.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -regex==2023.5.5 ; python_version >= "3.8" and python_full_version < "3.11.0" -requests==2.30.0 ; python_version >= "3.8" and python_full_version < "3.11.0" +qdrant-client==1.2.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +regex==2022.10.31 ; python_version >= "3.8" and python_full_version < "3.11.0" +requests==2.31.0 ; python_version >= "3.8" and python_full_version < "3.11.0" rich==13.3.5 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sanic-ext==23.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sanic-routing==22.8.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sanic[ext]==23.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -setuptools==67.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +setuptools==67.8.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" six==1.16.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sniffio==1.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" soupsieve==2.4.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" @@ -63,7 +66,7 @@ tqdm==4.65.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" tracerite==1.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" typing-extensions==4.5.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" ujson==5.7.0 ; sys_platform != "win32" and implementation_name == "cpython" and python_full_version >= "3.8.0" and python_full_version < "3.11.0" -urllib3==2.0.2 ; python_version >= "3.8" and python_full_version < "3.11.0" +urllib3==1.26.16 ; python_version >= "3.8" and python_full_version < "3.11.0" uvloop==0.17.0 ; sys_platform != "win32" and implementation_name == "cpython" and python_full_version >= "3.8.0" and python_full_version < "3.11.0" websockets==11.0.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" yarl==1.9.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" diff --git a/requirements.txt b/requirements.txt index 6ae14c1..7ce9181 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ aiofiles==23.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" aiohttp==3.8.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" aiosignal==1.3.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -anyio==3.6.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +anyio==3.7.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" arrow==1.2.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" async-timeout==4.0.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" attrs==23.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" @@ -10,6 +10,7 @@ certifi==2023.5.7 ; python_version >= "3.8" and python_full_version < "3.11.0" charset-normalizer==3.1.0 ; python_version >= "3.8" and python_full_version < "3.11.0" colorama==0.4.6 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" and platform_system == "Windows" dacite==1.8.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +exceptiongroup==1.1.1 ; python_full_version >= "3.8.0" and python_version < "3.11" frozenlist==1.3.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" grpcio-tools==1.54.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" grpcio==1.54.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" @@ -17,32 +18,35 @@ h11==0.14.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" h2==4.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" hpack==4.0.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" html5tagger==1.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -httpcore==0.17.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +httpcore==0.17.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" httptools==0.5.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -httpx[http2]==0.24.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +httpx[http2]==0.24.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" hyperframe==6.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" idna==3.4 ; python_version >= "3.8" and python_full_version < "3.11.0" +lingua-language-detector==1.3.2 ; python_version >= "3.8" and python_full_version < "3.11.0" markdown-it-py==2.2.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" mdurl==0.1.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" multidict==6.0.4 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" numpy==1.24.3 ; python_version >= "3.8" and python_full_version < "3.11.0" -openai==0.27.6 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -protobuf==4.23.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pyassorted==0.6.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -pydantic==1.10.7 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +openai==0.27.7 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +portalocker==2.7.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +protobuf==4.23.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +pyassorted==0.7.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +pydantic==1.10.8 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pygments==2.15.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pymediawiki==0.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" python-dateutil==2.8.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" pytz==2023.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +pywin32==306 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" and platform_system == "Windows" pyyaml==6.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -qdrant-client==1.0.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -regex==2023.5.5 ; python_version >= "3.8" and python_full_version < "3.11.0" -requests==2.30.0 ; python_version >= "3.8" and python_full_version < "3.11.0" +qdrant-client==1.2.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +regex==2022.10.31 ; python_version >= "3.8" and python_full_version < "3.11.0" +requests==2.31.0 ; python_version >= "3.8" and python_full_version < "3.11.0" rich==13.3.5 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sanic-ext==23.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sanic-routing==22.8.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sanic[ext]==23.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" -setuptools==67.7.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" +setuptools==67.8.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" six==1.16.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" sniffio==1.3.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" soupsieve==2.4.1 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" @@ -51,7 +55,7 @@ tqdm==4.65.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" tracerite==1.1.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" typing-extensions==4.5.0 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" ujson==5.7.0 ; sys_platform != "win32" and implementation_name == "cpython" and python_full_version >= "3.8.0" and python_full_version < "3.11.0" -urllib3==2.0.2 ; python_version >= "3.8" and python_full_version < "3.11.0" +urllib3==1.26.16 ; python_version >= "3.8" and python_full_version < "3.11.0" uvloop==0.17.0 ; sys_platform != "win32" and implementation_name == "cpython" and python_full_version >= "3.8.0" and python_full_version < "3.11.0" websockets==11.0.3 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" yarl==1.9.2 ; python_full_version >= "3.8.0" and python_full_version < "3.11.0" From ba8c609cac634bb5913b7c73fc286e65151fe4ee Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 10:59:32 +0800 Subject: [PATCH 2/9] Add langauge detector powered by lingua --- app/app/config.py | 16 ++++++++++++++++ app/app/deps/__init__.py | 3 ++- app/app/deps/language.py | 7 +++++++ app/app/main.py | 29 ++++++++++++++++++++++++++--- 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 app/app/deps/language.py diff --git a/app/app/config.py b/app/app/config.py index 05a8fe5..92430f2 100644 --- a/app/app/config.py +++ b/app/app/config.py @@ -30,6 +30,22 @@ def __init__(self, **kwargs): "LOG_SERVICE_FILENAME", "service.log" ) + # Language Config + self.detect_languages = [ + "ENGLISH", + "SPANISH", + "GERMAN", + "JAPANESE", + "FRENCH", + "RUSSIAN", + "ITALIAN", + "CHINESE", + "POLISH", + "DUTCH", + "PORTUGUESE", + "SWEDIS", + ] + # OpenAI Config self.OPENAI_API_KEY = environ.get("OPENAI_API_KEY") diff --git a/app/app/deps/__init__.py b/app/app/deps/__init__.py index b776dc9..37456f3 100644 --- a/app/app/deps/__init__.py +++ b/app/app/deps/__init__.py @@ -1,5 +1,6 @@ from .document_store import get_document_store +from .language import language_detector from .timer import click_timer -__all__ = ["click_timer", "get_document_store"] +__all__ = ["click_timer", "get_document_store", "language_detector"] diff --git a/app/app/deps/language.py b/app/app/deps/language.py new file mode 100644 index 0000000..80981df --- /dev/null +++ b/app/app/deps/language.py @@ -0,0 +1,7 @@ +from sanic.request import Request + +from lingua import LanguageDetector + + +def language_detector(request: Request) -> "LanguageDetector": + return request.app.ctx.language_detector diff --git a/app/app/main.py b/app/app/main.py index e8acee8..64fe2be 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -5,6 +5,7 @@ import openai import sanic from dacite import from_dict +from lingua import Language, LanguageDetector, LanguageDetectorBuilder from openai.openai_object import OpenAIObject from pyassorted.datetime import Timer from sanic_ext import openapi @@ -13,7 +14,7 @@ from sanic.response import text as PlainTextResponse, json as JsonResponse from app.config import logger, settings -from app.deps import click_timer, get_document_store +from app.deps import click_timer, get_document_store, language_detector from app.document_store import QdrantDocumentStore from app.schema import api as api_model from app.schema.openai import OpenaiEmbeddingResult @@ -29,6 +30,7 @@ async def before_server_start(*_): # Set OpenAI credential openai.api_key = settings.OPENAI_API_KEY logger.debug("Have set OpenAI credential.") + # Create document store client doc_store = QdrantDocumentStore(collection_name=settings.QDRANT_COLLECTION) app.ctx.document_store = doc_store @@ -40,6 +42,22 @@ async def before_server_start(*_): f'Failed to touch document store: "{doc_store.host}:{doc_store.port}"' ) + # Language detection + detect_languages: List["Language"] = [] + for _lang in settings.detect_languages: + try: + detect_languages.append(Language[_lang.upper()]) + except KeyError: + logger.warning(f"Language {_lang} not supported.") + detect_languages = detect_languages or [Language.ENGLISH] + app.ctx.language_detector = LanguageDetectorBuilder.from_languages( + *detect_languages + ).build() + logger.debug( + "Have set language detector with languages: " + + f"{', '.join([l.name for l in detect_languages])}." + ) + @app.signal("openai.embedding.text") async def openai_embedding_text(texts: List[Text], **context) -> List[List[float]]: texts = [texts] if isinstance(texts, Text) else texts @@ -96,7 +114,11 @@ async def upsert(request: "Request", doc_store: "QdrantDocumentStore"): body=api_model.QueryCall, response=api_model.QueryResponse, ) - async def query(request: "Request", doc_store: "QdrantDocumentStore"): + async def query( + request: "Request", + doc_store: "QdrantDocumentStore", + lang_detector: "LanguageDetector", + ): try: query_call = from_dict(data_class=api_model.QueryCall, data=request.json) except Exception: @@ -161,8 +183,9 @@ async def dispatch_embeddings( return embeddings # Dependencies injection - app.ext.add_dependency(Timer, click_timer) + app.ext.add_dependency(LanguageDetector, language_detector) app.ext.add_dependency(QdrantDocumentStore, get_document_store) + app.ext.add_dependency(Timer, click_timer) # Blueprint From fba3898b11ef76cca6bc6c0be7b0882174867517 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 14:32:54 +0800 Subject: [PATCH 3/9] Initiate wiki client. --- app/app/config.py | 2 +- app/app/exceptions/__init__.py | 2 + app/app/main.py | 6 +- app/app/resource/__init__.py | 0 app/app/resource/wiki.py | 133 +++++++++++++++++++++++++++++++++ 5 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 app/app/exceptions/__init__.py create mode 100644 app/app/resource/__init__.py create mode 100644 app/app/resource/wiki.py diff --git a/app/app/config.py b/app/app/config.py index 92430f2..dec64ae 100644 --- a/app/app/config.py +++ b/app/app/config.py @@ -43,7 +43,7 @@ def __init__(self, **kwargs): "POLISH", "DUTCH", "PORTUGUESE", - "SWEDIS", + "SWEDISH", ] # OpenAI Config diff --git a/app/app/exceptions/__init__.py b/app/app/exceptions/__init__.py new file mode 100644 index 0000000..f88096f --- /dev/null +++ b/app/app/exceptions/__init__.py @@ -0,0 +1,2 @@ +class NotFound(Exception): + pass diff --git a/app/app/main.py b/app/app/main.py index 64fe2be..bd3f104 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -16,6 +16,7 @@ from app.config import logger, settings from app.deps import click_timer, get_document_store, language_detector from app.document_store import QdrantDocumentStore +from app.resource.wiki import WikiClient from app.schema import api as api_model from app.schema.openai import OpenaiEmbeddingResult @@ -58,6 +59,10 @@ async def before_server_start(*_): + f"{', '.join([l.name for l in detect_languages])}." ) + # Wiki client + app.ctx.wiki_client = WikiClient() + logger.debug("Wiki client has been initialized.") + @app.signal("openai.embedding.text") async def openai_embedding_text(texts: List[Text], **context) -> List[List[float]]: texts = [texts] if isinstance(texts, Text) else texts @@ -117,7 +122,6 @@ async def upsert(request: "Request", doc_store: "QdrantDocumentStore"): async def query( request: "Request", doc_store: "QdrantDocumentStore", - lang_detector: "LanguageDetector", ): try: query_call = from_dict(data_class=api_model.QueryCall, data=request.json) diff --git a/app/app/resource/__init__.py b/app/app/resource/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/app/resource/wiki.py b/app/app/resource/wiki.py new file mode 100644 index 0000000..68c1f15 --- /dev/null +++ b/app/app/resource/wiki.py @@ -0,0 +1,133 @@ +from concurrent.futures import ThreadPoolExecutor, as_completed +from typing import Dict, List, Optional, Set, Text, Union + +from mediawiki import MediaWiki +from mediawiki.exceptions import PageError +from pyassorted.asyncio import run_func + +from app.exceptions import NotFound +from app.schema.models import Document + + +class WikiClient: + max_timeout: int = 120 + default_timeout: int = 15 + max_top_k: int = 5 + max_sentences: int = 8 + max_chars: int = 4000 + + def __init__( + self, + default_lang: Text = "en", + top_k: int = 3, + sentences: int = 4, + chars: int = 0, + timeout: float = default_timeout, + concurrent: int = 2, + ): + self.default_lang = default_lang + self.lang_client_map: Dict[Text, MediaWiki] = { + self.default_lang: MediaWiki(lang=self.default_lang, timeout=timeout) + } + self.top_k = min(top_k, self.max_top_k) + self.sentences = min(sentences, self.max_sentences) + self.chars = min(chars, self.max_chars) + self.timeout = ( + self.default_timeout if timeout < 0 else min(timeout, self.max_timeout) + ) + self.concurrent = int(concurrent) or None + + @property + def supported_languages(self) -> Set[Text]: + return set(self.get_client(lang=self.default_lang).supported_languages.keys()) + + def get_client(self, lang: Optional[Text] = None) -> "MediaWiki": + lang = lang.lower().strip() if lang else self.default_lang + + if lang not in self.supported_languages: + raise ValueError(f"Language {lang} not supported.") + + if lang not in self.lang_client_map: + self.lang_client_map[lang] = MediaWiki(lang=lang, timeout=self.timeout) + + return self.lang_client_map[lang] + + def query( + self, + query: Text, + lang: Optional[Text] = None, + top_k: Optional[int] = None, + sentences: Optional[int] = None, + chars: Optional[int] = None, + timeout: Optional[float] = None, + ) -> List[Document]: + query = query.strip() + lang = lang.lower().strip() if lang else self.default_lang + top_k = min(top_k, self.max_top_k) if top_k else self.top_k + sentences = min(sentences, self.max_sentences) if sentences else self.sentences + chars = min(chars, self.max_chars) if chars else self.chars + timeout = timeout or self.timeout + + wiki_client = self.get_client(lang=lang) + + (titles, suggestion) = wiki_client.search( + query=query, results=top_k, suggestion=True + ) + if suggestion: + titles.append(suggestion) + + title_to_content: Dict[Text, Optional[Union[Text, Exception]]] = { + title: None for title in titles + } + with ThreadPoolExecutor(max_workers=self.concurrent) as executor: + future_to_title = { + executor.submit( + self._request_by_title, + wiki_client=wiki_client, + title=title, + sentences=sentences, + chars=chars, + ): title + for title in titles + } + for future in as_completed(future_to_title): + title = future_to_title[future] + try: + page_content = future.result() + title_to_content[title] = page_content + except Exception as e: + title_to_content[title] = e + + async def async_query( + self, + query: Text, + lang: Optional[Text] = None, + top_k: Optional[int] = None, + sentences: Optional[int] = None, + chars: Optional[int] = None, + timeout: Optional[float] = None, + ) -> List[Document]: + docs = await run_func( + self.query, + query=query, + lang=lang, + top_k=top_k, + sentences=sentences, + chars=chars, + timeout=timeout, + ) + return docs + + def _request_by_title( + self, wiki_client: "MediaWiki", title: Text, sentences: int, chars: int + ) -> Text: + try: + wiki_page = wiki_client.page(title) + page_text = wiki_page.summarize(sentences=sentences, chars=chars) + return page_text + + except PageError as e: + raise NotFound(f"Wiki page {title} not found: {e}") + + except Exception as e: + raise e From fce76be18d16c9f43b247cf1f84958b4b948b792 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 15:33:25 +0800 Subject: [PATCH 4/9] Set created_at value in metadata. --- app/app/document_store/qdrant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app/document_store/qdrant.py b/app/app/document_store/qdrant.py index d525be7..95dcfd3 100644 --- a/app/app/document_store/qdrant.py +++ b/app/app/document_store/qdrant.py @@ -79,7 +79,7 @@ async def upsert(self, documents: List[DocumentWithEmbedding]) -> List[Text]: vector=doc.embedding, payload=asdict(doc), ) - _point.payload["created_at"] = created_at + _point.payload["metadata"]["created_at"] = created_at points.append(_point) self.client.upsert( From f1f29b94361a8d98d022497bf011b6025e7bb816 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 15:33:57 +0800 Subject: [PATCH 5/9] Run back ground task to fetch wiki documents. --- app/app/main.py | 22 ++++++++++++++++++++++ app/app/resource/wiki.py | 29 +++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/app/app/main.py b/app/app/main.py index bd3f104..84959f8 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -8,6 +8,7 @@ from lingua import Language, LanguageDetector, LanguageDetectorBuilder from openai.openai_object import OpenAIObject from pyassorted.datetime import Timer +from rich import print from sanic_ext import openapi from sanic.exceptions import BadRequest, ServerError from sanic.request import Request @@ -73,6 +74,18 @@ async def openai_embedding_text(texts: List[Text], **context) -> List[List[float emb_res: OpenaiEmbeddingResult = emb_res_obj.to_dict_recursive() return [emb["embedding"] for emb in emb_res["data"]] + @app.signal("wiki.documents.fetch_and_upsert") + async def wiki_documents_fetch_and_upsert(query: Text, **kwargs) -> None: + wiki_client: "WikiClient" = app.ctx.wiki_client + lang_detector: "LanguageDetector" = app.ctx.language_detector + + language = lang_detector.detect_language_of(query) + + docs = await wiki_client.async_query( + query=query, lang=language.iso_code_639_1.name.lower() + ) + print(docs) + @app.get("/") async def root(request: "Request"): return PlainTextResponse("OK") @@ -139,6 +152,15 @@ async def query( ] query_results = await doc_store.query(queries=emb_queries) + for query_result in query_results: + fetch_and_upsert_wiki_docs_task = request.app.dispatch( + "wiki.documents.fetch_and_upsert", + context=dict(query=query_result.query), + ) + app.add_task( + fetch_and_upsert_wiki_docs_task, + name="Task-wiki.documents.fetch_and_upsert-(query_result.query,)", + ) return JsonResponse(asdict(api_model.QueryResponse(results=query_results))) except Exception as e: diff --git a/app/app/resource/wiki.py b/app/app/resource/wiki.py index 68c1f15..02f3184 100644 --- a/app/app/resource/wiki.py +++ b/app/app/resource/wiki.py @@ -5,6 +5,7 @@ from mediawiki.exceptions import PageError from pyassorted.asyncio import run_func +from app.config import logger from app.exceptions import NotFound from app.schema.models import Document @@ -12,22 +13,23 @@ class WikiClient: max_timeout: int = 120 default_timeout: int = 15 - max_top_k: int = 5 + max_top_k: int = 10 max_sentences: int = 8 max_chars: int = 4000 def __init__( self, default_lang: Text = "en", - top_k: int = 3, + top_k: int = 5, sentences: int = 4, chars: int = 0, timeout: float = default_timeout, concurrent: int = 2, ): self.default_lang = default_lang + self.default_client = MediaWiki(lang=self.default_lang, timeout=timeout) self.lang_client_map: Dict[Text, MediaWiki] = { - self.default_lang: MediaWiki(lang=self.default_lang, timeout=timeout) + self.default_lang: self.default_client } self.top_k = min(top_k, self.max_top_k) self.sentences = min(sentences, self.max_sentences) @@ -39,7 +41,7 @@ def __init__( @property def supported_languages(self) -> Set[Text]: - return set(self.get_client(lang=self.default_lang).supported_languages.keys()) + return set(self.default_client.supported_languages.keys()) def get_client(self, lang: Optional[Text] = None) -> "MediaWiki": lang = lang.lower().strip() if lang else self.default_lang @@ -75,6 +77,7 @@ def query( ) if suggestion: titles.append(suggestion) + logger.debug(f"Query '{query}' to wiki({lang}) returned titles: {titles}") title_to_content: Dict[Text, Optional[Union[Text, Exception]]] = { title: None for title in titles @@ -98,6 +101,24 @@ def query( except Exception as e: title_to_content[title] = e + docs: List[Document] = [] + for title, _content in title_to_content.items(): + if isinstance(_content, Exception): + logger.exception(_content) + continue + + if not _content: + logger.error(f"Wiki page {title} not found.") + continue + + content = _content or "" + doc = Document( + text=content, + metadata=dict(name=title, title=title, source="wiki", lang=lang), + ) + docs.append(doc) + return docs + async def async_query( self, query: Text, From 53030a3d966e17ed79655248d21cdb9083e401d7 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 15:49:54 +0800 Subject: [PATCH 6/9] Upsert documents after fetch from wiki. --- app/app/main.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/app/main.py b/app/app/main.py index 84959f8..25a1f03 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -2,13 +2,13 @@ from dataclasses import asdict from typing import List, Text +import aiohttp import openai import sanic from dacite import from_dict from lingua import Language, LanguageDetector, LanguageDetectorBuilder from openai.openai_object import OpenAIObject from pyassorted.datetime import Timer -from rich import print from sanic_ext import openapi from sanic.exceptions import BadRequest, ServerError from sanic.request import Request @@ -84,7 +84,19 @@ async def wiki_documents_fetch_and_upsert(query: Text, **kwargs) -> None: docs = await wiki_client.async_query( query=query, lang=language.iso_code_639_1.name.lower() ) - print(docs) + if not docs: + return + + async with aiohttp.ClientSession() as session: + async with session.post( + "http://localhost/upsert", + json=asdict(api_model.UpsertCall(documents=docs)), + ) as resp: + resp.raise_for_status() + logger.info( + f"Upserted {len(docs)} documents from Wiki: " + + f"{', '.join([doc.metadata['name'] for doc in docs])}." + ) @app.get("/") async def root(request: "Request"): From 4ec689d7e462134888191ba8302b2840105d5283 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 16:07:56 +0800 Subject: [PATCH 7/9] Add exclude_names and exclude_titles parameters. --- app/app/main.py | 25 +++++++++++++++++++++---- app/app/resource/wiki.py | 5 +++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/app/app/main.py b/app/app/main.py index 25a1f03..33bbc43 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -1,6 +1,6 @@ import asyncio from dataclasses import asdict -from typing import List, Text +from typing import List, Optional, Text import aiohttp import openai @@ -75,15 +75,22 @@ async def openai_embedding_text(texts: List[Text], **context) -> List[List[float return [emb["embedding"] for emb in emb_res["data"]] @app.signal("wiki.documents.fetch_and_upsert") - async def wiki_documents_fetch_and_upsert(query: Text, **kwargs) -> None: + async def wiki_documents_fetch_and_upsert( + query: Text, exclude_names: Optional[List[Text]] = None, **kwargs + ) -> None: wiki_client: "WikiClient" = app.ctx.wiki_client lang_detector: "LanguageDetector" = app.ctx.language_detector + query = query.strip() + exclude_names = exclude_names or [] language = lang_detector.detect_language_of(query) docs = await wiki_client.async_query( - query=query, lang=language.iso_code_639_1.name.lower() + query=query, + lang=language.iso_code_639_1.name.lower(), + exclude_titles=exclude_names, ) + docs = [doc for doc in docs if doc.metadata["name"] not in exclude_names] if not docs: return @@ -164,15 +171,25 @@ async def query( ] query_results = await doc_store.query(queries=emb_queries) + for query_result in query_results: + existed_doc_names = [ + doc.metadata["name"] + for doc in query_result.results + if doc.metadata.get("name") + ] fetch_and_upsert_wiki_docs_task = request.app.dispatch( "wiki.documents.fetch_and_upsert", - context=dict(query=query_result.query), + context=dict( + query=query_result.query, + exclude_names=existed_doc_names, + ), ) app.add_task( fetch_and_upsert_wiki_docs_task, name="Task-wiki.documents.fetch_and_upsert-(query_result.query,)", ) + return JsonResponse(asdict(api_model.QueryResponse(results=query_results))) except Exception as e: diff --git a/app/app/resource/wiki.py b/app/app/resource/wiki.py index 02f3184..b190760 100644 --- a/app/app/resource/wiki.py +++ b/app/app/resource/wiki.py @@ -62,6 +62,7 @@ def query( sentences: Optional[int] = None, chars: Optional[int] = None, timeout: Optional[float] = None, + exclude_titles: Optional[List[Text]] = None, ) -> List[Document]: query = query.strip() lang = lang.lower().strip() if lang else self.default_lang @@ -79,6 +80,8 @@ def query( titles.append(suggestion) logger.debug(f"Query '{query}' to wiki({lang}) returned titles: {titles}") + titles = [title for title in titles if title not in exclude_titles] + title_to_content: Dict[Text, Optional[Union[Text, Exception]]] = { title: None for title in titles } @@ -127,6 +130,7 @@ async def async_query( sentences: Optional[int] = None, chars: Optional[int] = None, timeout: Optional[float] = None, + exclude_titles: Optional[List[Text]] = None, ) -> List[Document]: docs = await run_func( self.query, @@ -136,6 +140,7 @@ async def async_query( sentences=sentences, chars=chars, timeout=timeout, + exclude_titles=exclude_titles, ) return docs From 4dcaf98135a2799bbe20ce16120f6ca81abfbc70 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 16:19:39 +0800 Subject: [PATCH 8/9] Debug top_k dismatch. --- app/app/config.py | 3 +++ app/app/main.py | 6 ++++-- app/app/resource/wiki.py | 4 ++-- app/app/schema/models.py | 5 ++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/app/config.py b/app/app/config.py index dec64ae..38a5006 100644 --- a/app/app/config.py +++ b/app/app/config.py @@ -30,6 +30,9 @@ def __init__(self, **kwargs): "LOG_SERVICE_FILENAME", "service.log" ) + # Service Config + self.max_top_k: int = 20 + # Language Config self.detect_languages = [ "ENGLISH", diff --git a/app/app/main.py b/app/app/main.py index 33bbc43..751c6c9 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -76,7 +76,7 @@ async def openai_embedding_text(texts: List[Text], **context) -> List[List[float @app.signal("wiki.documents.fetch_and_upsert") async def wiki_documents_fetch_and_upsert( - query: Text, exclude_names: Optional[List[Text]] = None, **kwargs + query: Text, top_k: int, exclude_names: Optional[List[Text]] = None, **kwargs ) -> None: wiki_client: "WikiClient" = app.ctx.wiki_client lang_detector: "LanguageDetector" = app.ctx.language_detector @@ -88,6 +88,7 @@ async def wiki_documents_fetch_and_upsert( docs = await wiki_client.async_query( query=query, lang=language.iso_code_639_1.name.lower(), + top_k=top_k, exclude_titles=exclude_names, ) docs = [doc for doc in docs if doc.metadata["name"] not in exclude_names] @@ -172,7 +173,7 @@ async def query( query_results = await doc_store.query(queries=emb_queries) - for query_result in query_results: + for _query_call, query_result in zip(query_call.queries, query_results): existed_doc_names = [ doc.metadata["name"] for doc in query_result.results @@ -182,6 +183,7 @@ async def query( "wiki.documents.fetch_and_upsert", context=dict( query=query_result.query, + top_k=_query_call.top_k, exclude_names=existed_doc_names, ), ) diff --git a/app/app/resource/wiki.py b/app/app/resource/wiki.py index b190760..3713bc3 100644 --- a/app/app/resource/wiki.py +++ b/app/app/resource/wiki.py @@ -5,7 +5,7 @@ from mediawiki.exceptions import PageError from pyassorted.asyncio import run_func -from app.config import logger +from app.config import logger, settings from app.exceptions import NotFound from app.schema.models import Document @@ -13,7 +13,7 @@ class WikiClient: max_timeout: int = 120 default_timeout: int = 15 - max_top_k: int = 10 + max_top_k: int = settings.max_top_k max_sentences: int = 8 max_chars: int = 4000 diff --git a/app/app/schema/models.py b/app/app/schema/models.py index 1f38448..396f133 100644 --- a/app/app/schema/models.py +++ b/app/app/schema/models.py @@ -2,6 +2,8 @@ from dataclasses import dataclass from typing import Any, Dict, List, Optional, Text +from app.config import settings + @dataclass class _WithScore: @@ -51,11 +53,12 @@ class DocumentWithScore(DocumentWithEmbedding, _WithScore): class Query: query: Text filter: Optional[Dict[Text, Any]] = None - top_k: Optional[int] = 3 + top_k: Optional[int] = 5 def __post_init__(self): self.query = self.query.strip() self.filter = self.filter or {} + self.top_k = min(self.top_k, settings.max_top_k) def with_embedding(self, embedding: List[float]) -> "QueryWithEmbedding": return QueryWithEmbedding( From ace4941d4525c45e480db8cfd2d83ee33b8053a4 Mon Sep 17 00:00:00 2001 From: Allen Chou Date: Tue, 30 May 2023 16:32:35 +0800 Subject: [PATCH 9/9] Skip fetch wiki if score over 0.9 --- app/app/main.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/app/main.py b/app/app/main.py index 751c6c9..95a9642 100644 --- a/app/app/main.py +++ b/app/app/main.py @@ -174,22 +174,28 @@ async def query( query_results = await doc_store.query(queries=emb_queries) for _query_call, query_result in zip(query_call.queries, query_results): - existed_doc_names = [ - doc.metadata["name"] - for doc in query_result.results - if doc.metadata.get("name") - ] + if any(map(lambda doc: doc.score >= 0.9, query_result.results)): + logger.debug( + "Skip wiki fetch. We have enough score with query " + + f"'{query_result.query}'." + ) + continue # Skip if we have enough score + fetch_and_upsert_wiki_docs_task = request.app.dispatch( "wiki.documents.fetch_and_upsert", context=dict( query=query_result.query, top_k=_query_call.top_k, - exclude_names=existed_doc_names, + exclude_names=[ + doc.metadata["name"] + for doc in query_result.results + if doc.metadata.get("name") + ], ), ) app.add_task( fetch_and_upsert_wiki_docs_task, - name="Task-wiki.documents.fetch_and_upsert-(query_result.query,)", + name=f"Task-wiki.documents.fetch_and_upsert-({query_result.query},)", ) return JsonResponse(asdict(api_model.QueryResponse(results=query_results)))