From 97b74ba633ab3847d5e8e6904002544091d68bab Mon Sep 17 00:00:00 2001 From: david qiu Date: Tue, 2 Jan 2024 17:18:56 -0800 Subject: [PATCH] Backport PR #558: Pin `langchain-core` dependency to prevent Settings UI crash --- packages/jupyter-ai-magics/pyproject.toml | 1 + packages/jupyter-ai/pyproject.toml | 1 + pyproject.toml | 3 +++ 3 files changed, 5 insertions(+) diff --git a/packages/jupyter-ai-magics/pyproject.toml b/packages/jupyter-ai-magics/pyproject.toml index 05e11a10d..3a0dc43fe 100644 --- a/packages/jupyter-ai-magics/pyproject.toml +++ b/packages/jupyter-ai-magics/pyproject.toml @@ -24,6 +24,7 @@ dependencies = [ "ipython", "importlib_metadata>=5.2.0", "langchain==0.0.350", + "langchain-core>=0.1.0,<0.1.4", "typing_extensions>=4.5.0", "click~=8.0", "jsonpath-ng>=1.5.3,<2", diff --git a/packages/jupyter-ai/pyproject.toml b/packages/jupyter-ai/pyproject.toml index 9bea0f15f..87e54c9ae 100644 --- a/packages/jupyter-ai/pyproject.toml +++ b/packages/jupyter-ai/pyproject.toml @@ -28,6 +28,7 @@ dependencies = [ "aiosqlite>=0.18", "importlib_metadata>=5.2.0", "langchain==0.0.350", + "langchain-core>=0.1.0,<0.1.4", "tiktoken", # required for OpenAIEmbeddings "jupyter_ai_magics", "dask[distributed]", diff --git a/pyproject.toml b/pyproject.toml index 0eea5610a..b2b127fee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,3 +38,6 @@ name = "Forbidden import of `pydantic` package. Please import from `langchain.py type = "forbidden" source_modules = ["jupyter_ai", "jupyter_ai_magics"] forbidden_modules = ["pydantic"] + +[tool.pytest.ini_options] +addopts = "--ignore packages/jupyter-ai-module-cookiecutter"