diff --git a/server/pyproject.toml b/server/pyproject.toml index 79f0f25f..6db26bca 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -2,7 +2,7 @@ name = "earlent-server" version = "1.1.3" description = "An application meant to help students and professionals with stress and anxiety." -authors = ["Dhrumil Patel ", "Anthony Santana "] +authors = ["Dhrumil Patel "] readme = "README.md" [tool.poetry.dependencies] @@ -14,13 +14,17 @@ annotated-types = "0.7.0" anyio = "4.4.0" asttokens = "2.4.1" attrs = "23.2.0" +azure-ai-textanalytics = "5.3.0" azure-cognitiveservices-speech = "1.40.0" +azure-common = "1.1.28" azure-core = "1.30.2" azure-cosmos = "4.7.0" beautifulsoup4 = "4.12.3" billiard = "4.2.0" blinker = "1.8.2" +blis = "0.7.11" cachetools = "5.5.0" +catalogue = "2.0.10" celery = "5.4.0" certifi = "2024.2.2" cffi = "1.17.0" @@ -29,16 +33,22 @@ click = "8.1.7" click-didyoumean = "0.3.1" click-plugins = "1.1.1" click-repl = "0.3.0" +cloudpathlib = "0.19.0" colorama = "0.4.6" +confection = "0.1.5" cryptography = "43.0.0" +cymem = "2.0.8" dataclasses-json = "0.6.6" debugpy = "1.8.1" decorator = "5.1.1" distro = "1.9.0" dnspython = "2.6.1" email_validator = "2.1.1" +# Corrected dependency specification +"en-core-web-sm" = { url = "https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1-py3-none-any.whl", hash = "sha256:86cc141f63942d4b2c5fcee06630fd6f904788d2f0ab005cce45aadb8fb73889" } exceptiongroup = "1.2.0" executing = "2.0.1" +faiss-cpu = "1.8.0.post1" Flask = "3.0.3" Flask-Cors = "5.0.0" Flask-JSON = "0.4.0" @@ -63,30 +73,38 @@ httpx = "0.27.0" idna = "3.7" importlib_metadata = "7.1.0" iniconfig = "2.0.0" +isodate = "0.6.1" itsdangerous = "2.2.0" jedi = "0.19.1" Jinja2 = "3.1.4" +jiter = "0.5.0" jsonpatch = "1.33" jsonpointer = "2.4" kombu = "5.4.0" langchain = "0.2.16" -langchain-community = "0.2.16" -langchain-core = "0.2.38" +langchain-community = "0.2.17" +langchain-core = "0.2.40" langchain-google-community = "1.0.8" langchain-mongodb = "0.1.6" -langchain-openai = "0.1.8" +langchain-openai = "0.1.23" langchain-text-splitters = "0.2.0" -langsmith = "0.1.106" +langcodes = "3.4.0" +langsmith = "0.1.120" +language_data = "1.2.0" +marisa-trie = "1.2.0" +markdown-it-py = "3.0.0" MarkupSafe = "2.1.5" marshmallow = "3.21.2" matplotlib-inline = "0.1.7" +mdurl = "0.1.2" mongomock = "4.1.2" motor = "3.5.1" multidict = "6.0.5" +murmurhash = "1.0.10" mypy-extensions = "1.0.0" nest-asyncio = "1.6.0" numpy = "1.26.4" -openai = "1.31.0" +openai = "1.44.1" orjson = "3.10.3" packaging = "23.2" parso = "0.8.4" @@ -94,6 +112,7 @@ pexpect = "4.9.0" pickleshare = "0.7.5" platformdirs = "4.2.2" pluggy = "1.5.0" +preshed = "3.0.9" prompt_toolkit = "3.0.46" proto-plus = "1.24.0" protobuf = "5.28.0" @@ -104,7 +123,7 @@ py-vapid = "1.9.1" pyasn1 = "0.6.0" pyasn1_modules = "0.4.0" pycparser = "2.22" -pydantic = {extras = ["email"], version = "2.8.2"} +pydantic = { version = "2.8.2", extras = ["email"] } pydantic_core = "2.20.1" Pygments = "2.18.0" PyJWT = "2.8.0" @@ -118,41 +137,50 @@ pyzmq = "26.0.3" redis = "5.0.8" regex = "2024.5.15" requests = "2.32.3" +rich = "13.8.1" rsa = "4.9" +schedule = "1.2.2" sentinels = "1.0.0" +setuptools = "74.0.0" +shellingham = "1.5.4" six = "1.16.0" +smart-open = "7.0.4" sniffio = "1.3.1" soupsieve = "2.6" +spacy = "3.7.6" +spacy-legacy = "3.0.12" +spacy-loggers = "1.0.5" SQLAlchemy = "2.0.30" +srsly = "2.4.8" stack-data = "0.6.2" tavily-python = "0.3.3" tenacity = "8.3.0" +thinc = "8.2.5" tiktoken = "0.7.0" tornado = "6.4" tqdm = "4.66.4" traitlets = "5.14.3" +typer = "0.12.5" typing-inspect = "0.9.0" -typing_extensions = "4.12.2" +typing_extensions = "4.12.1" tzdata = "2024.1" uritemplate = "4.1.1" urllib3 = "2.2.1" vine = "5.1.0" +wasabi = "1.1.3" wcwidth = "0.2.13" +weasel = "0.4.1" Werkzeug = "3.0.3" wikipedia = "1.4.0" +wrapt = "1.16.0" yarl = "1.9.4" youtube-search = "2.1.2" zipp = "3.17.0" [tool.poetry.group.dev.dependencies] -langsmith = "0.1.106" -flask-sqlalchemy = "3.1.1" -schedule = "1.2.2" -pywebpush = "2.0.0" pytest = "8.2.1" pytest-env = "1.1.3" -pytest-timeout = "2.3.1" -setuptools = "74.0.0" +pywebpush = "2.0.0" [tool.pytest.ini_options] env = [ @@ -164,4 +192,4 @@ env = [ [build-system] requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" \ No newline at end of file +build-backend = "poetry.core.masonry.api" diff --git a/server/requirements.txt b/server/requirements.txt index bc5c451f..788d7e77 100644 Binary files a/server/requirements.txt and b/server/requirements.txt differ diff --git a/server/routes/user.py b/server/routes/user.py index a04ba7ac..3c974233 100644 --- a/server/routes/user.py +++ b/server/routes/user.py @@ -66,7 +66,7 @@ def signup(): if result: logging.info("User registration successful") user_id = result.inserted_id - access_token = create_access_token(identity=str(user_id), expires_delta=timedelta(hours=48)) + access_token = create_access_token(identity=str(user_id), expires_delta=timedelta(hours=72)) # Create UserJourney entry with the previously extracted concerns user_journey_data = { @@ -115,7 +115,7 @@ def login(): user = UserModel.find_by_username(username) # You need to implement this method in your User model if user and check_password_hash(user.password, password): - access_token = create_access_token(identity=str(user.id), expires_delta=timedelta(hours=24)) + access_token = create_access_token(identity=str(user.id), expires_delta=timedelta(hours=72)) return jsonify(access_token=access_token, userId=str(user.id)), 200 else: return jsonify({"msg": "Bad username or password"}), 401