Skip to content

Commit b6d060b

Browse files
chore: update dependencies for langchain and related packages (#165)
This pull request updates dependencies across several modules to their latest major versions, particularly for the LangChain ecosystem, and refactors imports to match new package structures. These changes ensure compatibility with the latest APIs and improve maintainability. The most important changes are grouped below: **Dependency Upgrades (LangChain Ecosystem & Related Libraries):** * Updated `langchain`, `langchain-community`, `langchain-core`, `langchain-openai`, `langchain-qdrant`, `langchain-ollama`, `langchain-text-splitters`, and `langfuse` to their latest major versions in multiple `pyproject.toml` files, ensuring compatibility with breaking changes and new features. [[1]](diffhunk://#diff-b19ab043535569caf9345971969d115d6515ae951a21b00a278145a28230fba1L23-R34) [[2]](diffhunk://#diff-9c4162cc1c16dd4c7ec5e95e79df285e8c0882a1db7ff2892c746a0537d26c36L25-R25) [[3]](diffhunk://#diff-9c4162cc1c16dd4c7ec5e95e79df285e8c0882a1db7ff2892c746a0537d26c36L36-R44) [[4]](diffhunk://#diff-9c5aeb0db77c2eec077d07ddc3b3810ae1a4a1e50ee7061fba37a46706c513fbL116-R120) [[5]](diffhunk://#diff-dede389bcfb615c4b45cd1da7ac14cbe9535305f41f19cce09e321c91a8bb323L108-R111) * Updated other dependencies such as `langchain-experimental`, `python-dateutil`, and related libraries for consistency and security. [[1]](diffhunk://#diff-9c5aeb0db77c2eec077d07ddc3b3810ae1a4a1e50ee7061fba37a46706c513fbL116-R120) [[2]](diffhunk://#diff-dede389bcfb615c4b45cd1da7ac14cbe9535305f41f19cce09e321c91a8bb323L108-R111) **Import Refactoring:** * Refactored imports from `langchain.text_splitter` to `langchain_text_splitters` in several modules to match the new package structure. [[1]](diffhunk://#diff-8b7c1816cb3e0a40b7965721c550eefdc184c5d914ec023e36527255613381e7L6-R6) [[2]](diffhunk://#diff-3ee3488f9128a80b43211355c9429c33973e97c8a5d970a0c7bab21718288ec3L3-R4) [[3]](diffhunk://#diff-9793b1081628436dd7d5a0e37abc9d79ee5e25af3f5e784f99379249809ed8dbL7-R9) * Updated imports of prompt templates from `langchain.prompts` to `langchain_core.prompts` in prompt template modules and tests, ensuring proper usage of the latest API. [[1]](diffhunk://#diff-f45d2e4f21bc9442444429d1a64091e4c50132f371b05b72374956fa02b1d966L1-R1) [[2]](diffhunk://#diff-cc1e8ada00d928911d0ae3adef2ce660c2ac2eee979bcc40af86bf1890c0701aL1-R1) [[3]](diffhunk://#diff-e93a1e7be5b80657d6e435a651dab98960b0d1c1e7a8672f4e3927b4cd0c3fe7L1-R1) [[4]](diffhunk://#diff-14518a5c6413a608c65520408f0ccf7a4bab9096ff2c0ab0971857c8bcd6c299L3-R7) [[5]](diffhunk://#diff-d3a3ed735f039fe052f75181d34b526d9fd7514a768925cf584582405fa13adfL6-L11) These changes are necessary to keep the codebase up to date and compatible with the latest versions of the LangChain ecosystem and its dependencies. --------- Co-authored-by: Andreas Klos <aklos@outlook.de>
1 parent d1899fc commit b6d060b

File tree

19 files changed

+1382
-427
lines changed

19 files changed

+1382
-427
lines changed

libs/admin-api-lib/poetry.lock

Lines changed: 363 additions & 59 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/admin-api-lib/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ python-dateutil = "^2.9.0.post0"
113113
tenacity = "9.1.2"
114114
boto3 = "^1.38.10"
115115
tqdm = "^4.67.1"
116-
langfuse = "3.6.1"
116+
langfuse = "^3.10.1"
117117
redis = "^6.0.0"
118118
pyyaml = "^6.0.2"
119119
python-multipart = "^0.0.20"
120-
langchain-experimental = "^0.3.4"
120+
langchain-experimental = "^0.4.0"
121121
nltk = "^3.9.2"
122122
starlette = ">=0.49.1"
123123

libs/admin-api-lib/src/admin_api_lib/dependency_container.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from admin_api_lib.impl.api_endpoints.default_file_uploader import DefaultFileUploader
44
from dependency_injector.containers import DeclarativeContainer
55
from dependency_injector.providers import Configuration, List, Selector, Singleton
6-
from langchain.text_splitter import RecursiveCharacterTextSplitter
6+
from langchain_text_splitters import RecursiveCharacterTextSplitter
77
from langchain_community.embeddings import OllamaEmbeddings
88
from langfuse import Langfuse
99

libs/admin-api-lib/src/admin_api_lib/impl/chunker/text_chunker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Module containing the TextChunker class."""
22

3-
from langchain.text_splitter import RecursiveCharacterTextSplitter
43
from langchain_core.documents import Document
4+
from langchain_text_splitters import RecursiveCharacterTextSplitter
55

66
from admin_api_lib.chunker.chunker import Chunker
77

libs/admin-api-lib/src/admin_api_lib/impl/summarizer/langchain_summarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import logging
55
from typing import Optional
66

7-
from langchain.text_splitter import RecursiveCharacterTextSplitter
87
from langchain_core.documents import Document
98
from langchain_core.runnables import Runnable, RunnableConfig, ensure_config
9+
from langchain_text_splitters import RecursiveCharacterTextSplitter
1010
from openai import APIConnectionError, APIError, APITimeoutError, RateLimitError
1111

1212
from admin_api_lib.impl.settings.summarizer_settings import SummarizerSettings

libs/extractor-api-lib/poetry.lock

Lines changed: 29 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/extractor-api-lib/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ numpy = "^2.2.5"
105105
docx2txt = "^0.9"
106106
unstructured = {extras = ["docx", "pptx"], version = "0.18.15"}
107107
html5lib = "^1.1"
108-
langchain-community = "^0.3.23"
108+
langchain-community = "^0.4.1"
109109
atlassian-python-api = "^4.0.3"
110110
markdownify = "^1.1.0"
111-
langchain-core = "0.3.77"
111+
langchain-core = "^1.0.7"
112112
camelot-py = {extras = ["cv"], version = "^1.0.0"}
113113
fake-useragent = "^2.2.0"
114114
pypdfium2 = "4.30.0"

0 commit comments

Comments
 (0)