The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community[patch]: more deprecations (#15782)
Erick Friis85a4594ed7db
diff --git a/libs/community/langchain_community/chat_models/azure_openai.py b/libs/community/langchain_community/chat_models/azure_openai.pyindex 5f9e8d1b71..0db36ad947 100644--- a/libs/community/langchain_community/chat_models/azure_openai.py+++ b/libs/community/langchain_community/chat_models/azure_openai.py@@ -20,14 +20,7 @@ logger = logging.getLogger(__name__)@deprecated(since="0.0.10",removal="0.2.0",- message=(- "The class langchain_community.chat_models.azure_openai.AzureChatOpenAI was "- "deprecated in langchain-community 0.0.10 and will be removed in "- "langchain-community 0.2.0. An updated version of the class lives in the "- "langchain-openai package and should be used instead. To use it run "- "`pip install -U langchain-openai` and import as "- "`from langchain_openai import AzureChatOpenAI`."- ),+ alternative_import="langchain_openai.AzureChatOpenAI",)class AzureChatOpenAI(ChatOpenAI):"""`Azure OpenAI` Chat Completion API.diff --git a/libs/community/langchain_community/chat_models/openai.py b/libs/community/langchain_community/chat_models/openai.pyindex 0b043419a9..568767662c 100644--- a/libs/community/langchain_community/chat_models/openai.py+++ b/libs/community/langchain_community/chat_models/openai.py@@ -145,16 +145,7 @@ def _convert_delta_to_message_chunk(@deprecated(- since="0.0.10",- removal="0.2.0",- message=(- "The class langchain_community.chat_models.openai.ChatOpenAI was "- "deprecated in langchain-community 0.0.10 and will be removed in "- "langchain-community 0.2.0. An updated version of the class lives in the "- "langchain-openai package and should be used instead. To use it run "- "`pip install -U langchain-openai` and import as "- "`from langchain_openai import ChatOpenAI`."- ),+ since="0.0.10", removal="0.2.0", alternative_import="langchain_openai.ChatOpenAI")class ChatOpenAI(BaseChatModel):"""`OpenAI` Chat large language models API.diff --git a/libs/community/langchain_community/chat_models/vertexai.py b/libs/community/langchain_community/chat_models/vertexai.pyindex 32b126ef44..cecd63ac41 100644--- a/libs/community/langchain_community/chat_models/vertexai.py+++ b/libs/community/langchain_community/chat_models/vertexai.py@@ -9,6 +9,7 @@ from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Union, cafrom urllib.parse import urlparseimport requests+from langchain_core._api.deprecation import deprecatedfrom langchain_core.callbacks import (AsyncCallbackManagerForLLMRun,CallbackManagerForLLMRun,@@ -203,6 +204,11 @@ def _get_question(messages: List[BaseMessage]) -> HumanMessage:return question+@deprecated(+ since="0.0.12",+ removal="0.2.0",+ alternative_import="langchain_google_vertexai.ChatVertexAI",+)class ChatVertexAI(_VertexAICommon, BaseChatModel):"""`Vertex AI` Chat large language models API."""diff --git a/libs/community/langchain_community/embeddings/azure_openai.py b/libs/community/langchain_community/embeddings/azure_openai.pyindex da5ad573bb..ec90c76714 100644--- a/libs/community/langchain_community/embeddings/azure_openai.py+++ b/libs/community/langchain_community/embeddings/azure_openai.py@@ -14,7 +14,9 @@ from langchain_community.utils.openai import is_openai_v1@deprecated(- since="0.1.0", removal="0.2.0", alternative="langchain_openai.AzureOpenAIEmbeddings"+ since="0.1.0",+ removal="0.2.0",+ alternative_import="langchain_openai.AzureOpenAIEmbeddings",)class AzureOpenAIEmbeddings(OpenAIEmbeddings):"""`Azure OpenAI` Embeddings API."""diff --git a/libs/community/langchain_community/embeddings/openai.py b/libs/community/langchain_community/embeddings/openai.pyindex 8fc66519db..a459a872c0 100644--- a/libs/community/langchain_community/embeddings/openai.py+++ b/libs/community/langchain_community/embeddings/openai.py@@ -141,7 +141,7 @@ async def async_embed_with_retry(embeddings: OpenAIEmbeddings, **kwargs: Any) ->@deprecated(since="0.1.0",removal="0.2.0",- alternative="langchain_openai.OpenAIEmbeddings",+ alternative_import="langchain_openai.OpenAIEmbeddings",)class OpenAIEmbeddings(BaseModel, Embeddings):"""OpenAI embedding models.diff --git a/libs/community/langchain_community/embeddings/vertexai.py b/libs/community/langchain_community/embeddings/vertexai.pyindex 821708a782..e0f0834587 100644--- a/libs/community/langchain_community/embeddings/vertexai.py+++ b/libs/community/langchain_community/embeddings/vertexai.py@@ -5,6 +5,7 @@ import threadingfrom concurrent.futures import ThreadPoolExecutor, waitfrom typing import Any, Dict, List, Literal, Optional, Tuple+from langchain_core._api.deprecation import deprecatedfrom langchain_core.embeddings import Embeddingsfrom langchain_core.language_models.llms import create_base_retry_decoratorfrom langchain_core.pydantic_v1 import root_validator@@ -19,6 +20,11 @@ _MAX_BATCH_SIZE = 250_MIN_BATCH_SIZE = 5+@deprecated(+ since="0.0.12",+ removal="0.2.0",+ alternative_import="langchain_google_vertexai.VertexAIEmbeddings",+)class VertexAIEmbeddings(_VertexAICommon, Embeddings):"""Google Cloud VertexAI embedding models."""diff --git a/libs/community/langchain_community/llms/google_palm.py b/libs/community/langchain_community/llms/google_palm.pyindex 8f4f1614e2..08946bbbfb 100644--- a/libs/community/langchain_community/llms/google_palm.py+++ b/libs/community/langchain_community/llms/google_palm.py@@ -59,7 +59,7 @@ def _strip_erroneous_leading_spaces(text: str) -> str:return text-@deprecated("0.0.351", alternative="langchain_google_genai.GoogleGenerativeAI")+@deprecated("0.0.351", alternative_import="langchain_google_genai.GoogleGenerativeAI")class GooglePalm(BaseLLM, BaseModel):"""DEPRECATED: Use `langchain_google_genai.GoogleGenerativeAI` instead.diff --git a/libs/community/langchain_community/llms/openai.py b/libs/community/langchain_community/llms/openai.pyindex ca6338bd79..d9eb6b5d36 100644--- a/libs/community/langchain_community/llms/openai.py+++ b/libs/community/langchain_community/llms/openai.py@@ -726,16 +726,7 @@ class BaseOpenAI(BaseLLM):@deprecated(- since="0.0.10",- removal="0.2.0",- message=(- "The class langchain_community.llms.openai.OpenAI was "- "deprecated in langchain-community 0.0.10 and will be removed in "- "langchain-community 0.2.0. An updated version of the class lives in the "- "langchain-openai package and should be used instead. To use it run "- "`pip install -U langchain-openai` and import as "- "`from langchain_openai import OpenAI`."- ),+ since="0.0.10", removal="0.2.0", alternative_import="langchain_openai.OpenAI")class OpenAI(BaseOpenAI):"""OpenAI large language models.@@ -764,16 +755,7 @@ class OpenAI(BaseOpenAI):@deprecated(- since="0.0.10",- removal="0.2.0",- message=(- "The class langchain_community.llms.openai.AzureOpenAI was "- "deprecated in langchain-community 0.0.10 and will be removed in "- "langchain-community 0.2.0. An updated version of the class lives in the "- "langchain-openai package and should be used instead. To use it run "- "`pip install -U langchain-openai` and import as "- "`from langchain_openai import AzureOpenAI`."- ),+ since="0.0.10", removal="0.2.0", alternative_import="langchain_openai.AzureOpenAI")class AzureOpenAI(BaseOpenAI):"""Azure-specific OpenAI large language models.@@ -981,14 +963,7 @@ class AzureOpenAI(BaseOpenAI):@deprecated(since="0.0.1",removal="0.2.0",- message=(- "The class langchain_community.llms.openai.OpenAIChat was "- "deprecated in langchain-community 0.0.1 and will be removed in "- "langchain-community 0.2.0. An updated version of the class lives in the "- "langchain-openai package and should be used instead. To use it run "- "`pip install -U langchain-openai` and import as "- "`from langchain_openai import ChatOpenAI`."- ),+ alternative_import="langchain_openai.ChatOpenAI",)class OpenAIChat(BaseLLM):"""OpenAI Chat large language models.diff --git a/libs/community/langchain_community/llms/vertexai.py b/libs/community/langchain_community/llms/vertexai.pyindex 22bace0d7b..3833bbd785 100644--- a/libs/community/langchain_community/llms/vertexai.py+++ b/libs/community/langchain_community/llms/vertexai.py@@ -3,6 +3,7 @@ from __future__ import annotationsfrom concurrent.futures import Executor, ThreadPoolExecutorfrom typing import TYPE_CHECKING, Any, ClassVar, Dict, Iterator, List, Optional, Union+from langchain_core._api.deprecation import deprecatedfrom langchain_core.callbacks.manager import (AsyncCallbackManagerForLLMRun,CallbackManagerForLLMRun,@@ -200,6 +201,11 @@ class _VertexAICommon(_VertexAIBase):return params+@deprecated(+ since="0.0.12",+ removal="0.2.0",+ alternative_import="langchain_google_vertexai.VertexAI",+)class VertexAI(_VertexAICommon, BaseLLM):"""Google Vertex AI large language models."""@@ -385,6 +391,11 @@ class VertexAI(_VertexAICommon, BaseLLM):)+@deprecated(+ since="0.0.12",+ removal="0.2.0",+ alternative_import="langchain_google_vertexai.VertexAIModelGarden",+)class VertexAIModelGarden(_VertexAIBase, BaseLLM):"""Large language models served from Vertex AI Model Garden."""diff --git a/libs/community/poetry.lock b/libs/community/poetry.lockindex 1f783bb3ef..db439c0232 100644--- a/libs/community/poetry.lock+++ b/libs/community/poetry.lock@@ -3881,7 +3881,7 @@ files = [[[package]]name = "langchain-core"-version = "0.1.8"+version = "0.1.9"description = "Building applications with LLMs through composability"optional = falsepython-versions = ">=3.8.1,<4.0"@@ -9144,4 +9144,4 @@ extended-testing = ["aiosqlite", "aleph-alpha-client", "anthropic", "arxiv", "as[metadata]lock-version = "2.0"python-versions = ">=3.8.1,<4.0"-content-hash = "a3765004062afc80420d49d782e3e023aec1707bf35ae2f808d88a1cac53b694"+content-hash = "edadd024e8b2b4a817a90336013a1d92be102d03d4c41fbf5ac137f16d97fdfb"diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.tomlindex e47a39b2ff..cbb879676d 100644--- a/libs/community/pyproject.toml+++ b/libs/community/pyproject.toml@@ -9,7 +9,7 @@ repository = "https://github.com/langchain-ai/langchain"[tool.poetry.dependencies]python = ">=3.8.1,<4.0"-langchain-core = ">=0.1.8,<0.2"+langchain-core = ">=0.1.9,<0.2"SQLAlchemy = ">=1.4,<3"requests = "^2"PyYAML = ">=5.3"