Loading pkgs/by-name/op/open-webui/langchain-v1.patch 0 → 100644 +27 −0 Original line number Diff line number Diff line diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index da570330b..6ea16e249 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -10,7 +10,7 @@ import re from urllib.parse import quote from huggingface_hub import snapshot_download -from langchain.retrievers import ContextualCompressionRetriever, EnsembleRetriever +from langchain_classic.retrievers import ContextualCompressionRetriever, EnsembleRetriever from langchain_community.retrievers import BM25Retriever from langchain_core.documents import Document diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index f8147372f..363bb4706 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -28,8 +28,7 @@ from pydantic import BaseModel import tiktoken -from langchain.text_splitter import RecursiveCharacterTextSplitter, TokenTextSplitter -from langchain_text_splitters import MarkdownHeaderTextSplitter +from langchain_text_splitters import MarkdownHeaderTextSplitter, RecursiveCharacterTextSplitter, TokenTextSplitter from langchain_core.documents import Document from open_webui.models.files import FileModel, Files pkgs/by-name/op/open-webui/package.nix +3 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ python3Packages.buildPythonApplication rec { build-system = with python3Packages; [ hatchling ]; patches = [ ./langchain-v1.patch ]; # Not force-including the frontend build directory as frontend is managed by the `frontend` derivation above. postPatch = '' substituteInPlace pyproject.toml \ Loading Loading @@ -128,6 +130,7 @@ python3Packages.buildPythonApplication rec { iso-639 itsdangerous langchain langchain-classic langchain-community langdetect ldap3 Loading Loading
pkgs/by-name/op/open-webui/langchain-v1.patch 0 → 100644 +27 −0 Original line number Diff line number Diff line diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index da570330b..6ea16e249 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -10,7 +10,7 @@ import re from urllib.parse import quote from huggingface_hub import snapshot_download -from langchain.retrievers import ContextualCompressionRetriever, EnsembleRetriever +from langchain_classic.retrievers import ContextualCompressionRetriever, EnsembleRetriever from langchain_community.retrievers import BM25Retriever from langchain_core.documents import Document diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index f8147372f..363bb4706 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -28,8 +28,7 @@ from pydantic import BaseModel import tiktoken -from langchain.text_splitter import RecursiveCharacterTextSplitter, TokenTextSplitter -from langchain_text_splitters import MarkdownHeaderTextSplitter +from langchain_text_splitters import MarkdownHeaderTextSplitter, RecursiveCharacterTextSplitter, TokenTextSplitter from langchain_core.documents import Document from open_webui.models.files import FileModel, Files
pkgs/by-name/op/open-webui/package.nix +3 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ python3Packages.buildPythonApplication rec { build-system = with python3Packages; [ hatchling ]; patches = [ ./langchain-v1.patch ]; # Not force-including the frontend build directory as frontend is managed by the `frontend` derivation above. postPatch = '' substituteInPlace pyproject.toml \ Loading Loading @@ -128,6 +130,7 @@ python3Packages.buildPythonApplication rec { iso-639 itsdangerous langchain langchain-classic langchain-community langdetect ldap3 Loading