From 73a1c1005f062ce1e5df5b9a1ae60359e0ad4318 Mon Sep 17 00:00:00 2001 From: Bryce York Date: Sun, 13 Oct 2024 12:04:47 -0700 Subject: [PATCH] chore: upgrade langchain to 0.3.* --- ossai/utils.py | 2 +- poetry.lock | 48 ++++++++++++++++++++++++------------------------ pyproject.toml | 4 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ossai/utils.py b/ossai/utils.py index ca746d5..77afa00 100644 --- a/ossai/utils.py +++ b/ossai/utils.py @@ -5,7 +5,7 @@ from typing import Union from dotenv import load_dotenv -from langchain.callbacks.tracers import LangChainTracer +from langchain_core.tracers import LangChainTracer from ossai.logging_config import logger diff --git a/poetry.lock b/poetry.lock index de43534..5b9a075 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1206,23 +1206,23 @@ files = [ [[package]] name = "langchain" -version = "0.2.16" +version = "0.3.3" description = "Building applications with LLMs through composability" optional = false -python-versions = "<4.0,>=3.8.1" +python-versions = "<4.0,>=3.9" files = [ - {file = "langchain-0.2.16-py3-none-any.whl", hash = "sha256:8f59ee8b45f268df4b924ea3b9c63e49286efa756d16b3f6a9de5c6e502c36e1"}, - {file = "langchain-0.2.16.tar.gz", hash = "sha256:ffb426a76a703b73ac69abad77cd16eaf03dda76b42cff55572f592d74944166"}, + {file = "langchain-0.3.3-py3-none-any.whl", hash = "sha256:05ac98c674853c2386d043172820e37ceac9b913aaaf1e51217f0fc424112c72"}, + {file = "langchain-0.3.3.tar.gz", hash = "sha256:6435882996a029a60c61c356bbe51bab4a8f43a54210f5f03e3c4474d19d1842"}, ] [package.dependencies] aiohttp = ">=3.8.3,<4.0.0" async-timeout = {version = ">=4.0.0,<5.0.0", markers = "python_version < \"3.11\""} -langchain-core = ">=0.2.38,<0.3.0" -langchain-text-splitters = ">=0.2.0,<0.3.0" +langchain-core = ">=0.3.10,<0.4.0" +langchain-text-splitters = ">=0.3.0,<0.4.0" langsmith = ">=0.1.17,<0.2.0" numpy = {version = ">=1,<2", markers = "python_version < \"3.12\""} -pydantic = ">=1,<3" +pydantic = ">=2.7.4,<3.0.0" PyYAML = ">=5.3" requests = ">=2,<3" SQLAlchemy = ">=1.4,<3" @@ -1230,53 +1230,53 @@ tenacity = ">=8.1.0,<8.4.0 || >8.4.0,<9.0.0" [[package]] name = "langchain-core" -version = "0.2.41" +version = "0.3.10" description = "Building applications with LLMs through composability" optional = false -python-versions = "<4.0,>=3.8.1" +python-versions = "<4.0,>=3.9" files = [ - {file = "langchain_core-0.2.41-py3-none-any.whl", hash = "sha256:3278fda5ba9a05defae8bb19f1226032add6aab21917db7b3bc74e750e263e84"}, - {file = "langchain_core-0.2.41.tar.gz", hash = "sha256:bc12032c5a298d85be754ccb129bc13ea21ccb1d6e22f8d7ba18b8da64315bb5"}, + {file = "langchain_core-0.3.10-py3-none-any.whl", hash = "sha256:146be6bf2d3dc0d6f4feb46ef082182cf57b056e8163d45278529cd7b7343d2f"}, + {file = "langchain_core-0.3.10.tar.gz", hash = "sha256:63b9a3d03b52dba29cc248b752c574cdcb5fb04bd0fc5c76097fcbb7aaba5221"}, ] [package.dependencies] jsonpatch = ">=1.33,<2.0" -langsmith = ">=0.1.112,<0.2.0" +langsmith = ">=0.1.125,<0.2.0" packaging = ">=23.2,<25" -pydantic = {version = ">=1,<3", markers = "python_full_version < \"3.12.4\""} +pydantic = {version = ">=2.5.2,<3.0.0", markers = "python_full_version < \"3.12.4\""} PyYAML = ">=5.3" tenacity = ">=8.1.0,<8.4.0 || >8.4.0,<9.0.0" typing-extensions = ">=4.7" [[package]] name = "langchain-openai" -version = "0.1.25" +version = "0.2.2" description = "An integration package connecting OpenAI and LangChain" optional = false -python-versions = "<4.0,>=3.8.1" +python-versions = "<4.0,>=3.9" files = [ - {file = "langchain_openai-0.1.25-py3-none-any.whl", hash = "sha256:f0b34a233d0d9cb8fce6006c903e57085c493c4f0e32862b99063b96eaedb109"}, - {file = "langchain_openai-0.1.25.tar.gz", hash = "sha256:eb116f744f820247a72f54313fb7c01524fba0927120d4e899e5e4ab41ad3928"}, + {file = "langchain_openai-0.2.2-py3-none-any.whl", hash = "sha256:3a203228cb38e4711ebd8c0a3bd51854e447f1d017e8475b6467b07ce7dd3e88"}, + {file = "langchain_openai-0.2.2.tar.gz", hash = "sha256:9ae8e2ec7d1ca84fd3bfa82186724528d68e1510a1dc9cdf617a7c669b7a7768"}, ] [package.dependencies] -langchain-core = ">=0.2.40,<0.3.0" +langchain-core = ">=0.3.9,<0.4.0" openai = ">=1.40.0,<2.0.0" tiktoken = ">=0.7,<1" [[package]] name = "langchain-text-splitters" -version = "0.2.4" +version = "0.3.0" description = "LangChain text splitting utilities" optional = false -python-versions = "<4.0,>=3.8.1" +python-versions = "<4.0,>=3.9" files = [ - {file = "langchain_text_splitters-0.2.4-py3-none-any.whl", hash = "sha256:2702dee5b7cbdd595ccbe43b8d38d01a34aa8583f4d6a5a68ad2305ae3e7b645"}, - {file = "langchain_text_splitters-0.2.4.tar.gz", hash = "sha256:f7daa7a3b0aa8309ce248e2e2b6fc8115be01118d336c7f7f7dfacda0e89bf29"}, + {file = "langchain_text_splitters-0.3.0-py3-none-any.whl", hash = "sha256:e84243e45eaff16e5b776cd9c81b6d07c55c010ebcb1965deb3d1792b7358e83"}, + {file = "langchain_text_splitters-0.3.0.tar.gz", hash = "sha256:f9fe0b4d244db1d6de211e7343d4abc4aa90295aa22e1f0c89e51f33c55cd7ce"}, ] [package.dependencies] -langchain-core = ">=0.2.38,<0.3.0" +langchain-core = ">=0.3.0,<0.4.0" [[package]] name = "langcodes" @@ -3763,4 +3763,4 @@ propcache = ">=0.2.0" [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "be66e08d8c4ebdd4e3b57973f0eeadd770ad1c963bc147e0c7a76b0c2072848e" +content-hash = "e1ad413c378f29b7439f695064ef08c4b771c33868f0f02c803958d82661dca2" diff --git a/pyproject.toml b/pyproject.toml index 5330766..d7abef5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ nltk = "^3.9.1" gensim = "^4.3.2" coverage = "^7.4.4" scipy = "1.12" -langchain = "^0.2.3" -langchain-openai = "^0.1.8" +langchain = "^0.3.3" +langchain-openai = "^0.2.2" reportlab = "^4.2.5" [tool.poetry.group.dev.dependencies]