diff --git a/vizro-ai/changelog.d/20240621_204959_lingyi_zhang_remove_langchain_community.md b/vizro-ai/changelog.d/20240621_204959_lingyi_zhang_remove_langchain_community.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-ai/changelog.d/20240621_204959_lingyi_zhang_remove_langchain_community.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-ai/hatch.toml b/vizro-ai/hatch.toml index e82532d14..66b69e519 100644 --- a/vizro-ai/hatch.toml +++ b/vizro-ai/hatch.toml @@ -16,7 +16,8 @@ dependencies = [ "toml", "nbformat>=4.2.0", "pyhamcrest", - "jupyter" + "jupyter", + "langchain_community" ] [envs.default.env-vars] diff --git a/vizro-ai/pyproject.toml b/vizro-ai/pyproject.toml index 9ded3fca5..2136e2b88 100644 --- a/vizro-ai/pyproject.toml +++ b/vizro-ai/pyproject.toml @@ -24,7 +24,6 @@ dependencies = [ "ipython>=8.10.0", # not directly required, pinned by Snyk to avoid a vulnerability: https://app.snyk.io/vuln/SNYK-PYTHON-IPYTHON-3318382 "urllib3>=2.0.7", # not directly required, pinned by Snyk to avoid a vulnerability: https://security.snyk.io/vuln/SNYK-PYTHON-URLLIB3-6002459 "aiohttp>=3.9.2", # not directly required, pinned by Snyk to avoid a vulnerability: https://security.snyk.io/vuln/SNYK-PYTHON-AIOHTTP-6209407 - "langchain-community>=0.0.27", # not directly required, pinned by Snyk to avoid a vulnerability: https://security.snyk.io/vuln/SNYK-PYTHON-LANGCHAINCOMMUNITY-6421036 "langchain-core>=0.1.31" # not directly required, pinned by Snyk to avoid a vulnerability: https://security.snyk.io/vuln/SNYK-PYTHON-LANGCHAINCORE-6370598 ] description = "Vizro-AI is a tool for generating data visualizations" diff --git a/vizro-ai/snyk/requirements.txt b/vizro-ai/snyk/requirements.txt index ecc8cdf98..b2588a330 100644 --- a/vizro-ai/snyk/requirements.txt +++ b/vizro-ai/snyk/requirements.txt @@ -8,5 +8,4 @@ vizro>=0.1.4 ipython>=8.10.0 urllib3>=2.0.7 aiohttp>=3.9.2 -langchain-community>=0.0.27 langchain-core>=0.1.31 diff --git a/vizro-ai/tests/unit/vizro-ai/components/test_chart_selection.py b/vizro-ai/tests/unit/vizro-ai/components/test_chart_selection.py index 9f6246055..5a83bc2d4 100644 --- a/vizro-ai/tests/unit/vizro-ai/components/test_chart_selection.py +++ b/vizro-ai/tests/unit/vizro-ai/components/test_chart_selection.py @@ -1,6 +1,6 @@ import pandas as pd import pytest -from langchain.llms.fake import FakeListLLM +from langchain_community.llms.fake import FakeListLLM from vizro_ai.components import GetChartSelection diff --git a/vizro-ai/tests/unit/vizro-ai/components/test_code_validation.py b/vizro-ai/tests/unit/vizro-ai/components/test_code_validation.py index 4172e1c3a..1c8f42108 100644 --- a/vizro-ai/tests/unit/vizro-ai/components/test_code_validation.py +++ b/vizro-ai/tests/unit/vizro-ai/components/test_code_validation.py @@ -1,5 +1,5 @@ import pytest -from langchain.llms.fake import FakeListLLM +from langchain_community.llms.fake import FakeListLLM from vizro_ai.components import GetDebugger diff --git a/vizro-ai/tests/unit/vizro-ai/components/test_custom_chart_wrap.py b/vizro-ai/tests/unit/vizro-ai/components/test_custom_chart_wrap.py index 882d33422..e1e055c50 100644 --- a/vizro-ai/tests/unit/vizro-ai/components/test_custom_chart_wrap.py +++ b/vizro-ai/tests/unit/vizro-ai/components/test_custom_chart_wrap.py @@ -1,5 +1,5 @@ import pytest -from langchain.llms.fake import FakeListLLM +from langchain_community.llms.fake import FakeListLLM from vizro_ai.components import GetCustomChart diff --git a/vizro-ai/tests/unit/vizro-ai/components/test_dataframe_craft.py b/vizro-ai/tests/unit/vizro-ai/components/test_dataframe_craft.py index ff605ee1c..7e40ea528 100644 --- a/vizro-ai/tests/unit/vizro-ai/components/test_dataframe_craft.py +++ b/vizro-ai/tests/unit/vizro-ai/components/test_dataframe_craft.py @@ -2,7 +2,7 @@ import pandas as pd import pytest -from langchain.llms.fake import FakeListLLM +from langchain_community.llms.fake import FakeListLLM from vizro_ai.components import GetDataFrameCraft diff --git a/vizro-ai/tests/unit/vizro-ai/components/test_explanation.py b/vizro-ai/tests/unit/vizro-ai/components/test_explanation.py index 51a06c1f4..c6eb35c87 100644 --- a/vizro-ai/tests/unit/vizro-ai/components/test_explanation.py +++ b/vizro-ai/tests/unit/vizro-ai/components/test_explanation.py @@ -1,5 +1,5 @@ import pytest -from langchain.llms.fake import FakeListLLM +from langchain_community.llms.fake import FakeListLLM from vizro_ai.components import GetCodeExplanation diff --git a/vizro-ai/tests/unit/vizro-ai/components/test_visual_code.py b/vizro-ai/tests/unit/vizro-ai/components/test_visual_code.py index f9132a954..0ba9f19a7 100644 --- a/vizro-ai/tests/unit/vizro-ai/components/test_visual_code.py +++ b/vizro-ai/tests/unit/vizro-ai/components/test_visual_code.py @@ -1,5 +1,5 @@ import pytest -from langchain.llms.fake import FakeListLLM +from langchain_community.llms.fake import FakeListLLM from vizro_ai.components import GetVisualCode