diff --git a/.env b/.env index be7405d3..b81983d4 100644 --- a/.env +++ b/.env @@ -13,7 +13,7 @@ SUPER_ADMIN_ACCOUNT_NAME=superaccount SECRET_KEY=ba9dc3f976cf8fb40519dcd152a8d7d21c0b7861d841711cdb2602be8e85fd7c ACCESS_TOKEN_EXPIRE_MINUTES=60 -REFRESH_TOKEN_EXPIRE_MINUTES = 120 # 7 days +REFRESH_TOKEN_EXPIRE_MINUTES=120 SMTP_SERVER=smtp.gmail.com SMTP_PORT=587 @@ -22,4 +22,4 @@ SMTP_USERNAME=shresthasaurab030 SMTP_PASSWORD=huurxwxeorxjorzw LDAP_SERVER=ldap://192.168.101.111 -LDAP_ENABLE=True \ No newline at end of file +LDAP_ENABLE=False \ No newline at end of file diff --git a/Dockerfile.external b/Dockerfile.external index 59ef285b..92ed8e69 100644 --- a/Dockerfile.external +++ b/Dockerfile.external @@ -33,6 +33,7 @@ COPY --chown=worker private_gpt/ private_gpt COPY --chown=worker fern/ fern COPY --chown=worker *.yaml *.md ./ COPY --chown=worker scripts/ scripts +RUN poetry run python scripts/setup ENV PYTHONPATH="$PYTHONPATH:/private_gpt/" diff --git a/Dockerfile.local b/Dockerfile.local index 66590fdb..d2a82337 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -1,5 +1,26 @@ -### IMPORTANT, THIS IMAGE CAN ONLY BE RUN IN LINUX DOCKER -### You will run into a segfault in mac +# Use the official CUDA image as the base +FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04 as cuda_base + +# Set noninteractive mode +ENV DEBIAN_FRONTEND noninteractive + +# Install necessary dependencies including CMake and g++ +RUN apt-get update && apt-get install -y \ + libopenblas-dev \ + ninja-build \ + build-essential \ + pkg-config \ + wget \ + make \ + cmake \ + g++ + +# Set the C++ compiler +ENV CMAKE_CXX_COMPILER=g++ +ENV CC=gcc +ENV CXX=g++ + +# Switch to the Python image for the final build stage FROM python:3.11.6-slim-bookworm as base # Install poetry @@ -9,24 +30,30 @@ RUN pipx install poetry ENV PATH="/root/.local/bin:$PATH" ENV PATH=".venv/bin/:$PATH" -# Dependencies to build llama-cpp -RUN apt update && apt install -y \ - libopenblas-dev\ - ninja-build\ - build-essential\ - pkg-config\ - wget +# Copy CUDA dependencies from the CUDA base image +COPY --from=cuda_base /usr/local/cuda /usr/local/cuda + +# Set environment variables for CUDA +ENV PATH="/usr/local/cuda/bin:${PATH}" +ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" # https://python-poetry.org/docs/configuration/#virtualenvsin-project ENV POETRY_VIRTUALENVS_IN_PROJECT=true +# Continue with the rest of your Dockerfile FROM base as dependencies WORKDIR /home/worker/app COPY pyproject.toml poetry.lock ./ +# Install dependencies with CUDA support +ENV CMAKE_ARGS="-DLLAMA_CUBLAS=on" RUN poetry install --with local RUN poetry install --with ui +# Install llama-cpp-python with CUDA support +RUN poetry run pip install --force-reinstall --no-cache-dir llama-cpp-python +RUN poetry run python scripts/setup + FROM base as app ENV PYTHONUNBUFFERED=1 @@ -48,4 +75,4 @@ COPY --chown=worker scripts/ scripts ENV PYTHONPATH="$PYTHONPATH:/private_gpt/" USER worker -ENTRYPOINT python -m private_gpt \ No newline at end of file +ENTRYPOINT python -m private_gpt diff --git a/alembic/env.py b/alembic/env.py index 4a86145e..36d3731b 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -6,7 +6,7 @@ from sqlalchemy import pool from alembic import context from private_gpt.users.db.base_class import Base -from private_gpt.users.core.config import SQLALCHEMY_DATABASE_URI +from private_gpt.users.core.db_config import SQLALCHEMY_DATABASE_URI from private_gpt.users.models.user import User diff --git a/docker-compose.yaml b/docker-compose.yaml index 801d9ecd..56a79d72 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,9 +6,9 @@ services: - ./local_data/:/home/worker/app/local_data - ./models/:/home/worker/app/models ports: - - 8001:8080 + - 8000:8000 environment: - PORT: 8080 + PORT: 8000 PGPT_PROFILES: docker PGPT_MODE: local diff --git a/poetry.lock b/poetry.lock index 5d880768..0fd516b4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2498,6 +2498,99 @@ local-models = ["optimum[onnxruntime] (>=1.13.2,<2.0.0)", "sentencepiece (>=0.1. postgres = ["asyncpg (>=0.28.0,<0.29.0)", "pgvector (>=0.1.0,<0.2.0)", "psycopg-binary (>=3.1.12,<4.0.0)"] query-tools = ["guidance (>=0.0.64,<0.0.65)", "jsonpath-ng (>=1.6.0,<2.0.0)", "lm-format-enforcer (>=0.4.3,<0.5.0)", "rank-bm25 (>=0.2.2,<0.3.0)", "scikit-learn (<1.3.0)", "spacy (>=3.7.1,<4.0.0)"] +[[package]] +name = "lxml" +version = "5.1.0" +description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." +optional = false +python-versions = ">=3.6" +files = [ + {file = "lxml-5.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:704f5572ff473a5f897745abebc6df40f22d4133c1e0a1f124e4f2bd3330ff7e"}, + {file = "lxml-5.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9d3c0f8567ffe7502d969c2c1b809892dc793b5d0665f602aad19895f8d508da"}, + {file = "lxml-5.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5fcfbebdb0c5d8d18b84118842f31965d59ee3e66996ac842e21f957eb76138c"}, + {file = "lxml-5.1.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2f37c6d7106a9d6f0708d4e164b707037b7380fcd0b04c5bd9cae1fb46a856fb"}, + {file = "lxml-5.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2befa20a13f1a75c751f47e00929fb3433d67eb9923c2c0b364de449121f447c"}, + {file = "lxml-5.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22b7ee4c35f374e2c20337a95502057964d7e35b996b1c667b5c65c567d2252a"}, + {file = "lxml-5.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:bf8443781533b8d37b295016a4b53c1494fa9a03573c09ca5104550c138d5c05"}, + {file = "lxml-5.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:82bddf0e72cb2af3cbba7cec1d2fd11fda0de6be8f4492223d4a268713ef2147"}, + {file = "lxml-5.1.0-cp310-cp310-win32.whl", hash = "sha256:b66aa6357b265670bb574f050ffceefb98549c721cf28351b748be1ef9577d93"}, + {file = "lxml-5.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:4946e7f59b7b6a9e27bef34422f645e9a368cb2be11bf1ef3cafc39a1f6ba68d"}, + {file = "lxml-5.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:14deca1460b4b0f6b01f1ddc9557704e8b365f55c63070463f6c18619ebf964f"}, + {file = "lxml-5.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ed8c3d2cd329bf779b7ed38db176738f3f8be637bb395ce9629fc76f78afe3d4"}, + {file = "lxml-5.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:436a943c2900bb98123b06437cdd30580a61340fbdb7b28aaf345a459c19046a"}, + {file = "lxml-5.1.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:acb6b2f96f60f70e7f34efe0c3ea34ca63f19ca63ce90019c6cbca6b676e81fa"}, + {file = "lxml-5.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:af8920ce4a55ff41167ddbc20077f5698c2e710ad3353d32a07d3264f3a2021e"}, + {file = "lxml-5.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cfced4a069003d8913408e10ca8ed092c49a7f6cefee9bb74b6b3e860683b45"}, + {file = "lxml-5.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9e5ac3437746189a9b4121db2a7b86056ac8786b12e88838696899328fc44bb2"}, + {file = "lxml-5.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f4c9bda132ad108b387c33fabfea47866af87f4ea6ffb79418004f0521e63204"}, + {file = "lxml-5.1.0-cp311-cp311-win32.whl", hash = "sha256:bc64d1b1dab08f679fb89c368f4c05693f58a9faf744c4d390d7ed1d8223869b"}, + {file = "lxml-5.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:a5ab722ae5a873d8dcee1f5f45ddd93c34210aed44ff2dc643b5025981908cda"}, + {file = "lxml-5.1.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9aa543980ab1fbf1720969af1d99095a548ea42e00361e727c58a40832439114"}, + {file = "lxml-5.1.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:6f11b77ec0979f7e4dc5ae081325a2946f1fe424148d3945f943ceaede98adb8"}, + {file = "lxml-5.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a36c506e5f8aeb40680491d39ed94670487ce6614b9d27cabe45d94cd5d63e1e"}, + {file = "lxml-5.1.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f643ffd2669ffd4b5a3e9b41c909b72b2a1d5e4915da90a77e119b8d48ce867a"}, + {file = "lxml-5.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16dd953fb719f0ffc5bc067428fc9e88f599e15723a85618c45847c96f11f431"}, + {file = "lxml-5.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:16018f7099245157564d7148165132c70adb272fb5a17c048ba70d9cc542a1a1"}, + {file = "lxml-5.1.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:82cd34f1081ae4ea2ede3d52f71b7be313756e99b4b5f829f89b12da552d3aa3"}, + {file = "lxml-5.1.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:19a1bc898ae9f06bccb7c3e1dfd73897ecbbd2c96afe9095a6026016e5ca97b8"}, + {file = "lxml-5.1.0-cp312-cp312-win32.whl", hash = "sha256:13521a321a25c641b9ea127ef478b580b5ec82aa2e9fc076c86169d161798b01"}, + {file = "lxml-5.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:1ad17c20e3666c035db502c78b86e58ff6b5991906e55bdbef94977700c72623"}, + {file = "lxml-5.1.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:24ef5a4631c0b6cceaf2dbca21687e29725b7c4e171f33a8f8ce23c12558ded1"}, + {file = "lxml-5.1.0-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d2900b7f5318bc7ad8631d3d40190b95ef2aa8cc59473b73b294e4a55e9f30f"}, + {file = "lxml-5.1.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:601f4a75797d7a770daed8b42b97cd1bb1ba18bd51a9382077a6a247a12aa38d"}, + {file = "lxml-5.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4b68c961b5cc402cbd99cca5eb2547e46ce77260eb705f4d117fd9c3f932b95"}, + {file = "lxml-5.1.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:afd825e30f8d1f521713a5669b63657bcfe5980a916c95855060048b88e1adb7"}, + {file = "lxml-5.1.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:262bc5f512a66b527d026518507e78c2f9c2bd9eb5c8aeeb9f0eb43fcb69dc67"}, + {file = "lxml-5.1.0-cp36-cp36m-win32.whl", hash = "sha256:e856c1c7255c739434489ec9c8aa9cdf5179785d10ff20add308b5d673bed5cd"}, + {file = "lxml-5.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:c7257171bb8d4432fe9d6fdde4d55fdbe663a63636a17f7f9aaba9bcb3153ad7"}, + {file = "lxml-5.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b9e240ae0ba96477682aa87899d94ddec1cc7926f9df29b1dd57b39e797d5ab5"}, + {file = "lxml-5.1.0-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a96f02ba1bcd330807fc060ed91d1f7a20853da6dd449e5da4b09bfcc08fdcf5"}, + {file = "lxml-5.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e3898ae2b58eeafedfe99e542a17859017d72d7f6a63de0f04f99c2cb125936"}, + {file = "lxml-5.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61c5a7edbd7c695e54fca029ceb351fc45cd8860119a0f83e48be44e1c464862"}, + {file = "lxml-5.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3aeca824b38ca78d9ee2ab82bd9883083d0492d9d17df065ba3b94e88e4d7ee6"}, + {file = "lxml-5.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8f52fe6859b9db71ee609b0c0a70fea5f1e71c3462ecf144ca800d3f434f0764"}, + {file = "lxml-5.1.0-cp37-cp37m-win32.whl", hash = "sha256:d42e3a3fc18acc88b838efded0e6ec3edf3e328a58c68fbd36a7263a874906c8"}, + {file = "lxml-5.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:eac68f96539b32fce2c9b47eb7c25bb2582bdaf1bbb360d25f564ee9e04c542b"}, + {file = "lxml-5.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ae15347a88cf8af0949a9872b57a320d2605ae069bcdf047677318bc0bba45b1"}, + {file = "lxml-5.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c26aab6ea9c54d3bed716b8851c8bfc40cb249b8e9880e250d1eddde9f709bf5"}, + {file = "lxml-5.1.0-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:342e95bddec3a698ac24378d61996b3ee5ba9acfeb253986002ac53c9a5f6f84"}, + {file = "lxml-5.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:725e171e0b99a66ec8605ac77fa12239dbe061482ac854d25720e2294652eeaa"}, + {file = "lxml-5.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d184e0d5c918cff04cdde9dbdf9600e960161d773666958c9d7b565ccc60c45"}, + {file = "lxml-5.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:98f3f020a2b736566c707c8e034945c02aa94e124c24f77ca097c446f81b01f1"}, + {file = "lxml-5.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6d48fc57e7c1e3df57be5ae8614bab6d4e7b60f65c5457915c26892c41afc59e"}, + {file = "lxml-5.1.0-cp38-cp38-win32.whl", hash = "sha256:7ec465e6549ed97e9f1e5ed51c657c9ede767bc1c11552f7f4d022c4df4a977a"}, + {file = "lxml-5.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:b21b4031b53d25b0858d4e124f2f9131ffc1530431c6d1321805c90da78388d1"}, + {file = "lxml-5.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:52427a7eadc98f9e62cb1368a5079ae826f94f05755d2d567d93ee1bc3ceb354"}, + {file = "lxml-5.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6a2a2c724d97c1eb8cf966b16ca2915566a4904b9aad2ed9a09c748ffe14f969"}, + {file = "lxml-5.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:843b9c835580d52828d8f69ea4302537337a21e6b4f1ec711a52241ba4a824f3"}, + {file = "lxml-5.1.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9b99f564659cfa704a2dd82d0684207b1aadf7d02d33e54845f9fc78e06b7581"}, + {file = "lxml-5.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f8b0c78e7aac24979ef09b7f50da871c2de2def043d468c4b41f512d831e912"}, + {file = "lxml-5.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9bcf86dfc8ff3e992fed847c077bd875d9e0ba2fa25d859c3a0f0f76f07f0c8d"}, + {file = "lxml-5.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:49a9b4af45e8b925e1cd6f3b15bbba2c81e7dba6dce170c677c9cda547411e14"}, + {file = "lxml-5.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:280f3edf15c2a967d923bcfb1f8f15337ad36f93525828b40a0f9d6c2ad24890"}, + {file = "lxml-5.1.0-cp39-cp39-win32.whl", hash = "sha256:ed7326563024b6e91fef6b6c7a1a2ff0a71b97793ac33dbbcf38f6005e51ff6e"}, + {file = "lxml-5.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:8d7b4beebb178e9183138f552238f7e6613162a42164233e2bda00cb3afac58f"}, + {file = "lxml-5.1.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9bd0ae7cc2b85320abd5e0abad5ccee5564ed5f0cc90245d2f9a8ef330a8deae"}, + {file = "lxml-5.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8c1d679df4361408b628f42b26a5d62bd3e9ba7f0c0e7969f925021554755aa"}, + {file = "lxml-5.1.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2ad3a8ce9e8a767131061a22cd28fdffa3cd2dc193f399ff7b81777f3520e372"}, + {file = "lxml-5.1.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:304128394c9c22b6569eba2a6d98392b56fbdfbad58f83ea702530be80d0f9df"}, + {file = "lxml-5.1.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d74fcaf87132ffc0447b3c685a9f862ffb5b43e70ea6beec2fb8057d5d2a1fea"}, + {file = "lxml-5.1.0-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:8cf5877f7ed384dabfdcc37922c3191bf27e55b498fecece9fd5c2c7aaa34c33"}, + {file = "lxml-5.1.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:877efb968c3d7eb2dad540b6cabf2f1d3c0fbf4b2d309a3c141f79c7e0061324"}, + {file = "lxml-5.1.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f14a4fb1c1c402a22e6a341a24c1341b4a3def81b41cd354386dcb795f83897"}, + {file = "lxml-5.1.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:25663d6e99659544ee8fe1b89b1a8c0aaa5e34b103fab124b17fa958c4a324a6"}, + {file = "lxml-5.1.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:8b9f19df998761babaa7f09e6bc169294eefafd6149aaa272081cbddc7ba4ca3"}, + {file = "lxml-5.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e53d7e6a98b64fe54775d23a7c669763451340c3d44ad5e3a3b48a1efbdc96f"}, + {file = "lxml-5.1.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c3cd1fc1dc7c376c54440aeaaa0dcc803d2126732ff5c6b68ccd619f2e64be4f"}, + {file = "lxml-5.1.0.tar.gz", hash = "sha256:3eea6ed6e6c918e468e693c41ef07f3c3acc310b70ddd9cc72d9ef84bc9564ca"}, +] + +[package.extras] +cssselect = ["cssselect (>=0.7)"] +html5 = ["html5lib"] +htmlsoup = ["BeautifulSoup4"] +source = ["Cython (>=3.0.7)"] + [[package]] name = "mako" version = "1.3.2" @@ -4465,6 +4558,45 @@ files = [ plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] +[[package]] +name = "pymupdf" +version = "1.21.1" +description = "Python bindings for the PDF toolkit and renderer MuPDF" +optional = false +python-versions = ">=3.7" +files = [ + {file = "PyMuPDF-1.21.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e334e7baea701d4029faa034520c722c9c55e8315b7ccf4d1b686eba8e293f32"}, + {file = "PyMuPDF-1.21.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19fe49966f3a072a258cdfbab3d8c5b11cb7c2fb7c8e6abf3398d9e55af6f1ca"}, + {file = "PyMuPDF-1.21.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36181c4cb27740791d611d0224dd18ac78e23a1f06aa2151394c5b9194b4f885"}, + {file = "PyMuPDF-1.21.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5273ff0c3bf08428ef956c4a5e5e0b475667cc3e1cb7b41d9f5131636996e59"}, + {file = "PyMuPDF-1.21.1-cp310-cp310-win32.whl", hash = "sha256:7e5a1ed49df5eee7834fb37adb5c94354e98b23fa997e67034b157790a31bbfc"}, + {file = "PyMuPDF-1.21.1-cp310-cp310-win_amd64.whl", hash = "sha256:c040c9ac98b7a1afc06fe55ffedbf6a305c24bf1c97597838f208c68035971f4"}, + {file = "PyMuPDF-1.21.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ac2f61632bcd4c9532a26b52684ca05a4c8b7b96d6be947134b3e01a420904fd"}, + {file = "PyMuPDF-1.21.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:eb29cbfd34d5ef99c657539c4f48953ea15f4b1e4e162b48efcffa5c4101ce1d"}, + {file = "PyMuPDF-1.21.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06860a8e60ba14f25aac5db90803d59b1a2fdac24c2b65dc6f9876ff36df586e"}, + {file = "PyMuPDF-1.21.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff7d01cb563c3ca18880ba6a2661351f07b8a54f6599272be2e3568524e5e721"}, + {file = "PyMuPDF-1.21.1-cp311-cp311-win32.whl", hash = "sha256:1fc4c8aee186326b3f138be8a4ac16a343e76c8ec45b5afab2d105a5e3b02d80"}, + {file = "PyMuPDF-1.21.1-cp311-cp311-win_amd64.whl", hash = "sha256:dab0459791175dea813e6130e08b9026d3b9d66854f0dbb7ab51ab1619875d24"}, + {file = "PyMuPDF-1.21.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2a870f02b2767e9371bbb3d0263c3994f59679a64b1b9dd1a6b0d9a15c963d68"}, + {file = "PyMuPDF-1.21.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f99e6c2109c38c17cd5f1b82c9d35f1e815a71a3464b765f41f3c8cf875dcf4c"}, + {file = "PyMuPDF-1.21.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf204723782ca481cd120e1ab124b0d59fd387103e15675ae462415bfa22b3a2"}, + {file = "PyMuPDF-1.21.1-cp37-cp37m-win32.whl", hash = "sha256:b2b197bb0f00159f4584f51c7bf4d897aa5fb88de3c1f964347047a710c1f1be"}, + {file = "PyMuPDF-1.21.1-cp37-cp37m-win_amd64.whl", hash = "sha256:dddd3fe6fa20b3e2642c10e66c97cfd3727010d3dafe653f16dce52396ef0208"}, + {file = "PyMuPDF-1.21.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c09cbc7924ddf99452bb0d70438d64753815d75526d6d94293249f1665691d84"}, + {file = "PyMuPDF-1.21.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:fdba6bf77d1d3cd57ea93181c494f4b138523000ff74b25c523be7dce0058ac9"}, + {file = "PyMuPDF-1.21.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b08b6afbb656f0e4582a8ee44c2ce0ab6235bb81830ec92d79f6e4893db639c"}, + {file = "PyMuPDF-1.21.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c85efbc08c83c8d91ae1cc7bb7e06c7cd7e203e9d0ed806ff22db173999f30c"}, + {file = "PyMuPDF-1.21.1-cp38-cp38-win32.whl", hash = "sha256:fa0334247549def667d9f5358e558ec93815c78cebdb927a81dda38d681bf550"}, + {file = "PyMuPDF-1.21.1-cp38-cp38-win_amd64.whl", hash = "sha256:d85c360abd72c14e302a2cefd02ebd01568f5c669700c7fc1ed056e9cdf3c285"}, + {file = "PyMuPDF-1.21.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f3ffa9a8c643da39aba80e787d2c1771d5be07b0e15bf193ddd1fda888bbca88"}, + {file = "PyMuPDF-1.21.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18fbdcb35c144b26a3a507bfa73f98401a27819f29dca496eb470b9a1ec09fad"}, + {file = "PyMuPDF-1.21.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bb5f9ce33054ebfbf63c41e68606d51e3ad5d85def0af5ebb6f0dd276e61037"}, + {file = "PyMuPDF-1.21.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbb96336c5cc065f6e5359f034a689e4d64ca7697dc5965b03f105b2ecb7ba1"}, + {file = "PyMuPDF-1.21.1-cp39-cp39-win32.whl", hash = "sha256:909afad284c24f25a831b37e433e444dc4cb5b3e38b3f761b1e4acad5c65327d"}, + {file = "PyMuPDF-1.21.1-cp39-cp39-win_amd64.whl", hash = "sha256:069ba56c28cb9b603d016c63f23a21bf22a00c5b2a92286bf3dd6a2759e119d4"}, + {file = "PyMuPDF-1.21.1.tar.gz", hash = "sha256:f815741a435c62a0036bbcbf5fa6c533567bd69c5338d413714fc57b22db93e0"}, +] + [[package]] name = "pyparsing" version = "3.1.1" @@ -4656,7 +4788,6 @@ langdetect = ">=1.0.9,<2.0.0" matplotlib = ">=3.1.0" mplcursors = ">=0.3" numpy = ">=1.16.0,<2.0.0" -onnx = {version = ">=1.12.0,<3.0.0", optional = true, markers = "extra == \"torch\""} opencv-python = ">=4.5.0,<5.0.0" Pillow = ">=10.0.0" pyclipper = ">=1.2.0,<2.0.0" @@ -4664,8 +4795,6 @@ pypdfium2 = ">=4.0.0,<5.0.0" rapidfuzz = ">=3.0.0,<4.0.0" scipy = ">=1.4.0,<2.0.0" shapely = ">=1.6.0,<3.0.0" -torch = {version = ">=1.12.0,<3.0.0", optional = true, markers = "extra == \"torch\""} -torchvision = {version = ">=0.13.0", optional = true, markers = "extra == \"torch\""} tqdm = ">=4.30.0" unidecode = ">=1.0.0" weasyprint = ">=55.0" @@ -4678,6 +4807,21 @@ testing = ["coverage[toml] (>=4.5.4)", "hdf5storage (>=0.1.18)", "onnxruntime (> tf = ["tensorflow (>=2.11.0,<3.0.0)", "tf2onnx (>=1.15.1,<2.0.0)"] torch = ["onnx (>=1.12.0,<3.0.0)", "torch (>=1.12.0,<3.0.0)", "torchvision (>=0.13.0)"] +[[package]] +name = "python-docx" +version = "1.1.0" +description = "Create, read, and update Microsoft Word .docx files." +optional = false +python-versions = ">=3.7" +files = [ + {file = "python-docx-1.1.0.tar.gz", hash = "sha256:5829b722141cf1ab79aedf0c34d9fe9924b29764584c0f2164eb2b02dcdf17c9"}, + {file = "python_docx-1.1.0-py3-none-any.whl", hash = "sha256:bac9773278098a1ddc43a52d84e22f5909c4a3080a624530b3ecb3771b07c6cd"}, +] + +[package.dependencies] +lxml = ">=3.1.0" +typing-extensions = "*" + [[package]] name = "python-dotenv" version = "1.0.1" @@ -6168,49 +6312,6 @@ typing-extensions = ">=4.8.0" opt-einsum = ["opt-einsum (>=3.3)"] optree = ["optree (>=0.9.1)"] -[[package]] -name = "torchvision" -version = "0.17.0" -description = "image and video datasets and models for torch deep learning" -optional = false -python-versions = ">=3.8" -files = [ - {file = "torchvision-0.17.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:153882cd8ff8e3dbef5c5054fdd15df64e85420546805a90c0b2221f2f119c4a"}, - {file = "torchvision-0.17.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c55c2f86e3f3a21ddd92739a972366244e9b17916e836ec47167b0a0c083c65f"}, - {file = "torchvision-0.17.0-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:605950cdcefe6c5aef85709ade17b1525bcf171e122cce1df09e666d96525b90"}, - {file = "torchvision-0.17.0-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:3d86c212fc6379e9bec3ac647d062e34c2cf36c26b98840b66573eb9fbe1f1d9"}, - {file = "torchvision-0.17.0-cp310-cp310-win_amd64.whl", hash = "sha256:71b314813faf13cecb09a4a635b5e4b274e8df0b1921681038d491c529555bb6"}, - {file = "torchvision-0.17.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:10d276821f115fb369e6cf1f1b77b2cca60cda12cbb39a41513a9d3d0f2a93ae"}, - {file = "torchvision-0.17.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3eef2daddadb5c21e802e0550dd7e3ee3d98c430f4aed212ae3ba0358558be1"}, - {file = "torchvision-0.17.0-cp311-cp311-manylinux1_x86_64.whl", hash = "sha256:acc0d098ab8c295a750f0218bf5bf7bfc2f2c21f9c2fe3fc30b695cd94f4c759"}, - {file = "torchvision-0.17.0-cp311-cp311-manylinux2014_aarch64.whl", hash = "sha256:3d2e9552d72e4037f2db6f7d97989a2e2f95763aa1861963a3faf521bb1610c4"}, - {file = "torchvision-0.17.0-cp311-cp311-win_amd64.whl", hash = "sha256:f8e542cf71e1294fcb5635038eae6702df543dc90706f0836ec80e75efc511fc"}, - {file = "torchvision-0.17.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:816ae1a4506b1cb0f638e1827cae7ab768c731369ab23e86839f177926197143"}, - {file = "torchvision-0.17.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:be39874c239215a39b3c431c7016501f1a45bfbbebf2fe8e11d8339b5ea23bca"}, - {file = "torchvision-0.17.0-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:8fe14d580557aef2c45dd462c069ff936b6507b215c4b496f30973ae8cff917d"}, - {file = "torchvision-0.17.0-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:4608ba3246c45c968ede40e7640e4eed64556210faa154cf1ffccb1cadabe445"}, - {file = "torchvision-0.17.0-cp312-cp312-win_amd64.whl", hash = "sha256:b755d6d3e021239d2408bf3794d0d3dcffbc629f1fd808c43d8b346045a098c4"}, - {file = "torchvision-0.17.0-cp38-cp38-macosx_10_13_x86_64.whl", hash = "sha256:870d7cda57420e44d20eb07bfe37bf5344a06434a7a6195b4c7f3dd55838587d"}, - {file = "torchvision-0.17.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:477f6e64a9d798c0f5adefc300acc220da6f17ef5c1e110d20108f66554fee4d"}, - {file = "torchvision-0.17.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:a54a15bd6f3dbb04ebd36c5a87530b2e090ee4b9b15eb89eda558ab3e50396a0"}, - {file = "torchvision-0.17.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:e041ce3336364413bab051a3966d884bab25c200f98ca8a065f0abe758c3005e"}, - {file = "torchvision-0.17.0-cp38-cp38-win_amd64.whl", hash = "sha256:7887f767670c72aa20f5237042d0ca1462da18f66a3ea8c36b6ba67ce26b82fc"}, - {file = "torchvision-0.17.0-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:b1ced438b81ef662a71c8c81debaf0c80455b35b811ca55a4c3c593d721b560a"}, - {file = "torchvision-0.17.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b53569c52bd4bd1176a1e49d8ea55883bcf57e1614cb97e2e8ce372768299b70"}, - {file = "torchvision-0.17.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:7f373507afcd9022ebd9f50b31da8dbac1ea6783ffb77d1f1ab8806425c0a83b"}, - {file = "torchvision-0.17.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:085251ab36340206dc7e1be59a15fa5e307d45ccd66889f5d7bf1ba5e7ecdc57"}, - {file = "torchvision-0.17.0-cp39-cp39-win_amd64.whl", hash = "sha256:4c0d4c0af58af2752aad235150bd794d0f324e6eeac5cd13c440bda5dce622d3"}, -] - -[package.dependencies] -numpy = "*" -pillow = ">=5.3.0,<8.3.dev0 || >=8.4.dev0" -requests = "*" -torch = "2.2.0" - -[package.extras] -scipy = ["scipy"] - [[package]] name = "tqdm" version = "4.66.2" @@ -7238,4 +7339,4 @@ chroma = ["chromadb"] [metadata] lock-version = "2.0" python-versions = ">=3.11,<3.12" -content-hash = "9e14793e879c9de04c91618b1a54fc93933d10345e69195d6d436dc9492cbc03" +content-hash = "4dd8358c41c65904e3c78a16788586e0e4091768804038743e014ea657105907" diff --git a/private_gpt/users/api/v1/routers/auth.py b/private_gpt/users/api/v1/routers/auth.py index b876299f..12b9a86d 100644 --- a/private_gpt/users/api/v1/routers/auth.py +++ b/private_gpt/users/api/v1/routers/auth.py @@ -1,3 +1,4 @@ +import logging import traceback from typing import Any, Optional from datetime import timedelta, datetime @@ -13,13 +14,12 @@ from private_gpt.users.constants.role import Role from private_gpt.users.core.config import settings from private_gpt.users import crud, models, schemas from private_gpt.users.utils import send_registration_email, Ldap -import logging logger = logging.getLogger(__name__) LDAP_SERVER = settings.LDAP_SERVER -# LDAP_ENABLE = settings.LDAP_ENABLE -LDAP_ENABLE = False +LDAP_ENABLE = settings.LDAP_ENABLE +# LDAP_ENABLE=False router = APIRouter(prefix="/auth", tags=["auth"]) diff --git a/private_gpt/users/core/config.py b/private_gpt/users/core/config.py index 4cc02b24..dca6f9b9 100644 --- a/private_gpt/users/core/config.py +++ b/private_gpt/users/core/config.py @@ -1,16 +1,7 @@ +from typing import Optional from functools import lru_cache -from typing import Any, Dict, Optional - from pydantic_settings import BaseSettings -SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://{username}:{password}@{host}:{port}/{db_name}".format( - host='localhost', - port='5432', - db_name='QuickGpt', - username='postgres', - password="admin", -) - class Settings(BaseSettings): PROJECT_NAME: str = "AUTHENTICATION AND AUTHORIZATION" API_V1_STR: str = "/v1" @@ -38,11 +29,7 @@ class Settings(BaseSettings): SMTP_PASSWORD: str LDAP_SERVER: str - LDAP_ENABLE: str - - @property - def SQLALCHEMY_DATABASE_URI(self) -> str: - return f"postgresql+psycopg2://{self.DB_USER}:{self.DB_PASSWORD}@{self.DB_HOST}:{self.DB_PORT}/{self.DB_NAME}" + LDAP_ENABLE: bool class Config: case_sensitive = True diff --git a/private_gpt/users/core/db_config.py b/private_gpt/users/core/db_config.py new file mode 100644 index 00000000..b6ee4683 --- /dev/null +++ b/private_gpt/users/core/db_config.py @@ -0,0 +1,9 @@ +from private_gpt.users.core.config import settings + +SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://{username}:{password}@{host}:{port}/{db_name}".format( + host=settings.DB_HOST, + port=settings.DB_PORT, + db_name=settings.DB_NAME, + username=settings.DB_USER, + password=settings.DB_PASSWORD, +) \ No newline at end of file diff --git a/private_gpt/users/db/base.py b/private_gpt/users/db/base.py index 2ea1cc44..a1563208 100644 --- a/private_gpt/users/db/base.py +++ b/private_gpt/users/db/base.py @@ -2,3 +2,8 @@ from private_gpt.users.db.base_class import Base from private_gpt.users.models.user import User from private_gpt.users.models.role import Role from private_gpt.users.models.user_role import UserRole +from private_gpt.users.models.audit import Audit +from private_gpt.users.models.company import Company +from private_gpt.users.models.department import Department +from private_gpt.users.models.subscription import Subscription + diff --git a/private_gpt/users/db/session.py b/private_gpt/users/db/session.py index 383da320..f2674dbb 100644 --- a/private_gpt/users/db/session.py +++ b/private_gpt/users/db/session.py @@ -1,4 +1,4 @@ -from private_gpt.users.core.config import SQLALCHEMY_DATABASE_URI +from private_gpt.users.core.db_config import SQLALCHEMY_DATABASE_URI from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker import logging diff --git a/pyproject.toml b/pyproject.toml index bd3ed175..90844e32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,9 @@ docx2txt = "^0.8" gradio = "^4.18.0" ldap3 = "^2.9.1" uvicorn = "^0.27.1" -python-doctr = {extras = ["torch"], version = "^0.7.0"} +python-doctr = "0.7.0" +pymupdf = "1.21.1" +python-docx = "1.1.0" [tool.poetry.group.dev.dependencies] black = "^22" diff --git a/requirements.txt b/requirements.txt index 0dfecdcf..18122a16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,177 +1,201 @@ -accelerate==0.25.0 -aiofiles==23.2.1 -aiohttp==3.9.1 -aiosignal==1.3.1 -aiostream==0.5.2 -alembic==1.13.1 -altair==5.2.0 -annotated-types==0.6.0 -anyio==3.7.1 -argcomplete==3.2.2 -attrs==23.1.0 -bcrypt==4.1.2 -beautifulsoup4==4.12.2 -black==22.12.0 -boto3==1.34.2 -botocore==1.34.2 -certifi==2023.11.17 -cfgv==3.4.0 -charset-normalizer==3.3.2 -click==8.1.7 -colorama==0.4.6 -coloredlogs==15.0.1 -contourpy==1.2.0 -coverage==7.3.3 -cycler==0.12.1 -dataclasses-json==0.5.14 -datasets==2.14.4 -Deprecated==1.2.14 -dill==0.3.7 -diskcache==5.6.3 -distlib==0.3.8 -distro==1.8.0 -dnspython==2.4.2 -ecdsa==0.18.0 -email-validator==2.1.0.post1 -evaluate==0.4.1 -fastapi==0.103.2 -ffmpy==0.3.1 -filelock==3.13.1 -flatbuffers==23.5.26 -fonttools==4.46.0 -frozenlist==1.4.1 -fsspec==2023.12.2 -gradio==4.10.0 -gradio_client==0.7.3 -greenlet==3.0.2 -grpcio==1.60.0 -grpcio-tools==1.60.0 -h11==0.14.0 -h2==4.1.0 -hpack==4.0.0 -httpcore==1.0.2 -httptools==0.6.1 -httpx==0.25.2 -huggingface-hub==0.19.4 -humanfriendly==10.0 -hyperframe==6.0.1 -identify==2.5.33 -idna==3.6 -importlib-resources==6.1.1 -inflect==7.0.0 -iniconfig==2.0.0 -injector==0.21.0 -itsdangerous==2.1.2 -Jinja2==3.1.3 -jmespath==1.0.1 -joblib==1.3.2 -jsonschema==4.20.0 -jsonschema-specifications==2023.11.2 -kiwisolver==1.4.5 -llama-index==0.9.3 -llama_cpp_python==0.2.35 -Mako==1.3.0 -markdown-it-py==3.0.0 -MarkupSafe==2.1.4 -marshmallow==3.20.1 -matplotlib==3.8.2 -mdurl==0.1.2 -mpmath==1.3.0 -multidict==6.0.4 -multiprocess==0.70.15 -mypy==1.7.1 -mypy-extensions==1.0.0 -nest-asyncio==1.5.8 -networkx==3.2.1 -nltk==3.8.1 -nodeenv==1.8.0 -numpy==1.26.3 -onnx==1.15.0 -onnxruntime==1.16.3 -openai==1.5.0 -optimum==1.16.1 -orjson==3.9.10 -packaging==23.2 -pandas==2.1.4 -passlib==1.7.4 -pathspec==0.12.1 -Pillow==10.1.0 -pipx==1.4.3 -platformdirs==4.1.0 -pluggy==1.3.0 -portalocker==2.8.2 -pre-commit==2.21.0 --e git+https://github.com/QuickfoxConsulting/privateGPT.git@2108d6d1ec260e788a28b1e0ce32314425cfbd08#egg=private_gpt -protobuf==4.25.1 -psutil==5.9.6 -psycopg2-binary==2.9.9 -pyarrow==14.0.1 -pyasn1==0.5.1 -pydantic==2.5.2 -pydantic-extra-types==2.2.0 -pydantic-settings==2.1.0 -pydantic_core==2.14.5 -pydub==0.25.1 -Pygments==2.17.2 -pyparsing==3.1.1 -pypdf==3.17.2 -pyreadline3==3.4.1 -pytest==7.4.3 -pytest-asyncio==0.21.1 -pytest-cov==3.0.0 -python-dateutil==2.8.2 -python-dotenv==1.0.0 -python-jose==3.3.0 -python-multipart==0.0.6 -pytz==2023.3.post1 -pywin32==306 -PyYAML==6.0.1 -qdrant-client==1.7.0 -referencing==0.32.0 -regex==2023.10.3 -requests==2.31.0 -responses==0.18.0 -rich==13.7.0 -rpds-py==0.14.1 -rsa==4.9 -ruff==0.1.8 -s3transfer==0.9.0 -safetensors==0.4.1 -scikit-learn==1.3.2 -scipy==1.11.4 -semantic-version==2.10.0 -sentence-transformers==2.2.2 -sentencepiece==0.1.99 -shellingham==1.5.4 -six==1.16.0 -sniffio==1.3.0 -soupsieve==2.5 -SQLAlchemy==2.0.23 -starlette==0.27.0 -sympy==1.12 -tenacity==8.2.3 -threadpoolctl==3.2.0 -tiktoken==0.5.2 -tokenizers==0.15.0 -tomlkit==0.12.0 -toolz==0.12.0 -torch==2.1.2 -torchvision==0.16.2 -tqdm==4.66.1 -transformers==4.36.1 -typer==0.9.0 -types-PyYAML==6.0.12.12 -typing-inspect==0.9.0 -typing_extensions==4.9.0 -tzdata==2023.3 -ujson==5.9.0 -urllib3==1.26.18 -userpath==1.9.1 -uvicorn==0.24.0.post1 -virtualenv==20.25.0 -watchdog==3.0.0 -watchfiles==0.21.0 -websockets==11.0.3 -wrapt==1.16.0 -xxhash==3.4.1 -yarl==1.9.4 +accelerate==0.27.2 ; python_version >= "3.11" and python_version < "3.12" +aiofiles==23.2.1 ; python_version >= "3.11" and python_version < "3.12" +aiohttp==3.9.3 ; python_version >= "3.11" and python_version < "3.12" +aiosignal==1.3.1 ; python_version >= "3.11" and python_version < "3.12" +aiostream==0.5.2 ; python_version >= "3.11" and python_version < "3.12" +alembic==1.13.1 ; python_version >= "3.11" and python_version < "3.12" +altair==5.2.0 ; python_version >= "3.11" and python_version < "3.12" +annotated-types==0.6.0 ; python_version >= "3.11" and python_version < "3.12" +anyio==3.7.1 ; python_version >= "3.11" and python_version < "3.12" +attrs==23.2.0 ; python_version >= "3.11" and python_version < "3.12" +bcrypt==4.0.1 ; python_version >= "3.11" and python_version < "3.12" +beautifulsoup4==4.12.3 ; python_version >= "3.11" and python_version < "3.12" +boto3==1.34.42 ; python_version >= "3.11" and python_version < "3.12" +botocore==1.34.42 ; python_version >= "3.11" and python_version < "3.12" +brotli==1.1.0 ; platform_python_implementation == "CPython" and python_version >= "3.11" and python_version < "3.12" +brotlicffi==1.1.0.0 ; platform_python_implementation != "CPython" and python_version >= "3.11" and python_version < "3.12" +certifi==2024.2.2 ; python_version >= "3.11" and python_version < "3.12" +cffi==1.16.0 ; python_version >= "3.11" and python_version < "3.12" +charset-normalizer==3.3.2 ; python_version >= "3.11" and python_version < "3.12" +click==8.1.7 ; python_version >= "3.11" and python_version < "3.12" +colorama==0.4.6 ; python_version >= "3.11" and python_version < "3.12" +coloredlogs==15.0.1 ; python_version >= "3.11" and python_version < "3.12" +contourpy==1.2.0 ; python_version >= "3.11" and python_version < "3.12" +cssselect2==0.7.0 ; python_version >= "3.11" and python_version < "3.12" +cycler==0.12.1 ; python_version >= "3.11" and python_version < "3.12" +dataclasses-json==0.5.14 ; python_version >= "3.11" and python_version < "3.12" +datasets==2.14.4 ; python_version >= "3.11" and python_version < "3.12" +defusedxml==0.7.1 ; python_version >= "3.11" and python_version < "3.12" +deprecated==1.2.14 ; python_version >= "3.11" and python_version < "3.12" +dill==0.3.7 ; python_version >= "3.11" and python_version < "3.12" +distro==1.9.0 ; python_version >= "3.11" and python_version < "3.12" +dnspython==2.5.0 ; python_version >= "3.11" and python_version < "3.12" +docx2txt==0.8 ; python_version >= "3.11" and python_version < "3.12" +ecdsa==0.18.0 ; python_version >= "3.11" and python_version < "3.12" +email-validator==2.1.0.post1 ; python_version >= "3.11" and python_version < "3.12" +evaluate==0.4.1 ; python_version >= "3.11" and python_version < "3.12" +fastapi==0.103.2 ; python_version >= "3.11" and python_version < "3.12" +fastapi[all]==0.103.2 ; python_version >= "3.11" and python_version < "3.12" +ffmpy==0.3.2 ; python_version >= "3.11" and python_version < "3.12" +filelock==3.13.1 ; python_version >= "3.11" and python_version < "3.12" +flatbuffers==23.5.26 ; python_version >= "3.11" and python_version < "3.12" +fonttools==4.48.1 ; python_version >= "3.11" and python_version < "3.12" +fonttools[woff]==4.48.1 ; python_version >= "3.11" and python_version < "3.12" +frozenlist==1.4.1 ; python_version >= "3.11" and python_version < "3.12" +fsspec==2024.2.0 ; python_version >= "3.11" and python_version < "3.12" +fsspec[http]==2024.2.0 ; python_version >= "3.11" and python_version < "3.12" +gradio-client==0.10.0 ; python_version >= "3.11" and python_version < "3.12" +gradio==4.19.0 ; python_version >= "3.11" and python_version < "3.12" +greenlet==3.0.3 ; python_version >= "3.11" and python_version < "3.12" +grpcio-tools==1.60.1 ; python_version >= "3.11" and python_version < "3.12" +grpcio==1.60.1 ; python_version >= "3.11" and python_version < "3.12" +h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12" +h2==4.1.0 ; python_version >= "3.11" and python_version < "3.12" +h5py==3.10.0 ; python_version >= "3.11" and python_version < "3.12" +hpack==4.0.0 ; python_version >= "3.11" and python_version < "3.12" +html5lib==1.1 ; python_version >= "3.11" and python_version < "3.12" +httpcore==1.0.3 ; python_version >= "3.11" and python_version < "3.12" +httptools==0.6.1 ; python_version >= "3.11" and python_version < "3.12" +httpx==0.26.0 ; python_version >= "3.11" and python_version < "3.12" +httpx[http2]==0.26.0 ; python_version >= "3.11" and python_version < "3.12" +huggingface-hub==0.20.3 ; python_version >= "3.11" and python_version < "3.12" +humanfriendly==10.0 ; python_version >= "3.11" and python_version < "3.12" +hyperframe==6.0.1 ; python_version >= "3.11" and python_version < "3.12" +idna==3.6 ; python_version >= "3.11" and python_version < "3.12" +importlib-metadata==6.11.0 ; python_version >= "3.11" and python_version < "3.12" +importlib-resources==6.1.1 ; python_version >= "3.11" and python_version < "3.12" +inflect==7.0.0 ; python_version >= "3.11" and python_version < "3.12" +injector==0.21.0 ; python_version >= "3.11" and python_version < "3.12" +itsdangerous==2.1.2 ; python_version >= "3.11" and python_version < "3.12" +jinja2==3.1.3 ; python_version >= "3.11" and python_version < "3.12" +jmespath==1.0.1 ; python_version >= "3.11" and python_version < "3.12" +joblib==1.3.2 ; python_version >= "3.11" and python_version < "3.12" +jsonschema-specifications==2023.12.1 ; python_version >= "3.11" and python_version < "3.12" +jsonschema==4.21.1 ; python_version >= "3.11" and python_version < "3.12" +kiwisolver==1.4.5 ; python_version >= "3.11" and python_version < "3.12" +langdetect==1.0.9 ; python_version >= "3.11" and python_version < "3.12" +ldap3==2.9.1 ; python_version >= "3.11" and python_version < "3.12" +llama-index[local-models]==0.9.3 ; python_version >= "3.11" and python_version < "3.12" +mako==1.3.2 ; python_version >= "3.11" and python_version < "3.12" +markdown-it-py==3.0.0 ; python_version >= "3.11" and python_version < "3.12" +markupsafe==2.1.5 ; python_version >= "3.11" and python_version < "3.12" +marshmallow==3.20.2 ; python_version >= "3.11" and python_version < "3.12" +matplotlib==3.8.3 ; python_version >= "3.11" and python_version < "3.12" +mdurl==0.1.2 ; python_version >= "3.11" and python_version < "3.12" +mplcursors==0.5.3 ; python_version >= "3.11" and python_version < "3.12" +mpmath==1.3.0 ; python_version >= "3.11" and python_version < "3.12" +multidict==6.0.5 ; python_version >= "3.11" and python_version < "3.12" +multiprocess==0.70.15 ; python_version >= "3.11" and python_version < "3.12" +mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "3.12" +nest-asyncio==1.6.0 ; python_version >= "3.11" and python_version < "3.12" +networkx==3.2.1 ; python_version >= "3.11" and python_version < "3.12" +nltk==3.8.1 ; python_version >= "3.11" and python_version < "3.12" +numpy==1.26.0 ; python_version >= "3.11" and python_version < "3.12" +nvidia-cublas-cu12==12.1.3.1 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cuda-cupti-cu12==12.1.105 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cuda-nvrtc-cu12==12.1.105 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cuda-runtime-cu12==12.1.105 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cudnn-cu12==8.9.2.26 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cufft-cu12==11.0.2.54 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-curand-cu12==10.3.2.106 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cusolver-cu12==11.4.5.107 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-cusparse-cu12==12.1.0.106 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-nccl-cu12==2.19.3 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-nvjitlink-cu12==12.3.101 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +nvidia-nvtx-cu12==12.1.105 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +onnx==1.15.0 ; python_version >= "3.11" and python_version < "3.12" +onnxruntime==1.17.0 ; python_version >= "3.11" and python_version < "3.12" +openai==1.12.0 ; python_version >= "3.11" and python_version < "3.12" +opencv-python==4.9.0.80 ; python_version >= "3.11" and python_version < "3.12" +optimum[onnxruntime]==1.16.2 ; python_version >= "3.11" and python_version < "3.12" +orjson==3.9.14 ; python_version >= "3.11" and python_version < "3.12" +packaging==23.2 ; python_version >= "3.11" and python_version < "3.12" +pandas==2.2.0 ; python_version >= "3.11" and python_version < "3.12" +pandas[jinja2]==2.2.0 ; python_version >= "3.11" and python_version < "3.12" +passlib==1.7.4 ; python_version >= "3.11" and python_version < "3.12" +pillow==10.2.0 ; python_version >= "3.11" and python_version < "3.12" +portalocker==2.8.2 ; python_version >= "3.11" and python_version < "3.12" +protobuf==4.25.2 ; python_version >= "3.11" and python_version < "3.12" +psutil==5.9.8 ; python_version >= "3.11" and python_version < "3.12" +psycopg2-binary==2.9.9 ; python_version >= "3.11" and python_version < "3.12" +pyarrow==15.0.0 ; python_version >= "3.11" and python_version < "3.12" +pyasn1==0.5.1 ; python_version >= "3.11" and python_version < "3.12" +pyclipper==1.3.0.post5 ; python_version >= "3.11" and python_version < "3.12" +pycparser==2.21 ; python_version >= "3.11" and python_version < "3.12" +pydantic-core==2.16.2 ; python_version >= "3.11" and python_version < "3.12" +pydantic-extra-types==2.5.0 ; python_version >= "3.11" and python_version < "3.12" +pydantic-settings==2.1.0 ; python_version >= "3.11" and python_version < "3.12" +pydantic==2.6.1 ; python_version >= "3.11" and python_version < "3.12" +pydub==0.25.1 ; python_version >= "3.11" and python_version < "3.12" +pydyf==0.8.0 ; python_version >= "3.11" and python_version < "3.12" +pygments==2.17.2 ; python_version >= "3.11" and python_version < "3.12" +pyparsing==3.1.1 ; python_version >= "3.11" and python_version < "3.12" +pypdf==3.17.4 ; python_version >= "3.11" and python_version < "3.12" +pypdfium2==4.27.0 ; python_version >= "3.11" and python_version < "3.12" +pyphen==0.14.0 ; python_version >= "3.11" and python_version < "3.12" +pyreadline3==3.4.1 ; sys_platform == "win32" and python_version >= "3.11" and python_version < "3.12" +python-dateutil==2.8.2 ; python_version >= "3.11" and python_version < "3.12" +python-doctr[torch]==0.7.0 ; python_version >= "3.11" and python_version < "3.12" +python-dotenv==1.0.1 ; python_version >= "3.11" and python_version < "3.12" +python-jose==3.3.0 ; python_version >= "3.11" and python_version < "3.12" +python-multipart==0.0.6 ; python_version >= "3.11" and python_version < "3.12" +pytz==2024.1 ; python_version >= "3.11" and python_version < "3.12" +pywin32==306 ; python_version >= "3.11" and python_version < "3.12" and platform_system == "Windows" +pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "3.12" +qdrant-client==1.7.3 ; python_version >= "3.11" and python_version < "3.12" +rapidfuzz==3.6.1 ; python_version >= "3.11" and python_version < "3.12" +referencing==0.33.0 ; python_version >= "3.11" and python_version < "3.12" +regex==2023.12.25 ; python_version >= "3.11" and python_version < "3.12" +requests==2.31.0 ; python_version >= "3.11" and python_version < "3.12" +responses==0.18.0 ; python_version >= "3.11" and python_version < "3.12" +rich==13.7.0 ; python_version >= "3.11" and python_version < "3.12" +rpds-py==0.18.0 ; python_version >= "3.11" and python_version < "3.12" +rsa==4.9 ; python_version >= "3.11" and python_version < "3.12" +ruff==0.2.1 ; python_version >= "3.11" and python_version < "3.12" +s3transfer==0.10.0 ; python_version >= "3.11" and python_version < "3.12" +safetensors==0.4.2 ; python_version >= "3.11" and python_version < "3.12" +scipy==1.12.0 ; python_version >= "3.11" and python_version < "3.12" +semantic-version==2.10.0 ; python_version >= "3.11" and python_version < "3.12" +sentencepiece==0.1.99 ; python_version >= "3.11" and python_version < "3.12" +setuptools==69.1.0 ; python_version >= "3.11" and python_version < "3.12" +shapely==2.0.2 ; python_version >= "3.11" and python_version < "3.12" +shellingham==1.5.4 ; python_version >= "3.11" and python_version < "3.12" +six==1.16.0 ; python_version >= "3.11" and python_version < "3.12" +sniffio==1.3.0 ; python_version >= "3.11" and python_version < "3.12" +soupsieve==2.5 ; python_version >= "3.11" and python_version < "3.12" +sqlalchemy==2.0.27 ; python_version >= "3.11" and python_version < "3.12" +sqlalchemy[asyncio]==2.0.27 ; python_version >= "3.11" and python_version < "3.12" +starlette==0.27.0 ; python_version >= "3.11" and python_version < "3.12" +sympy==1.12 ; python_version >= "3.11" and python_version < "3.12" +tenacity==8.2.3 ; python_version >= "3.11" and python_version < "3.12" +tiktoken==0.6.0 ; python_version >= "3.11" and python_version < "3.12" +tinycss2==1.2.1 ; python_version >= "3.11" and python_version < "3.12" +tokenizers==0.15.2 ; python_version >= "3.11" and python_version < "3.12" +tomlkit==0.12.0 ; python_version >= "3.11" and python_version < "3.12" +toolz==0.12.1 ; python_version >= "3.11" and python_version < "3.12" +torch==2.2.0 ; python_version >= "3.11" and python_version < "3.12" +torchvision==0.17.0 ; python_version >= "3.11" and python_version < "3.12" +tqdm==4.66.2 ; python_version >= "3.11" and python_version < "3.12" +transformers[sentencepiece]==4.37.2 ; python_version >= "3.11" and python_version < "3.12" +transformers[torch]==4.37.2 ; python_version >= "3.11" and python_version < "3.12" +triton==2.2.0 ; platform_system == "Linux" and platform_machine == "x86_64" and python_version >= "3.11" and python_version < "3.12" +typer[all]==0.9.0 ; python_version >= "3.11" and python_version < "3.12" +typing-extensions==4.9.0 ; python_version >= "3.11" and python_version < "3.12" +typing-inspect==0.9.0 ; python_version >= "3.11" and python_version < "3.12" +tzdata==2024.1 ; python_version >= "3.11" and python_version < "3.12" +ujson==5.9.0 ; python_version >= "3.11" and python_version < "3.12" +unidecode==1.3.8 ; python_version >= "3.11" and python_version < "3.12" +urllib3==1.26.18 ; python_version >= "3.11" and python_version < "3.12" +uvicorn==0.27.1 ; python_version >= "3.11" and python_version < "3.12" +uvicorn[standard]==0.27.1 ; python_version >= "3.11" and python_version < "3.12" +uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.11" and python_version < "3.12" +watchdog==3.0.0 ; python_version >= "3.11" and python_version < "3.12" +watchfiles==0.21.0 ; python_version >= "3.11" and python_version < "3.12" +weasyprint==61.0 ; python_version >= "3.11" and python_version < "3.12" +webencodings==0.5.1 ; python_version >= "3.11" and python_version < "3.12" +websockets==11.0.3 ; python_version >= "3.11" and python_version < "3.12" +wrapt==1.16.0 ; python_version >= "3.11" and python_version < "3.12" +xxhash==3.4.1 ; python_version >= "3.11" and python_version < "3.12" +yarl==1.9.4 ; python_version >= "3.11" and python_version < "3.12" +zipp==3.17.0 ; python_version >= "3.11" and python_version < "3.12" +zopfli==0.2.3 ; python_version >= "3.11" and python_version < "3.12"