From 3b0c22e4151dc0e6e704cebb901be6f994279ff9 Mon Sep 17 00:00:00 2001 From: Prasanjeet-Microsoft Date: Mon, 14 Oct 2024 12:52:49 +0530 Subject: [PATCH 1/6] feat: Implemented functionality to enable multilingual filename uploads in the Admin App. (#1404) --- code/backend/pages/01_Ingest_Data.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/backend/pages/01_Ingest_Data.py b/code/backend/pages/01_Ingest_Data.py index 7e7f76960..8f572a719 100644 --- a/code/backend/pages/01_Ingest_Data.py +++ b/code/backend/pages/01_Ingest_Data.py @@ -1,4 +1,5 @@ from os import path +import re import streamlit as st import traceback import requests @@ -56,6 +57,11 @@ def add_urls(): add_url_embeddings(urls) +def sanitize_metadata_value(value): + # Remove invalid characters + return re.sub(r"[^a-zA-Z0-9-_ .]", "?", value) + + def add_url_embeddings(urls: list[str]): params = {} if env_helper.FUNCTION_KEY is not None: @@ -89,7 +95,7 @@ def add_url_embeddings(urls: list[str]): for up in uploaded_files: # To read file as bytes: bytes_data = up.getvalue() - title = up.name.encode("latin-1", "replace").decode("latin-1") + title = sanitize_metadata_value(up.name) if st.session_state.get("filename", "") != up.name: # Upload a new file st.session_state["filename"] = up.name From 5e3a0295ec076897041a519fbae17b533d4d7ab4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:39:53 +0100 Subject: [PATCH 2/6] build: bump black from 24.8.0 to 24.10.0 (#1416) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 52 +++++++++++++++++++++++++------------------------- pyproject.toml | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4439ed88f..f7e00db3f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -761,33 +761,33 @@ lxml = ["lxml"] [[package]] name = "black" -version = "24.8.0" +version = "24.10.0" description = "The uncompromising code formatter." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "black-24.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:09cdeb74d494ec023ded657f7092ba518e8cf78fa8386155e4a03fdcc44679e6"}, - {file = "black-24.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:81c6742da39f33b08e791da38410f32e27d632260e599df7245cccee2064afeb"}, - {file = "black-24.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:707a1ca89221bc8a1a64fb5e15ef39cd755633daa672a9db7498d1c19de66a42"}, - {file = "black-24.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:d6417535d99c37cee4091a2f24eb2b6d5ec42b144d50f1f2e436d9fe1916fe1a"}, - {file = "black-24.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fb6e2c0b86bbd43dee042e48059c9ad7830abd5c94b0bc518c0eeec57c3eddc1"}, - {file = "black-24.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:837fd281f1908d0076844bc2b801ad2d369c78c45cf800cad7b61686051041af"}, - {file = "black-24.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62e8730977f0b77998029da7971fa896ceefa2c4c4933fcd593fa599ecbf97a4"}, - {file = "black-24.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:72901b4913cbac8972ad911dc4098d5753704d1f3c56e44ae8dce99eecb0e3af"}, - {file = "black-24.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c046c1d1eeb7aea9335da62472481d3bbf3fd986e093cffd35f4385c94ae368"}, - {file = "black-24.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:649f6d84ccbae73ab767e206772cc2d7a393a001070a4c814a546afd0d423aed"}, - {file = "black-24.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b59b250fdba5f9a9cd9d0ece6e6d993d91ce877d121d161e4698af3eb9c1018"}, - {file = "black-24.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:6e55d30d44bed36593c3163b9bc63bf58b3b30e4611e4d88a0c3c239930ed5b2"}, - {file = "black-24.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:505289f17ceda596658ae81b61ebbe2d9b25aa78067035184ed0a9d855d18afd"}, - {file = "black-24.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b19c9ad992c7883ad84c9b22aaa73562a16b819c1d8db7a1a1a49fb7ec13c7d2"}, - {file = "black-24.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1f13f7f386f86f8121d76599114bb8c17b69d962137fc70efe56137727c7047e"}, - {file = "black-24.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:f490dbd59680d809ca31efdae20e634f3fae27fba3ce0ba3208333b713bc3920"}, - {file = "black-24.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:eab4dd44ce80dea27dc69db40dab62d4ca96112f87996bca68cd75639aeb2e4c"}, - {file = "black-24.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3c4285573d4897a7610054af5a890bde7c65cb466040c5f0c8b732812d7f0e5e"}, - {file = "black-24.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e84e33b37be070ba135176c123ae52a51f82306def9f7d063ee302ecab2cf47"}, - {file = "black-24.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:73bbf84ed136e45d451a260c6b73ed674652f90a2b3211d6a35e78054563a9bb"}, - {file = "black-24.8.0-py3-none-any.whl", hash = "sha256:972085c618ee94f402da1af548a4f218c754ea7e5dc70acb168bfaca4c2542ed"}, - {file = "black-24.8.0.tar.gz", hash = "sha256:2500945420b6784c38b9ee885af039f5e7471ef284ab03fa35ecdde4688cd83f"}, + {file = "black-24.10.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6668650ea4b685440857138e5fe40cde4d652633b1bdffc62933d0db4ed9812"}, + {file = "black-24.10.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1c536fcf674217e87b8cc3657b81809d3c085d7bf3ef262ead700da345bfa6ea"}, + {file = "black-24.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:649fff99a20bd06c6f727d2a27f401331dc0cc861fb69cde910fe95b01b5928f"}, + {file = "black-24.10.0-cp310-cp310-win_amd64.whl", hash = "sha256:fe4d6476887de70546212c99ac9bd803d90b42fc4767f058a0baa895013fbb3e"}, + {file = "black-24.10.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5a2221696a8224e335c28816a9d331a6c2ae15a2ee34ec857dcf3e45dbfa99ad"}, + {file = "black-24.10.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f9da3333530dbcecc1be13e69c250ed8dfa67f43c4005fb537bb426e19200d50"}, + {file = "black-24.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4007b1393d902b48b36958a216c20c4482f601569d19ed1df294a496eb366392"}, + {file = "black-24.10.0-cp311-cp311-win_amd64.whl", hash = "sha256:394d4ddc64782e51153eadcaaca95144ac4c35e27ef9b0a42e121ae7e57a9175"}, + {file = "black-24.10.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b5e39e0fae001df40f95bd8cc36b9165c5e2ea88900167bddf258bacef9bbdc3"}, + {file = "black-24.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d37d422772111794b26757c5b55a3eade028aa3fde43121ab7b673d050949d65"}, + {file = "black-24.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:14b3502784f09ce2443830e3133dacf2c0110d45191ed470ecb04d0f5f6fcb0f"}, + {file = "black-24.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:30d2c30dc5139211dda799758559d1b049f7f14c580c409d6ad925b74a4208a8"}, + {file = "black-24.10.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1cbacacb19e922a1d75ef2b6ccaefcd6e93a2c05ede32f06a21386a04cedb981"}, + {file = "black-24.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f93102e0c5bb3907451063e08b9876dbeac810e7da5a8bfb7aeb5a9ef89066b"}, + {file = "black-24.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ddacb691cdcdf77b96f549cf9591701d8db36b2f19519373d60d31746068dbf2"}, + {file = "black-24.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:680359d932801c76d2e9c9068d05c6b107f2584b2a5b88831c83962eb9984c1b"}, + {file = "black-24.10.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:17374989640fbca88b6a448129cd1745c5eb8d9547b464f281b251dd00155ccd"}, + {file = "black-24.10.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:63f626344343083322233f175aaf372d326de8436f5928c042639a4afbbf1d3f"}, + {file = "black-24.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfa1d0cb6200857f1923b602f978386a3a2758a65b52e0950299ea014be6800"}, + {file = "black-24.10.0-cp39-cp39-win_amd64.whl", hash = "sha256:2cd9c95431d94adc56600710f8813ee27eea544dd118d45896bb734e9d7a0dc7"}, + {file = "black-24.10.0-py3-none-any.whl", hash = "sha256:3bb2b7a1f7b685f85b11fed1ef10f8a9148bceb49853e47a294a3dd963c1dd7d"}, + {file = "black-24.10.0.tar.gz", hash = "sha256:846ea64c97afe3bc677b761787993be4991810ecc7a4a937816dd6bddedc4875"}, ] [package.dependencies] @@ -801,7 +801,7 @@ typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] +d = ["aiohttp (>=3.10)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] uvloop = ["uvloop (>=0.15.2)"] @@ -7111,4 +7111,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "b08066d49d20689acb3ee8279c9c3e1a4e1de36bf4bf10e5dd2a46096fda826f" +content-hash = "e68059801b1c17a6ae754fa3700bf6e192ae3946e835414d31d76e82b6a25ed7" diff --git a/pyproject.toml b/pyproject.toml index 916207021..c5310300d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ azure-cosmos = "^4.7.0" pytest = "^8.3.3" pytest-cov = "5.0.0" flake8 = "7.1.1" -black = "24.8.0" +black = "24.10.0" pre-commit = "4.0.0" pytest_httpserver = "1.1.0" trustme = "1.1.0" From 95fa4f2602c0bffc5280bc2904cd2deae8ed9812 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:41:07 +0100 Subject: [PATCH 3/6] build: bump @fluentui/react from 8.121.1 to 8.121.4 in /code/frontend (#1409) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- code/frontend/package-lock.json | 92 ++++++++++++++++----------------- code/frontend/package.json | 2 +- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/code/frontend/package-lock.json b/code/frontend/package-lock.json index e2d818b4a..c3ace0e2a 100644 --- a/code/frontend/package-lock.json +++ b/code/frontend/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "dependencies": { "@babel/traverse": "^7.25.7", - "@fluentui/react": "^8.121.1", + "@fluentui/react": "^8.121.4", "@fluentui/react-icons": "^2.0.259", "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", @@ -733,34 +733,34 @@ } }, "node_modules/@fluentui/dom-utilities": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/@fluentui/dom-utilities/-/dom-utilities-2.3.7.tgz", - "integrity": "sha512-AaTR9BhJEF0i042NS1Ju8l95f24p2tBMq6jVVbUEDtYnKaxWnpv8R9eYjOwy8SDniQc1ino+BkolIgCVXXvDmw==", + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@fluentui/dom-utilities/-/dom-utilities-2.3.9.tgz", + "integrity": "sha512-8PPzv31VXnyMvZrzK7iSGPRx8piJjas0xV+qaNQ1tzAXHuTaLXPeADJK/gEDH1XA/e9Vaakb3lPUpRVa8tal+w==", "dependencies": { "@fluentui/set-version": "^8.2.23", "tslib": "^2.1.0" } }, "node_modules/@fluentui/font-icons-mdl2": { - "version": "8.5.52", - "resolved": "https://registry.npmjs.org/@fluentui/font-icons-mdl2/-/font-icons-mdl2-8.5.52.tgz", - "integrity": "sha512-2ISEqYNmGVp5Z3Bt9h93/DJKIHmVrWXcKHu6fVPLUdF9hJM/Nz9HZnZWicw0gxa2BH8VU9JSe82PyOELtzfl8A==", + "version": "8.5.54", + "resolved": "https://registry.npmjs.org/@fluentui/font-icons-mdl2/-/font-icons-mdl2-8.5.54.tgz", + "integrity": "sha512-4BU4+K4VnAt6Djsfeh69N6PdgWcp+/q2QQ/Vi7O4A3Uc9/1KUKqTD349gYnXf/JAkpVsWammIBByIFBaQGlFWA==", "dependencies": { "@fluentui/set-version": "^8.2.23", - "@fluentui/style-utilities": "^8.11.1", - "@fluentui/utilities": "^8.15.17", + "@fluentui/style-utilities": "^8.11.3", + "@fluentui/utilities": "^8.15.19", "tslib": "^2.1.0" } }, "node_modules/@fluentui/foundation-legacy": { - "version": "8.4.18", - "resolved": "https://registry.npmjs.org/@fluentui/foundation-legacy/-/foundation-legacy-8.4.18.tgz", - "integrity": "sha512-TN1E848L3jcsF4Im7ALgihYK+IEpD6hHMwaPYU59nQe2S26Sw84sX3zd5dbCLUNZ62tXIhA/m0QxBn51CV9pYg==", + "version": "8.4.20", + "resolved": "https://registry.npmjs.org/@fluentui/foundation-legacy/-/foundation-legacy-8.4.20.tgz", + "integrity": "sha512-6/NRrsce4EIYgJSrxbmLSCP/qsHP7oh8tO83FHGc5b8aA5snE5dcvpHzrzrt5v5xH26dj6WGRFOO8wInDBpg+Q==", "dependencies": { "@fluentui/merge-styles": "^8.6.13", "@fluentui/set-version": "^8.2.23", - "@fluentui/style-utilities": "^8.11.1", - "@fluentui/utilities": "^8.15.17", + "@fluentui/style-utilities": "^8.11.3", + "@fluentui/utilities": "^8.15.19", "tslib": "^2.1.0" }, "peerDependencies": { @@ -786,22 +786,22 @@ } }, "node_modules/@fluentui/react": { - "version": "8.121.1", - "resolved": "https://registry.npmjs.org/@fluentui/react/-/react-8.121.1.tgz", - "integrity": "sha512-y8+r3FeudfpqvD3clDfLYjN6UiLvU4Oxw3UkCX6s2gA8MFfDlocTVuYk3mlEALleZHFhCpXqnaGh7LTGEASslA==", + "version": "8.121.4", + "resolved": "https://registry.npmjs.org/@fluentui/react/-/react-8.121.4.tgz", + "integrity": "sha512-Z4zFw+7b2dtVh++qm3jexTrc2KSQTM6rhckHCVOYRi3A2xtFoso5X3CkKqWwpbsOwSov8ERl3rLpJM/qyfd+UA==", "dependencies": { "@fluentui/date-time-utilities": "^8.6.9", - "@fluentui/font-icons-mdl2": "^8.5.52", - "@fluentui/foundation-legacy": "^8.4.18", + "@fluentui/font-icons-mdl2": "^8.5.54", + "@fluentui/foundation-legacy": "^8.4.20", "@fluentui/merge-styles": "^8.6.13", - "@fluentui/react-focus": "^8.9.15", - "@fluentui/react-hooks": "^8.8.14", + "@fluentui/react-focus": "^8.9.17", + "@fluentui/react-hooks": "^8.8.16", "@fluentui/react-portal-compat-context": "^9.0.12", "@fluentui/react-window-provider": "^2.2.28", "@fluentui/set-version": "^8.2.23", - "@fluentui/style-utilities": "^8.11.1", - "@fluentui/theme": "^2.6.61", - "@fluentui/utilities": "^8.15.17", + "@fluentui/style-utilities": "^8.11.3", + "@fluentui/theme": "^2.6.63", + "@fluentui/utilities": "^8.15.19", "@microsoft/load-themed-styles": "^1.10.26", "tslib": "^2.1.0" }, @@ -813,15 +813,15 @@ } }, "node_modules/@fluentui/react-focus": { - "version": "8.9.15", - "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-8.9.15.tgz", - "integrity": "sha512-obc9ql31gSLnCHpNbUA9JLTHUr8076/fsDXNYNDI6DsF30cZ0YdJJLUU0TQfXG1ZRaE2Hkjhp2H3iJ42hmyFQw==", + "version": "8.9.17", + "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-8.9.17.tgz", + "integrity": "sha512-YxnxkLcsECT9CwzJEInZzgwYcngRE+LgDgtMWphXooqeYzH2TrUUeKxncbd5dibQ9gS6mpGN8pApyskEi3yDyg==", "dependencies": { "@fluentui/keyboard-key": "^0.4.23", "@fluentui/merge-styles": "^8.6.13", "@fluentui/set-version": "^8.2.23", - "@fluentui/style-utilities": "^8.11.1", - "@fluentui/utilities": "^8.15.17", + "@fluentui/style-utilities": "^8.11.3", + "@fluentui/utilities": "^8.15.19", "tslib": "^2.1.0" }, "peerDependencies": { @@ -830,13 +830,13 @@ } }, "node_modules/@fluentui/react-hooks": { - "version": "8.8.14", - "resolved": "https://registry.npmjs.org/@fluentui/react-hooks/-/react-hooks-8.8.14.tgz", - "integrity": "sha512-WfJIrxqb1yFi8VkJp8cwUEbNUDTwGKxwIXekXkmsMcVYRMTlHcg1entFDQJlQxfzL5zfNfHlryEoieaqKOCaoA==", + "version": "8.8.16", + "resolved": "https://registry.npmjs.org/@fluentui/react-hooks/-/react-hooks-8.8.16.tgz", + "integrity": "sha512-PQ1BeOp+99mdO0g7j6QLtChfXG1LxXeHG0q5CtUeD1OUGR+vUDK84h60sw7e7qU9sSmvPmHO7jn69Lg3CS+DXw==", "dependencies": { "@fluentui/react-window-provider": "^2.2.28", "@fluentui/set-version": "^8.2.23", - "@fluentui/utilities": "^8.15.17", + "@fluentui/utilities": "^8.15.19", "tslib": "^2.1.0" }, "peerDependencies": { @@ -890,26 +890,26 @@ } }, "node_modules/@fluentui/style-utilities": { - "version": "8.11.1", - "resolved": "https://registry.npmjs.org/@fluentui/style-utilities/-/style-utilities-8.11.1.tgz", - "integrity": "sha512-thMNOzA+sawp/ntey/UCLgi/wU5mxtaF0BnXnS6MO1pPBOandPY8DoH9JWO1SMajGzX/iUAjdiezUgH4a+IhTA==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/@fluentui/style-utilities/-/style-utilities-8.11.3.tgz", + "integrity": "sha512-Qbmg8mjPXl7A0nuekJ8W4tpD4fWRnKT6hHio4cP49vIQL+wdIkG6OdI1KggDHI7oeuqqPGeXCOcj59eK2MwXtQ==", "dependencies": { "@fluentui/merge-styles": "^8.6.13", "@fluentui/set-version": "^8.2.23", - "@fluentui/theme": "^2.6.61", - "@fluentui/utilities": "^8.15.17", + "@fluentui/theme": "^2.6.63", + "@fluentui/utilities": "^8.15.19", "@microsoft/load-themed-styles": "^1.10.26", "tslib": "^2.1.0" } }, "node_modules/@fluentui/theme": { - "version": "2.6.61", - "resolved": "https://registry.npmjs.org/@fluentui/theme/-/theme-2.6.61.tgz", - "integrity": "sha512-a9P0iRwlBukdn0pXyscL88iIiMg10IUUwKt1v1rip53KqWzrMTo2CxiJ8ZtEAXdyd0pm89MbxnYtWNC37U8BVw==", + "version": "2.6.63", + "resolved": "https://registry.npmjs.org/@fluentui/theme/-/theme-2.6.63.tgz", + "integrity": "sha512-BZ+YG4Vqb+ulhmZzDv8yZFuYo2kHp1m2cttBZLkc+61FnrwCaDBmJxwg65gXoF7wwXKh2qJIcJueSLMmvVyAOQ==", "dependencies": { "@fluentui/merge-styles": "^8.6.13", "@fluentui/set-version": "^8.2.23", - "@fluentui/utilities": "^8.15.17", + "@fluentui/utilities": "^8.15.19", "tslib": "^2.1.0" }, "peerDependencies": { @@ -918,11 +918,11 @@ } }, "node_modules/@fluentui/utilities": { - "version": "8.15.17", - "resolved": "https://registry.npmjs.org/@fluentui/utilities/-/utilities-8.15.17.tgz", - "integrity": "sha512-2eDPLuw1Yo1sxr14ObXG8B/7AOH1r0FAruMc1COm+WHpH+BsTtsQcZ53HdNLLH5jzDGr8cSEFKEhRBuMpd8kQw==", + "version": "8.15.19", + "resolved": "https://registry.npmjs.org/@fluentui/utilities/-/utilities-8.15.19.tgz", + "integrity": "sha512-20WoYz0wW7pkmur+7qxTwRfvkdAnHfylLdCYSm91WLupb0cwQ1wWZWIuyo+e0cjcvem1T9TC1+NjWs0kavTWBg==", "dependencies": { - "@fluentui/dom-utilities": "^2.3.7", + "@fluentui/dom-utilities": "^2.3.9", "@fluentui/merge-styles": "^8.6.13", "@fluentui/react-window-provider": "^2.2.28", "@fluentui/set-version": "^8.2.23", diff --git a/code/frontend/package.json b/code/frontend/package.json index f3392857f..908efe4aa 100644 --- a/code/frontend/package.json +++ b/code/frontend/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@babel/traverse": "^7.25.7", - "@fluentui/react": "^8.121.1", + "@fluentui/react": "^8.121.4", "@fluentui/react-icons": "^2.0.259", "@fortawesome/fontawesome-svg-core": "^6.6.0", "@fortawesome/free-solid-svg-icons": "^6.6.0", From c767212228df3b3d4c6678d0d320a0fae5c711b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:49:54 +0100 Subject: [PATCH 4/6] build: bump pre-commit from 4.0.0 to 4.0.1 (#1417) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index f7e00db3f..adc39af5e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4437,13 +4437,13 @@ ssv = ["swagger-spec-validator (>=2.4,<3.0)"] [[package]] name = "pre-commit" -version = "4.0.0" +version = "4.0.1" description = "A framework for managing and maintaining multi-language pre-commit hooks." optional = false python-versions = ">=3.9" files = [ - {file = "pre_commit-4.0.0-py2.py3-none-any.whl", hash = "sha256:0ca2341cf94ac1865350970951e54b1a50521e57b7b500403307aed4315a1234"}, - {file = "pre_commit-4.0.0.tar.gz", hash = "sha256:5d9807162cc5537940f94f266cbe2d716a75cfad0d78a317a92cac16287cfed6"}, + {file = "pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878"}, + {file = "pre_commit-4.0.1.tar.gz", hash = "sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2"}, ] [package.dependencies] @@ -7111,4 +7111,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "e68059801b1c17a6ae754fa3700bf6e192ae3946e835414d31d76e82b6a25ed7" +content-hash = "208ff620e3c2bab4023fec1f7dc43216b15da1943c58e68734a266513728da63" diff --git a/pyproject.toml b/pyproject.toml index c5310300d..7d7b8f8d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ pytest = "^8.3.3" pytest-cov = "5.0.0" flake8 = "7.1.1" black = "24.10.0" -pre-commit = "4.0.0" +pre-commit = "4.0.1" pytest_httpserver = "1.1.0" trustme = "1.1.0" jupyter = "1.1.1" From 69d0e98bf3bfb58f603855c76a52636dad4ddb60 Mon Sep 17 00:00:00 2001 From: Prasanjeet-Microsoft Date: Tue, 15 Oct 2024 18:14:20 +0530 Subject: [PATCH 5/6] revert: Reverted the changes from PR-1354 (#1420) --- azure.yaml | 16 ++++++++++++++++ scripts/package_frontend.ps1 | 3 +-- scripts/package_frontend.sh | 3 +-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/azure.yaml b/azure.yaml index 553eb7950..915e69921 100644 --- a/azure.yaml +++ b/azure.yaml @@ -29,8 +29,24 @@ services: project: ./code/backend language: py host: appservice + hooks: + prepackage: + windows: + shell: pwsh + run: poetry install; poetry export -o requirements.txt + posix: + shell: sh + run: poetry install; poetry export -o requirements.txt function: project: ./code/backend/batch language: py host: function + hooks: + prepackage: + windows: + shell: pwsh + run: poetry export -o requirements.txt; pip install -r requirements.txt + posix: + shell: sh + run: poetry export -o requirements.txt; pip install -r requirements.txt diff --git a/scripts/package_frontend.ps1 b/scripts/package_frontend.ps1 index 0bc9484b3..82b82acdf 100644 --- a/scripts/package_frontend.ps1 +++ b/scripts/package_frontend.ps1 @@ -3,10 +3,9 @@ rm dist/* -r -Force # Python poetry install +poetry export -o dist/requirements.txt cp *.py dist -Force cp backend dist -r -Force -cp ../pyproject.toml dist -Force -cp ../poetry.lock dist -Force # Node cd frontend diff --git a/scripts/package_frontend.sh b/scripts/package_frontend.sh index 28db06671..6b9c9893b 100755 --- a/scripts/package_frontend.sh +++ b/scripts/package_frontend.sh @@ -4,10 +4,9 @@ set -eou pipefail mkdir -p dist rm -rf dist/* poetry install +poetry export -o dist/requirements.txt cp *.py dist cp -r backend dist -cp ../pyproject.toml dist -cp ../poetry.lock dist cd frontend npm install From 1249abf9d312d05341f2a480ee8ca72091abd64d Mon Sep 17 00:00:00 2001 From: AjitPadhi-Microsoft Date: Tue, 15 Oct 2024 21:46:45 +0530 Subject: [PATCH 6/6] fix: fixed config save issue (#1421) --- code/backend/pages/04_Configuration.py | 158 +++++++++++-------------- 1 file changed, 72 insertions(+), 86 deletions(-) diff --git a/code/backend/pages/04_Configuration.py b/code/backend/pages/04_Configuration.py index c6f2cad5a..1ac80215e 100644 --- a/code/backend/pages/04_Configuration.py +++ b/code/backend/pages/04_Configuration.py @@ -391,96 +391,82 @@ def validate_documents(): st.checkbox("Log tokens", key="log_tokens") if st.form_submit_button("Save configuration"): - valid = all( - row["document_type"] - and row["chunking_strategy"] - and row["loading_strategy"] - for row in edited_document_processors - ) - - if not valid: - st.error( - "Please ensure all fields are selected and not left blank in Document processing configuration." + document_processors = [] + if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION is False: + valid = all( + row["document_type"] + and row["chunking_strategy"] + and row["loading_strategy"] + for row in edited_document_processors ) - else: - document_processors = ( - list( - map( - lambda x: { - "document_type": x["document_type"], - "chunking": { - "strategy": x["chunking_strategy"], - "size": x["chunking_size"], - "overlap": x["chunking_overlap"], - }, - "loading": { - "strategy": x["loading_strategy"], - }, - "use_advanced_image_processing": x[ - "use_advanced_image_processing" - ], + if not valid: + st.error( + "Please ensure all fields are selected and not left blank in Document processing configuration." + ) + document_processors = list( + map( + lambda x: { + "document_type": x["document_type"], + "chunking": { + "strategy": x["chunking_strategy"], + "size": x["chunking_size"], + "overlap": x["chunking_overlap"], }, - edited_document_processors, - ) + "loading": { + "strategy": x["loading_strategy"], + }, + "use_advanced_image_processing": x[ + "use_advanced_image_processing" + ], + }, + edited_document_processors, ) - if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION is False - else [] - ) - current_config = { - "prompts": { - "condense_question_prompt": "", # st.session_state['condense_question_prompt'], - "answering_system_prompt": st.session_state[ - "answering_system_prompt" - ], - "answering_user_prompt": st.session_state[ - "answering_user_prompt" - ], - "use_on_your_data_format": st.session_state[ - "use_on_your_data_format" - ], - "post_answering_prompt": st.session_state[ - "post_answering_prompt" - ], - "enable_post_answering_prompt": st.session_state[ - "enable_post_answering_prompt" - ], - "enable_content_safety": st.session_state[ - "enable_content_safety" - ], - "ai_assistant_type": st.session_state["ai_assistant_type"], - "conversational_flow": st.session_state["conversational_flow"], - }, - "messages": { - "post_answering_filter": st.session_state[ - "post_answering_filter_message" - ] - }, - "example": { - "documents": st.session_state["example_documents"], - "user_question": st.session_state["example_user_question"], - "answer": st.session_state["example_answer"], - }, - "document_processors": document_processors, - "logging": { - "log_user_interactions": st.session_state[ - "log_user_interactions" - ], - "log_tokens": st.session_state["log_tokens"], - }, - "orchestrator": { - "strategy": st.session_state["orchestrator_strategy"] - }, - "integrated_vectorization_config": ( - integrated_vectorization_config - if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION - else None - ), - "enable_chat_history": st.session_state["enable_chat_history"], - } - ConfigHelper.save_config_as_active(current_config) - st.success( - "Configuration saved successfully! Please restart the chat service for these changes to take effect." ) + current_config = { + "prompts": { + "condense_question_prompt": "", # st.session_state['condense_question_prompt'], + "answering_system_prompt": st.session_state[ + "answering_system_prompt" + ], + "answering_user_prompt": st.session_state["answering_user_prompt"], + "use_on_your_data_format": st.session_state[ + "use_on_your_data_format" + ], + "post_answering_prompt": st.session_state["post_answering_prompt"], + "enable_post_answering_prompt": st.session_state[ + "enable_post_answering_prompt" + ], + "enable_content_safety": st.session_state["enable_content_safety"], + "ai_assistant_type": st.session_state["ai_assistant_type"], + "conversational_flow": st.session_state["conversational_flow"], + }, + "messages": { + "post_answering_filter": st.session_state[ + "post_answering_filter_message" + ] + }, + "example": { + "documents": st.session_state["example_documents"], + "user_question": st.session_state["example_user_question"], + "answer": st.session_state["example_answer"], + }, + "document_processors": document_processors, + "logging": { + "log_user_interactions": st.session_state["log_user_interactions"], + "log_tokens": st.session_state["log_tokens"], + }, + "orchestrator": {"strategy": st.session_state["orchestrator_strategy"]}, + "integrated_vectorization_config": ( + integrated_vectorization_config + if env_helper.AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION + else None + ), + "enable_chat_history": st.session_state["enable_chat_history"], + } + ConfigHelper.save_config_as_active(current_config) + st.success( + "Configuration saved successfully! Please restart the chat service for these changes to take effect." + ) with st.popover(":red[Reset configuration to defaults]"):