diff --git a/libs/community/langchain_community/cache.py b/libs/community/langchain_community/cache.py index 91509c07578..094dc3377c6 100644 --- a/libs/community/langchain_community/cache.py +++ b/libs/community/langchain_community/cache.py @@ -1526,7 +1526,7 @@ ASTRA_DB_CACHE_DEFAULT_COLLECTION_NAME = "langchain_astradb_cache" @deprecated( since="0.0.28", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBCache", ) class AstraDBCache(BaseCache): @@ -1731,7 +1731,7 @@ def _async_lru_cache(maxsize: int = 128, typed: bool = False) -> Callable: @deprecated( since="0.0.28", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBSemanticCache", ) class AstraDBSemanticCache(BaseCache): diff --git a/libs/community/langchain_community/chat_loaders/gmail.py b/libs/community/langchain_community/chat_loaders/gmail.py index e7aa64028d7..a1fac6ac889 100644 --- a/libs/community/langchain_community/chat_loaders/gmail.py +++ b/libs/community/langchain_community/chat_loaders/gmail.py @@ -65,7 +65,7 @@ def _get_message_data(service: Any, message: Any) -> ChatSession: @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GMailLoader", ) class GMailLoader(BaseChatLoader): diff --git a/libs/community/langchain_community/chat_message_histories/astradb.py b/libs/community/langchain_community/chat_message_histories/astradb.py index 0ef040fcee9..0d9418952a8 100644 --- a/libs/community/langchain_community/chat_message_histories/astradb.py +++ b/libs/community/langchain_community/chat_message_histories/astradb.py @@ -26,7 +26,7 @@ DEFAULT_COLLECTION_NAME = "langchain_message_store" @deprecated( since="0.0.25", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBChatMessageHistory", ) class AstraDBChatMessageHistory(BaseChatMessageHistory): diff --git a/libs/community/langchain_community/chat_message_histories/mongodb.py b/libs/community/langchain_community/chat_message_histories/mongodb.py index f9e1e93db61..f93ee5c1306 100644 --- a/libs/community/langchain_community/chat_message_histories/mongodb.py +++ b/libs/community/langchain_community/chat_message_histories/mongodb.py @@ -18,7 +18,7 @@ DEFAULT_COLLECTION_NAME = "message_store" @deprecated( since="0.0.25", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_mongodb.MongoDBChatMessageHistory", ) class MongoDBChatMessageHistory(BaseChatMessageHistory): diff --git a/libs/community/langchain_community/chat_models/anthropic.py b/libs/community/langchain_community/chat_models/anthropic.py index d3018161083..e20b142c67d 100644 --- a/libs/community/langchain_community/chat_models/anthropic.py +++ b/libs/community/langchain_community/chat_models/anthropic.py @@ -73,7 +73,7 @@ def convert_messages_to_prompt_anthropic( @deprecated( since="0.0.28", - removal="0.2", + removal="0.3", alternative_import="langchain_anthropic.ChatAnthropic", ) class ChatAnthropic(BaseChatModel, _AnthropicCommon): diff --git a/libs/community/langchain_community/chat_models/azure_openai.py b/libs/community/langchain_community/chat_models/azure_openai.py index 0db36ad947f..3834668c1f9 100644 --- a/libs/community/langchain_community/chat_models/azure_openai.py +++ b/libs/community/langchain_community/chat_models/azure_openai.py @@ -19,7 +19,7 @@ logger = logging.getLogger(__name__) @deprecated( since="0.0.10", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_openai.AzureChatOpenAI", ) class AzureChatOpenAI(ChatOpenAI): diff --git a/libs/community/langchain_community/chat_models/cohere.py b/libs/community/langchain_community/chat_models/cohere.py index 2ea44328a71..8d6b6665ad0 100644 --- a/libs/community/langchain_community/chat_models/cohere.py +++ b/libs/community/langchain_community/chat_models/cohere.py @@ -96,7 +96,7 @@ def get_cohere_chat_request( @deprecated( - since="0.0.30", removal="0.2.0", alternative_import="langchain_cohere.ChatCohere" + since="0.0.30", removal="0.3.0", alternative_import="langchain_cohere.ChatCohere" ) class ChatCohere(BaseChatModel, BaseCohere): """`Cohere` chat large language models. diff --git a/libs/community/langchain_community/chat_models/fireworks.py b/libs/community/langchain_community/chat_models/fireworks.py index 3de28798939..106ea7e921d 100644 --- a/libs/community/langchain_community/chat_models/fireworks.py +++ b/libs/community/langchain_community/chat_models/fireworks.py @@ -81,7 +81,7 @@ def convert_dict_to_message(_dict: Any) -> BaseMessage: @deprecated( since="0.0.26", - removal="0.2", + removal="0.3", alternative_import="langchain_fireworks.ChatFireworks", ) class ChatFireworks(BaseChatModel): diff --git a/libs/community/langchain_community/chat_models/openai.py b/libs/community/langchain_community/chat_models/openai.py index 7fc41371616..694d2e0661a 100644 --- a/libs/community/langchain_community/chat_models/openai.py +++ b/libs/community/langchain_community/chat_models/openai.py @@ -145,7 +145,7 @@ def _convert_delta_to_message_chunk( @deprecated( - since="0.0.10", removal="0.2.0", alternative_import="langchain_openai.ChatOpenAI" + since="0.0.10", removal="0.3.0", alternative_import="langchain_openai.ChatOpenAI" ) class ChatOpenAI(BaseChatModel): """`OpenAI` Chat large language models API. diff --git a/libs/community/langchain_community/chat_models/solar.py b/libs/community/langchain_community/chat_models/solar.py index e0299a7588c..312e4a992b7 100644 --- a/libs/community/langchain_community/chat_models/solar.py +++ b/libs/community/langchain_community/chat_models/solar.py @@ -11,7 +11,7 @@ from langchain_community.llms.solar import SOLAR_SERVICE_URL_BASE, SolarCommon @deprecated( - since="0.0.34", removal="0.2.0", alternative_import="langchain_upstage.ChatUpstage" + since="0.0.34", removal="0.3.0", alternative_import="langchain_upstage.ChatUpstage" ) class SolarChat(SolarCommon, ChatOpenAI): """Wrapper around Solar large language models. diff --git a/libs/community/langchain_community/chat_models/vertexai.py b/libs/community/langchain_community/chat_models/vertexai.py index ec9d887f171..9b5d78a0a8c 100644 --- a/libs/community/langchain_community/chat_models/vertexai.py +++ b/libs/community/langchain_community/chat_models/vertexai.py @@ -205,7 +205,7 @@ def _get_question(messages: List[BaseMessage]) -> HumanMessage: @deprecated( since="0.0.12", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_vertexai.ChatVertexAI", ) class ChatVertexAI(_VertexAICommon, BaseChatModel): diff --git a/libs/community/langchain_community/document_loaders/astradb.py b/libs/community/langchain_community/document_loaders/astradb.py index 2898f2eaec2..a0b4cfe2e7d 100644 --- a/libs/community/langchain_community/document_loaders/astradb.py +++ b/libs/community/langchain_community/document_loaders/astradb.py @@ -27,7 +27,7 @@ logger = logging.getLogger(__name__) @deprecated( since="0.0.29", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBLoader", ) class AstraDBLoader(BaseLoader): diff --git a/libs/community/langchain_community/document_loaders/bigquery.py b/libs/community/langchain_community/document_loaders/bigquery.py index 0d809ce53f2..770a7c6dc4c 100644 --- a/libs/community/langchain_community/document_loaders/bigquery.py +++ b/libs/community/langchain_community/document_loaders/bigquery.py @@ -14,7 +14,7 @@ if TYPE_CHECKING: @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.BigQueryLoader", ) class BigQueryLoader(BaseLoader): diff --git a/libs/community/langchain_community/document_loaders/docugami.py b/libs/community/langchain_community/document_loaders/docugami.py index e7256e9685d..fbbda405f90 100644 --- a/libs/community/langchain_community/document_loaders/docugami.py +++ b/libs/community/langchain_community/document_loaders/docugami.py @@ -29,7 +29,7 @@ logger = logging.getLogger(__name__) @deprecated( since="0.0.24", - removal="0.2.0", + removal="0.3.0", alternative_import="docugami_langchain.DocugamiLoader", ) class DocugamiLoader(BaseLoader, BaseModel): diff --git a/libs/community/langchain_community/document_loaders/gcs_directory.py b/libs/community/langchain_community/document_loaders/gcs_directory.py index 570afd0a1c6..aa28ab73151 100644 --- a/libs/community/langchain_community/document_loaders/gcs_directory.py +++ b/libs/community/langchain_community/document_loaders/gcs_directory.py @@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GCSDirectoryLoader", ) class GCSDirectoryLoader(BaseLoader): diff --git a/libs/community/langchain_community/document_loaders/gcs_file.py b/libs/community/langchain_community/document_loaders/gcs_file.py index 26993f61258..7e112cc7ddd 100644 --- a/libs/community/langchain_community/document_loaders/gcs_file.py +++ b/libs/community/langchain_community/document_loaders/gcs_file.py @@ -12,7 +12,7 @@ from langchain_community.utilities.vertexai import get_client_info @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GCSFileLoader", ) class GCSFileLoader(BaseLoader): diff --git a/libs/community/langchain_community/document_loaders/google_speech_to_text.py b/libs/community/langchain_community/document_loaders/google_speech_to_text.py index c90e1e7a02b..28acc9d8927 100644 --- a/libs/community/langchain_community/document_loaders/google_speech_to_text.py +++ b/libs/community/langchain_community/document_loaders/google_speech_to_text.py @@ -15,7 +15,7 @@ if TYPE_CHECKING: @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.SpeechToTextLoader", ) class GoogleSpeechToTextLoader(BaseLoader): diff --git a/libs/community/langchain_community/document_loaders/googledrive.py b/libs/community/langchain_community/document_loaders/googledrive.py index 581c4285b29..4e51b71cc63 100644 --- a/libs/community/langchain_community/document_loaders/googledrive.py +++ b/libs/community/langchain_community/document_loaders/googledrive.py @@ -22,7 +22,7 @@ SCOPES = ["https://www.googleapis.com/auth/drive.readonly"] @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GoogleDriveLoader", ) class GoogleDriveLoader(BaseLoader, BaseModel): diff --git a/libs/community/langchain_community/document_loaders/parsers/docai.py b/libs/community/langchain_community/document_loaders/parsers/docai.py index b5861de54cd..9638b5e3aea 100644 --- a/libs/community/langchain_community/document_loaders/parsers/docai.py +++ b/libs/community/langchain_community/document_loaders/parsers/docai.py @@ -36,7 +36,7 @@ class DocAIParsingResults: @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.DocAIParser", ) class DocAIParser(BaseBlobParser): diff --git a/libs/community/langchain_community/document_transformers/google_translate.py b/libs/community/langchain_community/document_transformers/google_translate.py index d21cfd47de8..21fd27911d6 100644 --- a/libs/community/langchain_community/document_transformers/google_translate.py +++ b/libs/community/langchain_community/document_transformers/google_translate.py @@ -8,7 +8,7 @@ from langchain_community.utilities.vertexai import get_client_info @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.DocAIParser", ) class GoogleTranslateTransformer(BaseDocumentTransformer): diff --git a/libs/community/langchain_community/embeddings/azure_openai.py b/libs/community/langchain_community/embeddings/azure_openai.py index db23dfc8271..c8eb14ddac6 100644 --- a/libs/community/langchain_community/embeddings/azure_openai.py +++ b/libs/community/langchain_community/embeddings/azure_openai.py @@ -16,7 +16,7 @@ from langchain_community.utils.openai import is_openai_v1 @deprecated( since="0.0.9", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_openai.AzureOpenAIEmbeddings", ) class AzureOpenAIEmbeddings(OpenAIEmbeddings): diff --git a/libs/community/langchain_community/embeddings/cohere.py b/libs/community/langchain_community/embeddings/cohere.py index 99219a16bc9..eafc7fcbe9a 100644 --- a/libs/community/langchain_community/embeddings/cohere.py +++ b/libs/community/langchain_community/embeddings/cohere.py @@ -10,7 +10,7 @@ from langchain_community.llms.cohere import _create_retry_decorator @deprecated( since="0.0.30", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_cohere.CohereEmbeddings", ) class CohereEmbeddings(BaseModel, Embeddings): diff --git a/libs/community/langchain_community/embeddings/openai.py b/libs/community/langchain_community/embeddings/openai.py index 74de76608ee..3edff9055e8 100644 --- a/libs/community/langchain_community/embeddings/openai.py +++ b/libs/community/langchain_community/embeddings/openai.py @@ -140,7 +140,7 @@ async def async_embed_with_retry(embeddings: OpenAIEmbeddings, **kwargs: Any) -> @deprecated( since="0.0.9", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_openai.OpenAIEmbeddings", ) class OpenAIEmbeddings(BaseModel, Embeddings): diff --git a/libs/community/langchain_community/embeddings/solar.py b/libs/community/langchain_community/embeddings/solar.py index 3dfb8643117..d7e05df0962 100644 --- a/libs/community/langchain_community/embeddings/solar.py +++ b/libs/community/langchain_community/embeddings/solar.py @@ -46,7 +46,7 @@ def embed_with_retry(embeddings: SolarEmbeddings, *args: Any, **kwargs: Any) -> @deprecated( - since="0.0.34", removal="0.2.0", alternative_import="langchain_upstage.ChatUpstage" + since="0.0.34", removal="0.3.0", alternative_import="langchain_upstage.ChatUpstage" ) class SolarEmbeddings(BaseModel, Embeddings): """Solar's embedding service. diff --git a/libs/community/langchain_community/embeddings/vertexai.py b/libs/community/langchain_community/embeddings/vertexai.py index 3b6677d664d..4328a4816be 100644 --- a/libs/community/langchain_community/embeddings/vertexai.py +++ b/libs/community/langchain_community/embeddings/vertexai.py @@ -22,7 +22,7 @@ _MIN_BATCH_SIZE = 5 @deprecated( since="0.0.12", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_vertexai.VertexAIEmbeddings", ) class VertexAIEmbeddings(_VertexAICommon, Embeddings): diff --git a/libs/community/langchain_community/embeddings/voyageai.py b/libs/community/langchain_community/embeddings/voyageai.py index 81eb03345f0..ad5ae045dfa 100644 --- a/libs/community/langchain_community/embeddings/voyageai.py +++ b/libs/community/langchain_community/embeddings/voyageai.py @@ -61,7 +61,7 @@ def embed_with_retry(embeddings: VoyageEmbeddings, **kwargs: Any) -> Any: @deprecated( since="0.0.29", - removal="0.2", + removal="0.3", alternative_import="langchain_voyageai.VoyageAIEmbeddings", ) class VoyageEmbeddings(BaseModel, Embeddings): diff --git a/libs/community/langchain_community/llms/__init__.py b/libs/community/langchain_community/llms/__init__.py index 5b6adb5c49f..f2b115cb9b2 100644 --- a/libs/community/langchain_community/llms/__init__.py +++ b/libs/community/langchain_community/llms/__init__.py @@ -172,7 +172,7 @@ def _import_databricks() -> Type[BaseLLM]: def _import_databricks_chat() -> Any: warn_deprecated( since="0.0.22", - removal="0.2", + removal="0.3", alternative_import="langchain_community.chat_models.ChatDatabricks", ) from langchain_community.chat_models.databricks import ChatDatabricks @@ -342,7 +342,7 @@ def _import_mlflow() -> Type[BaseLLM]: def _import_mlflow_chat() -> Any: warn_deprecated( since="0.0.22", - removal="0.2", + removal="0.3", alternative_import="langchain_community.chat_models.ChatMlflow", ) from langchain_community.chat_models.mlflow import ChatMlflow diff --git a/libs/community/langchain_community/llms/anthropic.py b/libs/community/langchain_community/llms/anthropic.py index 05a2582f1cf..8daf3fccabd 100644 --- a/libs/community/langchain_community/llms/anthropic.py +++ b/libs/community/langchain_community/llms/anthropic.py @@ -150,7 +150,7 @@ class _AnthropicCommon(BaseLanguageModel): @deprecated( since="0.0.28", - removal="0.2", + removal="0.3", alternative_import="langchain_anthropic.AnthropicLLM", ) class Anthropic(LLM, _AnthropicCommon): diff --git a/libs/community/langchain_community/llms/cohere.py b/libs/community/langchain_community/llms/cohere.py index 17960b2dee8..02e505e2fbe 100644 --- a/libs/community/langchain_community/llms/cohere.py +++ b/libs/community/langchain_community/llms/cohere.py @@ -71,7 +71,7 @@ def acompletion_with_retry(llm: Cohere, **kwargs: Any) -> Any: @deprecated( - since="0.0.30", removal="0.2.0", alternative_import="langchain_cohere.BaseCohere" + since="0.0.30", removal="0.3.0", alternative_import="langchain_cohere.BaseCohere" ) class BaseCohere(Serializable): """Base class for Cohere models.""" @@ -122,7 +122,7 @@ class BaseCohere(Serializable): @deprecated( - since="0.1.14", removal="0.2.0", alternative_import="langchain_cohere.Cohere" + since="0.1.14", removal="0.3.0", alternative_import="langchain_cohere.Cohere" ) class Cohere(LLM, BaseCohere): """Cohere large language models. diff --git a/libs/community/langchain_community/llms/fireworks.py b/libs/community/langchain_community/llms/fireworks.py index 1bf40264d59..a2ecc74c3f3 100644 --- a/libs/community/langchain_community/llms/fireworks.py +++ b/libs/community/langchain_community/llms/fireworks.py @@ -29,7 +29,7 @@ def _stream_response_to_generation_chunk( @deprecated( since="0.0.26", - removal="0.2", + removal="0.3", alternative_import="langchain_fireworks.Fireworks", ) class Fireworks(BaseLLM): diff --git a/libs/community/langchain_community/llms/huggingface_hub.py b/libs/community/langchain_community/llms/huggingface_hub.py index fb8b46011fa..58eeeb1c717 100644 --- a/libs/community/langchain_community/llms/huggingface_hub.py +++ b/libs/community/langchain_community/llms/huggingface_hub.py @@ -20,7 +20,7 @@ VALID_TASKS_DICT = { } -@deprecated("0.0.21", removal="0.2.0", alternative="HuggingFaceEndpoint") +@deprecated("0.0.21", removal="0.3.0", alternative="HuggingFaceEndpoint") class HuggingFaceHub(LLM): """HuggingFaceHub models. ! This class is deprecated, you should use HuggingFaceEndpoint instead. diff --git a/libs/community/langchain_community/llms/huggingface_text_gen_inference.py b/libs/community/langchain_community/llms/huggingface_text_gen_inference.py index 17aadec2dfa..46af5a83033 100644 --- a/libs/community/langchain_community/llms/huggingface_text_gen_inference.py +++ b/libs/community/langchain_community/llms/huggingface_text_gen_inference.py @@ -14,7 +14,7 @@ from langchain_core.utils import get_pydantic_field_names logger = logging.getLogger(__name__) -@deprecated("0.0.21", removal="0.2.0", alternative="HuggingFaceEndpoint") +@deprecated("0.0.21", removal="0.3.0", alternative="HuggingFaceEndpoint") class HuggingFaceTextGenInference(LLM): """ HuggingFace text generation API. diff --git a/libs/community/langchain_community/llms/openai.py b/libs/community/langchain_community/llms/openai.py index 56ca15dda74..973b92eb5ae 100644 --- a/libs/community/langchain_community/llms/openai.py +++ b/libs/community/langchain_community/llms/openai.py @@ -726,7 +726,7 @@ class BaseOpenAI(BaseLLM): @deprecated( - since="0.0.10", removal="0.2.0", alternative_import="langchain_openai.OpenAI" + since="0.0.10", removal="0.3.0", alternative_import="langchain_openai.OpenAI" ) class OpenAI(BaseOpenAI): """OpenAI large language models. @@ -755,7 +755,7 @@ class OpenAI(BaseOpenAI): @deprecated( - since="0.0.10", removal="0.2.0", alternative_import="langchain_openai.AzureOpenAI" + since="0.0.10", removal="0.3.0", alternative_import="langchain_openai.AzureOpenAI" ) class AzureOpenAI(BaseOpenAI): """Azure-specific OpenAI large language models. @@ -963,7 +963,7 @@ class AzureOpenAI(BaseOpenAI): @deprecated( since="0.0.1", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_openai.ChatOpenAI", ) class OpenAIChat(BaseLLM): diff --git a/libs/community/langchain_community/llms/together.py b/libs/community/langchain_community/llms/together.py index 1454bb4b6d6..602ec16a3a7 100644 --- a/libs/community/langchain_community/llms/together.py +++ b/libs/community/langchain_community/llms/together.py @@ -18,7 +18,7 @@ logger = logging.getLogger(__name__) @deprecated( - since="0.0.12", removal="0.2", alternative_import="langchain_together.Together" + since="0.0.12", removal="0.3", alternative_import="langchain_together.Together" ) class Together(LLM): """LLM models from `Together`. diff --git a/libs/community/langchain_community/llms/vertexai.py b/libs/community/langchain_community/llms/vertexai.py index b8ba8c54f28..31fd77600fb 100644 --- a/libs/community/langchain_community/llms/vertexai.py +++ b/libs/community/langchain_community/llms/vertexai.py @@ -203,7 +203,7 @@ class _VertexAICommon(_VertexAIBase): @deprecated( since="0.0.12", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_vertexai.VertexAI", ) class VertexAI(_VertexAICommon, BaseLLM): @@ -393,7 +393,7 @@ class VertexAI(_VertexAICommon, BaseLLM): @deprecated( since="0.0.12", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_vertexai.VertexAIModelGarden", ) class VertexAIModelGarden(_VertexAIBase, BaseLLM): diff --git a/libs/community/langchain_community/llms/watsonxllm.py b/libs/community/langchain_community/llms/watsonxllm.py index b18f224cd9b..53255f17116 100644 --- a/libs/community/langchain_community/llms/watsonxllm.py +++ b/libs/community/langchain_community/llms/watsonxllm.py @@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) @deprecated( - since="0.0.18", removal="0.2", alternative_import="langchain_ibm.WatsonxLLM" + since="0.0.18", removal="0.3", alternative_import="langchain_ibm.WatsonxLLM" ) class WatsonxLLM(BaseLLM): """ diff --git a/libs/community/langchain_community/retrievers/cohere_rag_retriever.py b/libs/community/langchain_community/retrievers/cohere_rag_retriever.py index f0e29a7fc3a..5ab149d07ed 100644 --- a/libs/community/langchain_community/retrievers/cohere_rag_retriever.py +++ b/libs/community/langchain_community/retrievers/cohere_rag_retriever.py @@ -43,7 +43,7 @@ def _get_docs(response: Any) -> List[Document]: @deprecated( since="0.0.30", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_cohere.CohereRagRetriever", ) class CohereRagRetriever(BaseRetriever): diff --git a/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py b/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py index dae28d211f2..e0a403b87e2 100644 --- a/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py +++ b/libs/community/langchain_community/retrievers/google_cloud_documentai_warehouse.py @@ -24,7 +24,7 @@ if TYPE_CHECKING: @deprecated( since="0.0.32", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.DocumentAIWarehouseRetriever", ) class GoogleDocumentAIWarehouseRetriever(BaseRetriever): diff --git a/libs/community/langchain_community/retrievers/google_vertex_ai_search.py b/libs/community/langchain_community/retrievers/google_vertex_ai_search.py index fc7b396dfd0..7c4351bc3cd 100644 --- a/libs/community/langchain_community/retrievers/google_vertex_ai_search.py +++ b/libs/community/langchain_community/retrievers/google_vertex_ai_search.py @@ -198,7 +198,7 @@ class _BaseGoogleVertexAISearchRetriever(BaseModel): @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.VertexAISearchRetriever", ) class GoogleVertexAISearchRetriever(BaseRetriever, _BaseGoogleVertexAISearchRetriever): @@ -398,7 +398,7 @@ class GoogleVertexAISearchRetriever(BaseRetriever, _BaseGoogleVertexAISearchRetr @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.VertexAIMultiTurnSearchRetriever", ) class GoogleVertexAIMultiTurnSearchRetriever( diff --git a/libs/community/langchain_community/storage/astradb.py b/libs/community/langchain_community/storage/astradb.py index 86be2ab9b83..a8808c48edc 100644 --- a/libs/community/langchain_community/storage/astradb.py +++ b/libs/community/langchain_community/storage/astradb.py @@ -99,7 +99,7 @@ class AstraDBBaseStore(Generic[V], BaseStore[str, V], ABC): @deprecated( since="0.0.22", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBStore", ) class AstraDBStore(AstraDBBaseStore[Any]): @@ -167,7 +167,7 @@ class AstraDBStore(AstraDBBaseStore[Any]): @deprecated( since="0.0.22", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBByteStore", ) class AstraDBByteStore(AstraDBBaseStore[bytes], ByteStore): diff --git a/libs/community/langchain_community/tools/google_cloud/texttospeech.py b/libs/community/langchain_community/tools/google_cloud/texttospeech.py index cccc3f5cc4a..6d637f4d637 100644 --- a/libs/community/langchain_community/tools/google_cloud/texttospeech.py +++ b/libs/community/langchain_community/tools/google_cloud/texttospeech.py @@ -39,7 +39,7 @@ def _encoding_file_extension_map(encoding: texttospeech.AudioEncoding) -> Option @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.TextToSpeechTool", ) class GoogleCloudTextToSpeechTool(BaseTool): diff --git a/libs/community/langchain_community/tools/google_places/tool.py b/libs/community/langchain_community/tools/google_places/tool.py index 9e09744ab00..729d11a4f9f 100644 --- a/libs/community/langchain_community/tools/google_places/tool.py +++ b/libs/community/langchain_community/tools/google_places/tool.py @@ -18,7 +18,7 @@ class GooglePlacesSchema(BaseModel): @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GooglePlacesTool", ) class GooglePlacesTool(BaseTool): diff --git a/libs/community/langchain_community/tools/google_search/tool.py b/libs/community/langchain_community/tools/google_search/tool.py index 5be24c0b0c6..9afc24c9e14 100644 --- a/libs/community/langchain_community/tools/google_search/tool.py +++ b/libs/community/langchain_community/tools/google_search/tool.py @@ -11,7 +11,7 @@ from langchain_community.utilities.google_search import GoogleSearchAPIWrapper @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GoogleSearchRun", ) class GoogleSearchRun(BaseTool): @@ -36,7 +36,7 @@ class GoogleSearchRun(BaseTool): @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GoogleSearchResults", ) class GoogleSearchResults(BaseTool): diff --git a/libs/community/langchain_community/tools/metaphor_search/tool.py b/libs/community/langchain_community/tools/metaphor_search/tool.py index 667c711ee40..eac2bddc71c 100644 --- a/libs/community/langchain_community/tools/metaphor_search/tool.py +++ b/libs/community/langchain_community/tools/metaphor_search/tool.py @@ -14,7 +14,7 @@ from langchain_community.utilities.metaphor_search import MetaphorSearchAPIWrapp @deprecated( since="0.0.15", - removal="0.2.0", + removal="0.3.0", alternative="langchain_exa.ExaSearchResults", ) class MetaphorSearchResults(BaseTool): diff --git a/libs/community/langchain_community/utilities/google_places_api.py b/libs/community/langchain_community/utilities/google_places_api.py index 330486497d4..c5c8d0f6190 100644 --- a/libs/community/langchain_community/utilities/google_places_api.py +++ b/libs/community/langchain_community/utilities/google_places_api.py @@ -10,7 +10,7 @@ from langchain_core.utils import get_from_dict_or_env @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GooglePlacesAPIWrapper", ) class GooglePlacesAPIWrapper(BaseModel): diff --git a/libs/community/langchain_community/utilities/google_search.py b/libs/community/langchain_community/utilities/google_search.py index 7a6747060d2..68eae777123 100644 --- a/libs/community/langchain_community/utilities/google_search.py +++ b/libs/community/langchain_community/utilities/google_search.py @@ -9,7 +9,7 @@ from langchain_core.utils import get_from_dict_or_env @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.GoogleSearchAPIWrapper", ) class GoogleSearchAPIWrapper(BaseModel): diff --git a/libs/community/langchain_community/utilities/sql_database.py b/libs/community/langchain_community/utilities/sql_database.py index 015ae83be30..ace89c1d035 100644 --- a/libs/community/langchain_community/utilities/sql_database.py +++ b/libs/community/langchain_community/utilities/sql_database.py @@ -283,7 +283,7 @@ class SQLDatabase: return sorted(self._include_tables) return sorted(self._all_tables - self._ignore_tables) - @deprecated("0.0.1", alternative="get_usable_table_names", removal="0.2.0") + @deprecated("0.0.1", alternative="get_usable_table_names", removal="0.3.0") def get_table_names(self) -> Iterable[str]: """Get names of tables available.""" return self.get_usable_table_names() diff --git a/libs/community/langchain_community/vectorstores/astradb.py b/libs/community/langchain_community/vectorstores/astradb.py index 1bc45f7490b..54c619c7ebb 100644 --- a/libs/community/langchain_community/vectorstores/astradb.py +++ b/libs/community/langchain_community/vectorstores/astradb.py @@ -67,7 +67,7 @@ def _unique_list(lst: List[T], key: Callable[[T], U]) -> List[T]: @deprecated( since="0.0.21", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_astradb.AstraDBVectorStore", ) class AstraDB(VectorStore): diff --git a/libs/community/langchain_community/vectorstores/bigquery_vector_search.py b/libs/community/langchain_community/vectorstores/bigquery_vector_search.py index 2da8cc8dd22..9dd98f8c911 100644 --- a/libs/community/langchain_community/vectorstores/bigquery_vector_search.py +++ b/libs/community/langchain_community/vectorstores/bigquery_vector_search.py @@ -38,7 +38,7 @@ _vector_table_lock = Lock() # process-wide BigQueryVectorSearch table lock @deprecated( since="0.0.33", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_community.BigQueryVectorSearch", ) class BigQueryVectorSearch(VectorStore): diff --git a/libs/community/langchain_community/vectorstores/matching_engine.py b/libs/community/langchain_community/vectorstores/matching_engine.py index 9cae484009c..2cf8594e9fc 100644 --- a/libs/community/langchain_community/vectorstores/matching_engine.py +++ b/libs/community/langchain_community/vectorstores/matching_engine.py @@ -28,7 +28,7 @@ logger = logging.getLogger(__name__) @deprecated( since="0.0.12", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_google_vertexai.VectorSearchVectorStore", ) class MatchingEngine(VectorStore): diff --git a/libs/community/langchain_community/vectorstores/mongodb_atlas.py b/libs/community/langchain_community/vectorstores/mongodb_atlas.py index ae645568f99..dba27bb8dd8 100644 --- a/libs/community/langchain_community/vectorstores/mongodb_atlas.py +++ b/libs/community/langchain_community/vectorstores/mongodb_atlas.py @@ -35,7 +35,7 @@ DEFAULT_INSERT_BATCH_SIZE = 100 @deprecated( since="0.0.25", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_mongodb.MongoDBAtlasVectorSearch", ) class MongoDBAtlasVectorSearch(VectorStore): diff --git a/libs/community/langchain_community/vectorstores/pinecone.py b/libs/community/langchain_community/vectorstores/pinecone.py index a2a92d68f32..7e1233f8dcf 100644 --- a/libs/community/langchain_community/vectorstores/pinecone.py +++ b/libs/community/langchain_community/vectorstores/pinecone.py @@ -43,7 +43,7 @@ def _is_pinecone_v3() -> bool: @deprecated( - since="0.0.18", removal="0.2.0", alternative_import="langchain_pinecone.Pinecone" + since="0.0.18", removal="0.3.0", alternative_import="langchain_pinecone.Pinecone" ) class Pinecone(VectorStore): """`Pinecone` vector store. diff --git a/libs/core/langchain_core/language_models/base.py b/libs/core/langchain_core/language_models/base.py index a62809fbe9c..39ba2ba69b4 100644 --- a/libs/core/langchain_core/language_models/base.py +++ b/libs/core/langchain_core/language_models/base.py @@ -207,7 +207,7 @@ class BaseLanguageModel( """Implement this if there is a way of steering the model to generate responses that match a given schema.""" # noqa: E501 raise NotImplementedError() - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") @abstractmethod def predict( self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any @@ -228,7 +228,7 @@ class BaseLanguageModel( Top model prediction as a string. """ - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") @abstractmethod def predict_messages( self, @@ -253,7 +253,7 @@ class BaseLanguageModel( Top model prediction as a message. """ - @deprecated("0.1.7", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.7", alternative="ainvoke", removal="0.3.0") @abstractmethod async def apredict( self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any @@ -274,7 +274,7 @@ class BaseLanguageModel( Top model prediction as a string. """ - @deprecated("0.1.7", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.7", alternative="ainvoke", removal="0.3.0") @abstractmethod async def apredict_messages( self, diff --git a/libs/core/langchain_core/language_models/chat_models.py b/libs/core/langchain_core/language_models/chat_models.py index 0bf73646037..6abd5880553 100644 --- a/libs/core/langchain_core/language_models/chat_models.py +++ b/libs/core/langchain_core/language_models/chat_models.py @@ -797,7 +797,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): break yield item # type: ignore[misc] - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def __call__( self, messages: List[BaseMessage], @@ -829,13 +829,13 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): else: raise ValueError("Unexpected generation type") - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def call_as_llm( self, message: str, stop: Optional[List[str]] = None, **kwargs: Any ) -> str: return self.predict(message, stop=stop, **kwargs) - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def predict( self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any ) -> str: @@ -849,7 +849,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): else: raise ValueError("Cannot use predict when output is not a string.") - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def predict_messages( self, messages: List[BaseMessage], @@ -863,7 +863,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): _stop = list(stop) return self(messages, stop=_stop, **kwargs) - @deprecated("0.1.7", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.7", alternative="ainvoke", removal="0.3.0") async def apredict( self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any ) -> str: @@ -879,7 +879,7 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC): else: raise ValueError("Cannot use predict when output is not a string.") - @deprecated("0.1.7", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.7", alternative="ainvoke", removal="0.3.0") async def apredict_messages( self, messages: List[BaseMessage], diff --git a/libs/core/langchain_core/language_models/llms.py b/libs/core/langchain_core/language_models/llms.py index 7b0f8dfd390..6ec473c9c07 100644 --- a/libs/core/langchain_core/language_models/llms.py +++ b/libs/core/langchain_core/language_models/llms.py @@ -1064,7 +1064,7 @@ class BaseLLM(BaseLanguageModel[str], ABC): generations = [existing_prompts[i] for i in range(len(prompts))] return LLMResult(generations=generations, llm_output=llm_output, run=run_info) - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def __call__( self, prompt: str, @@ -1116,7 +1116,7 @@ class BaseLLM(BaseLanguageModel[str], ABC): ) return result.generations[0][0].text - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def predict( self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any ) -> str: @@ -1126,7 +1126,7 @@ class BaseLLM(BaseLanguageModel[str], ABC): _stop = list(stop) return self(text, stop=_stop, **kwargs) - @deprecated("0.1.7", alternative="invoke", removal="0.2.0") + @deprecated("0.1.7", alternative="invoke", removal="0.3.0") def predict_messages( self, messages: List[BaseMessage], @@ -1142,7 +1142,7 @@ class BaseLLM(BaseLanguageModel[str], ABC): content = self(text, stop=_stop, **kwargs) return AIMessage(content=content) - @deprecated("0.1.7", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.7", alternative="ainvoke", removal="0.3.0") async def apredict( self, text: str, *, stop: Optional[Sequence[str]] = None, **kwargs: Any ) -> str: @@ -1152,7 +1152,7 @@ class BaseLLM(BaseLanguageModel[str], ABC): _stop = list(stop) return await self._call_async(text, stop=_stop, **kwargs) - @deprecated("0.1.7", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.7", alternative="ainvoke", removal="0.3.0") async def apredict_messages( self, messages: List[BaseMessage], diff --git a/libs/core/langchain_core/tracers/schemas.py b/libs/core/langchain_core/tracers/schemas.py index b1b62f1d76b..56ab8a4c99c 100644 --- a/libs/core/langchain_core/tracers/schemas.py +++ b/libs/core/langchain_core/tracers/schemas.py @@ -14,7 +14,7 @@ from langchain_core.outputs import LLMResult from langchain_core.pydantic_v1 import BaseModel, Field, root_validator -@deprecated("0.1.0", alternative="Use string instead.", removal="0.2.0") +@deprecated("0.1.0", alternative="Use string instead.", removal="0.3.0") def RunTypeEnum() -> Type[RunTypeEnumDep]: """RunTypeEnum.""" warnings.warn( @@ -25,7 +25,7 @@ def RunTypeEnum() -> Type[RunTypeEnumDep]: return RunTypeEnumDep -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class TracerSessionV1Base(BaseModel): """Base class for TracerSessionV1.""" @@ -34,33 +34,33 @@ class TracerSessionV1Base(BaseModel): extra: Optional[Dict[str, Any]] = None -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class TracerSessionV1Create(TracerSessionV1Base): """Create class for TracerSessionV1.""" -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class TracerSessionV1(TracerSessionV1Base): """TracerSessionV1 schema.""" id: int -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class TracerSessionBase(TracerSessionV1Base): """Base class for TracerSession.""" tenant_id: UUID -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class TracerSession(TracerSessionBase): """TracerSessionV1 schema for the V2 API.""" id: UUID -@deprecated("0.1.0", alternative="Run", removal="0.2.0") +@deprecated("0.1.0", alternative="Run", removal="0.3.0") class BaseRun(BaseModel): """Base class for Run.""" @@ -76,7 +76,7 @@ class BaseRun(BaseModel): error: Optional[str] = None -@deprecated("0.1.0", alternative="Run", removal="0.2.0") +@deprecated("0.1.0", alternative="Run", removal="0.3.0") class LLMRun(BaseRun): """Class for LLMRun.""" @@ -84,7 +84,7 @@ class LLMRun(BaseRun): response: Optional[LLMResult] = None -@deprecated("0.1.0", alternative="Run", removal="0.2.0") +@deprecated("0.1.0", alternative="Run", removal="0.3.0") class ChainRun(BaseRun): """Class for ChainRun.""" @@ -95,7 +95,7 @@ class ChainRun(BaseRun): child_tool_runs: List[ToolRun] = Field(default_factory=list) -@deprecated("0.1.0", alternative="Run", removal="0.2.0") +@deprecated("0.1.0", alternative="Run", removal="0.3.0") class ToolRun(BaseRun): """Class for ToolRun.""" diff --git a/libs/core/langchain_core/utils/function_calling.py b/libs/core/langchain_core/utils/function_calling.py index b2b380e2016..ead26d66aa8 100644 --- a/libs/core/langchain_core/utils/function_calling.py +++ b/libs/core/langchain_core/utils/function_calling.py @@ -78,7 +78,7 @@ def _rm_titles(kv: dict, prev_key: str = "") -> dict: @deprecated( "0.1.16", alternative="langchain_core.utils.function_calling.convert_to_openai_function()", - removal="0.2.0", + removal="0.3.0", ) def convert_pydantic_to_openai_function( model: Type[BaseModel], @@ -102,7 +102,7 @@ def convert_pydantic_to_openai_function( @deprecated( "0.1.16", alternative="langchain_core.utils.function_calling.convert_to_openai_tool()", - removal="0.2.0", + removal="0.3.0", ) def convert_pydantic_to_openai_tool( model: Type[BaseModel], @@ -213,7 +213,7 @@ def _get_python_function_required_args(function: Callable) -> List[str]: @deprecated( "0.1.16", alternative="langchain_core.utils.function_calling.convert_to_openai_function()", - removal="0.2.0", + removal="0.3.0", ) def convert_python_function_to_openai_function( function: Callable, @@ -239,7 +239,7 @@ def convert_python_function_to_openai_function( @deprecated( "0.1.16", alternative="langchain_core.utils.function_calling.convert_to_openai_function()", - removal="0.2.0", + removal="0.3.0", ) def format_tool_to_openai_function(tool: BaseTool) -> FunctionDescription: """Format tool into the OpenAI function API.""" @@ -269,7 +269,7 @@ def format_tool_to_openai_function(tool: BaseTool) -> FunctionDescription: @deprecated( "0.1.16", alternative="langchain_core.utils.function_calling.convert_to_openai_tool()", - removal="0.2.0", + removal="0.3.0", ) def format_tool_to_openai_tool(tool: BaseTool) -> ToolDescription: """Format tool into the OpenAI function API.""" diff --git a/libs/core/langchain_core/utils/loading.py b/libs/core/langchain_core/utils/loading.py index a9abf7ee7a3..225c7afc47d 100644 --- a/libs/core/langchain_core/utils/loading.py +++ b/libs/core/langchain_core/utils/loading.py @@ -8,7 +8,7 @@ from langchain_core._api.deprecation import deprecated @deprecated( since="0.1.30", - removal="0.2", + removal="0.3", message=( "Using the hwchase17/langchain-hub " "repo for prompts is deprecated. Please use " diff --git a/libs/experimental/langchain_experimental/llms/anthropic_functions.py b/libs/experimental/langchain_experimental/llms/anthropic_functions.py index cbfb7b48176..df82fc5dfb3 100644 --- a/libs/experimental/langchain_experimental/llms/anthropic_functions.py +++ b/libs/experimental/langchain_experimental/llms/anthropic_functions.py @@ -126,7 +126,7 @@ def _destrip(tool_input: Any) -> Any: @deprecated( since="0.0.54", - removal="0.2", + removal="0.3", alternative_import="langchain_anthropic.experimental.ChatAnthropicTools", ) class AnthropicFunctions(BaseChatModel): diff --git a/libs/langchain/langchain/agents/agent.py b/libs/langchain/langchain/agents/agent.py index f37c8e1ab9f..54e5ce73215 100644 --- a/libs/langchain/langchain/agents/agent.py +++ b/libs/langchain/langchain/agents/agent.py @@ -571,7 +571,7 @@ class RunnableMultiActionAgent(BaseMultiActionAgent): "Use new agent constructor methods like create_react_agent, create_json_agent, " "create_structured_chat_agent, etc." ), - removal="0.2.0", + removal="0.3.0", ) class LLMSingleActionAgent(BaseSingleActionAgent): """Base class for single action agents.""" @@ -661,7 +661,7 @@ class LLMSingleActionAgent(BaseSingleActionAgent): "Use new agent constructor methods like create_react_agent, create_json_agent, " "create_structured_chat_agent, etc." ), - removal="0.2.0", + removal="0.3.0", ) class Agent(BaseSingleActionAgent): """Agent that calls the language model and deciding the action. diff --git a/libs/langchain/langchain/agents/agent_types.py b/libs/langchain/langchain/agents/agent_types.py index 2e98fe54818..b7ca4be4c41 100644 --- a/libs/langchain/langchain/agents/agent_types.py +++ b/libs/langchain/langchain/agents/agent_types.py @@ -10,7 +10,7 @@ from langchain_core._api import deprecated "Use new agent constructor methods like create_react_agent, create_json_agent, " "create_structured_chat_agent, etc." ), - removal="0.2.0", + removal="0.3.0", ) class AgentType(str, Enum): """An enum for agent types. diff --git a/libs/langchain/langchain/agents/chat/base.py b/libs/langchain/langchain/agents/chat/base.py index 0fda0a119ed..49b6b91800d 100644 --- a/libs/langchain/langchain/agents/chat/base.py +++ b/libs/langchain/langchain/agents/chat/base.py @@ -25,7 +25,7 @@ from langchain.agents.utils import validate_tools_single_input from langchain.chains.llm import LLMChain -@deprecated("0.1.0", alternative="create_react_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_react_agent", removal="0.3.0") class ChatAgent(Agent): """Chat Agent.""" diff --git a/libs/langchain/langchain/agents/conversational/base.py b/libs/langchain/langchain/agents/conversational/base.py index 864bf0425e9..7fa05896d11 100644 --- a/libs/langchain/langchain/agents/conversational/base.py +++ b/libs/langchain/langchain/agents/conversational/base.py @@ -18,7 +18,7 @@ from langchain.agents.utils import validate_tools_single_input from langchain.chains import LLMChain -@deprecated("0.1.0", alternative="create_react_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_react_agent", removal="0.3.0") class ConversationalAgent(Agent): """An agent that holds a conversation in addition to using tools.""" diff --git a/libs/langchain/langchain/agents/conversational_chat/base.py b/libs/langchain/langchain/agents/conversational_chat/base.py index 2ba0f6f5403..2e14eb8af40 100644 --- a/libs/langchain/langchain/agents/conversational_chat/base.py +++ b/libs/langchain/langchain/agents/conversational_chat/base.py @@ -30,7 +30,7 @@ from langchain.agents.utils import validate_tools_single_input from langchain.chains import LLMChain -@deprecated("0.1.0", alternative="create_json_chat_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_json_chat_agent", removal="0.3.0") class ConversationalChatAgent(Agent): """An agent designed to hold a conversation in addition to using tools.""" diff --git a/libs/langchain/langchain/agents/initialize.py b/libs/langchain/langchain/agents/initialize.py index 890bc90e68f..43c349124f8 100644 --- a/libs/langchain/langchain/agents/initialize.py +++ b/libs/langchain/langchain/agents/initialize.py @@ -17,7 +17,7 @@ from langchain.agents.loading import AGENT_TO_CLASS, load_agent "Use new agent constructor methods like create_react_agent, create_json_agent, " "create_structured_chat_agent, etc." ), - removal="0.2.0", + removal="0.3.0", ) def initialize_agent( tools: Sequence[BaseTool], diff --git a/libs/langchain/langchain/agents/loading.py b/libs/langchain/langchain/agents/loading.py index a5d15d24e79..a8da67dd1e5 100644 --- a/libs/langchain/langchain/agents/loading.py +++ b/libs/langchain/langchain/agents/loading.py @@ -31,7 +31,7 @@ def _load_agent_from_tools( return agent_cls.from_llm_and_tools(llm, tools, **combined_config) -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") def load_agent_from_config( config: dict, llm: Optional[BaseLanguageModel] = None, @@ -87,7 +87,7 @@ def load_agent_from_config( return agent_cls(**combined_config) # type: ignore -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") def load_agent( path: Union[str, Path], **kwargs: Any ) -> Union[BaseSingleActionAgent, BaseMultiActionAgent]: diff --git a/libs/langchain/langchain/agents/mrkl/base.py b/libs/langchain/langchain/agents/mrkl/base.py index 340dc1eb659..922edc2e73d 100644 --- a/libs/langchain/langchain/agents/mrkl/base.py +++ b/libs/langchain/langchain/agents/mrkl/base.py @@ -33,7 +33,7 @@ class ChainConfig(NamedTuple): action_description: str -@deprecated("0.1.0", alternative="create_react_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_react_agent", removal="0.3.0") class ZeroShotAgent(Agent): """Agent for the MRKL chain.""" @@ -139,7 +139,7 @@ class ZeroShotAgent(Agent): super()._validate_tools(tools) -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class MRKLChain(AgentExecutor): """[Deprecated] Chain that implements the MRKL system.""" diff --git a/libs/langchain/langchain/agents/openai_functions_agent/base.py b/libs/langchain/langchain/agents/openai_functions_agent/base.py index 3eed77bbe32..87de98fc27e 100644 --- a/libs/langchain/langchain/agents/openai_functions_agent/base.py +++ b/libs/langchain/langchain/agents/openai_functions_agent/base.py @@ -30,7 +30,7 @@ from langchain.agents.output_parsers.openai_functions import ( ) -@deprecated("0.1.0", alternative="create_openai_functions_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_openai_functions_agent", removal="0.3.0") class OpenAIFunctionsAgent(BaseSingleActionAgent): """An Agent driven by OpenAIs function powered API. diff --git a/libs/langchain/langchain/agents/openai_functions_multi_agent/base.py b/libs/langchain/langchain/agents/openai_functions_multi_agent/base.py index f59a751136f..f13434df49b 100644 --- a/libs/langchain/langchain/agents/openai_functions_multi_agent/base.py +++ b/libs/langchain/langchain/agents/openai_functions_multi_agent/base.py @@ -93,7 +93,7 @@ def _parse_ai_message(message: BaseMessage) -> Union[List[AgentAction], AgentFin ) -@deprecated("0.1.0", alternative="create_openai_tools_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_openai_tools_agent", removal="0.3.0") class OpenAIMultiFunctionsAgent(BaseMultiActionAgent): """An Agent driven by OpenAIs function powered API. diff --git a/libs/langchain/langchain/agents/react/base.py b/libs/langchain/langchain/agents/react/base.py index cdb39256ea7..e3020bb4644 100644 --- a/libs/langchain/langchain/agents/react/base.py +++ b/libs/langchain/langchain/agents/react/base.py @@ -21,7 +21,7 @@ if TYPE_CHECKING: from langchain_community.docstore.base import Docstore -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class ReActDocstoreAgent(Agent): """Agent for the ReAct chain.""" @@ -68,7 +68,7 @@ class ReActDocstoreAgent(Agent): return "Thought:" -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class DocstoreExplorer: """Class to assist with exploration of a document store.""" @@ -118,7 +118,7 @@ class DocstoreExplorer: return self.document.page_content.split("\n\n") -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class ReActTextWorldAgent(ReActDocstoreAgent): """Agent for the ReAct TextWorld chain.""" @@ -138,7 +138,7 @@ class ReActTextWorldAgent(ReActDocstoreAgent): raise ValueError(f"Tool name should be Play, got {tool_names}") -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class ReActChain(AgentExecutor): """[Deprecated] Chain that implements the ReAct paper.""" diff --git a/libs/langchain/langchain/agents/self_ask_with_search/base.py b/libs/langchain/langchain/agents/self_ask_with_search/base.py index 27108aa97b2..d616a06de22 100644 --- a/libs/langchain/langchain/agents/self_ask_with_search/base.py +++ b/libs/langchain/langchain/agents/self_ask_with_search/base.py @@ -23,7 +23,7 @@ if TYPE_CHECKING: from langchain_community.utilities.serpapi import SerpAPIWrapper -@deprecated("0.1.0", alternative="create_self_ask_with_search", removal="0.2.0") +@deprecated("0.1.0", alternative="create_self_ask_with_search", removal="0.3.0") class SelfAskWithSearchAgent(Agent): """Agent for the self-ask-with-search paper.""" @@ -66,7 +66,7 @@ class SelfAskWithSearchAgent(Agent): return "" -@deprecated("0.1.0", removal="0.2.0") +@deprecated("0.1.0", removal="0.3.0") class SelfAskWithSearchChain(AgentExecutor): """[Deprecated] Chain that does self-ask with search.""" diff --git a/libs/langchain/langchain/agents/structured_chat/base.py b/libs/langchain/langchain/agents/structured_chat/base.py index be08419632a..31b10934f01 100644 --- a/libs/langchain/langchain/agents/structured_chat/base.py +++ b/libs/langchain/langchain/agents/structured_chat/base.py @@ -28,7 +28,7 @@ from langchain.tools.render import ToolsRenderer, render_text_description_and_ar HUMAN_MESSAGE_TEMPLATE = "{input}\n\n{agent_scratchpad}" -@deprecated("0.1.0", alternative="create_structured_chat_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_structured_chat_agent", removal="0.3.0") class StructuredChatAgent(Agent): """Structured Chat Agent.""" diff --git a/libs/langchain/langchain/agents/xml/base.py b/libs/langchain/langchain/agents/xml/base.py index b79721522e5..1fc70f50be4 100644 --- a/libs/langchain/langchain/agents/xml/base.py +++ b/libs/langchain/langchain/agents/xml/base.py @@ -17,7 +17,7 @@ from langchain.chains.llm import LLMChain from langchain.tools.render import ToolsRenderer, render_text_description -@deprecated("0.1.0", alternative="create_xml_agent", removal="0.2.0") +@deprecated("0.1.0", alternative="create_xml_agent", removal="0.3.0") class XMLAgent(BaseSingleActionAgent): """Agent that uses XML tags. diff --git a/libs/langchain/langchain/chains/base.py b/libs/langchain/langchain/chains/base.py index 8d4f4e708ea..04b73d2744c 100644 --- a/libs/langchain/langchain/chains/base.py +++ b/libs/langchain/langchain/chains/base.py @@ -331,7 +331,7 @@ class Chain(RunnableSerializable[Dict[str, Any], Dict[str, Any]], ABC): None, self._call, inputs, run_manager.get_sync() if run_manager else None ) - @deprecated("0.1.0", alternative="invoke", removal="0.2.0") + @deprecated("0.1.0", alternative="invoke", removal="0.3.0") def __call__( self, inputs: Union[Dict[str, Any], Any], @@ -382,7 +382,7 @@ class Chain(RunnableSerializable[Dict[str, Any], Dict[str, Any]], ABC): include_run_info=include_run_info, ) - @deprecated("0.1.0", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.0", alternative="ainvoke", removal="0.3.0") async def acall( self, inputs: Union[Dict[str, Any], Any], @@ -541,7 +541,7 @@ class Chain(RunnableSerializable[Dict[str, Any], Dict[str, Any]], ABC): ) return self.output_keys[0] - @deprecated("0.1.0", alternative="invoke", removal="0.2.0") + @deprecated("0.1.0", alternative="invoke", removal="0.3.0") def run( self, *args: Any, @@ -612,7 +612,7 @@ class Chain(RunnableSerializable[Dict[str, Any], Dict[str, Any]], ABC): f" but not both. Got args: {args} and kwargs: {kwargs}." ) - @deprecated("0.1.0", alternative="ainvoke", removal="0.2.0") + @deprecated("0.1.0", alternative="ainvoke", removal="0.3.0") async def arun( self, *args: Any, @@ -750,7 +750,7 @@ class Chain(RunnableSerializable[Dict[str, Any], Dict[str, Any]], ABC): else: raise ValueError(f"{save_path} must be json or yaml") - @deprecated("0.1.0", alternative="batch", removal="0.2.0") + @deprecated("0.1.0", alternative="batch", removal="0.3.0") def apply( self, input_list: List[Dict[str, Any]], callbacks: Callbacks = None ) -> List[Dict[str, str]]: diff --git a/libs/langchain/langchain/chains/openai_functions/base.py b/libs/langchain/langchain/chains/openai_functions/base.py index 1a4c269d60a..0ed1720ec5d 100644 --- a/libs/langchain/langchain/chains/openai_functions/base.py +++ b/libs/langchain/langchain/chains/openai_functions/base.py @@ -42,7 +42,7 @@ __all__ = [ ] -@deprecated(since="0.1.1", removal="0.2.0", alternative="create_openai_fn_runnable") +@deprecated(since="0.1.1", removal="0.3.0", alternative="create_openai_fn_runnable") def create_openai_fn_chain( functions: Sequence[Union[Dict[str, Any], Type[BaseModel], Callable]], llm: BaseLanguageModel, @@ -144,7 +144,7 @@ def create_openai_fn_chain( @deprecated( - since="0.1.1", removal="0.2.0", alternative="ChatOpenAI.with_structured_output" + since="0.1.1", removal="0.3.0", alternative="ChatOpenAI.with_structured_output" ) def create_structured_output_chain( output_schema: Union[Dict[str, Any], Type[BaseModel]], diff --git a/libs/langchain/langchain/retrievers/document_compressors/cohere_rerank.py b/libs/langchain/langchain/retrievers/document_compressors/cohere_rerank.py index a9d011469bc..50b80439189 100644 --- a/libs/langchain/langchain/retrievers/document_compressors/cohere_rerank.py +++ b/libs/langchain/langchain/retrievers/document_compressors/cohere_rerank.py @@ -13,7 +13,7 @@ from langchain.retrievers.document_compressors.base import BaseDocumentCompresso @deprecated( - since="0.0.30", removal="0.2.0", alternative_import="langchain_cohere.CohereRerank" + since="0.0.30", removal="0.3.0", alternative_import="langchain_cohere.CohereRerank" ) class CohereRerank(BaseDocumentCompressor): """Document compressor that uses `Cohere Rerank API`.""" diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.py index 29a75ba9bdd..07e3b0694b4 100644 --- a/libs/partners/anthropic/langchain_anthropic/chat_models.py +++ b/libs/partners/anthropic/langchain_anthropic/chat_models.py @@ -756,6 +756,6 @@ def _lc_tool_calls_to_anthropic_tool_use_blocks( return blocks -@deprecated(since="0.1.0", removal="0.2.0", alternative="ChatAnthropic") +@deprecated(since="0.1.0", removal="0.3.0", alternative="ChatAnthropic") class ChatAnthropicMessages(ChatAnthropic): pass diff --git a/libs/partners/anthropic/langchain_anthropic/experimental.py b/libs/partners/anthropic/langchain_anthropic/experimental.py index 4c673a167f6..8b5c43acaef 100644 --- a/libs/partners/anthropic/langchain_anthropic/experimental.py +++ b/libs/partners/anthropic/langchain_anthropic/experimental.py @@ -145,7 +145,7 @@ def _xml_to_tool_calls(elem: Any, tools: List[Dict]) -> List[Dict[str, Any]]: @deprecated( "0.1.5", - removal="0.2.0", + removal="0.3.0", alternative="ChatAnthropic", message=( "Tool-calling is now officially supported by the Anthropic API so this " diff --git a/libs/partners/anthropic/langchain_anthropic/llms.py b/libs/partners/anthropic/langchain_anthropic/llms.py index e8fac8fa110..9aed83df695 100644 --- a/libs/partners/anthropic/langchain_anthropic/llms.py +++ b/libs/partners/anthropic/langchain_anthropic/llms.py @@ -360,6 +360,6 @@ class AnthropicLLM(LLM, _AnthropicCommon): return self.count_tokens(text) -@deprecated(since="0.1.0", removal="0.2.0", alternative="AnthropicLLM") +@deprecated(since="0.1.0", removal="0.3.0", alternative="AnthropicLLM") class Anthropic(AnthropicLLM): pass diff --git a/libs/partners/pinecone/langchain_pinecone/vectorstores.py b/libs/partners/pinecone/langchain_pinecone/vectorstores.py index 94573dc8ef1..197c78ac846 100644 --- a/libs/partners/pinecone/langchain_pinecone/vectorstores.py +++ b/libs/partners/pinecone/langchain_pinecone/vectorstores.py @@ -494,7 +494,7 @@ class PineconeVectorStore(VectorStore): return None -@deprecated(since="0.0.3", removal="0.2.0", alternative="PineconeVectorStore") +@deprecated(since="0.0.3", removal="0.3.0", alternative="PineconeVectorStore") class Pinecone(PineconeVectorStore): """Deprecated. Use PineconeVectorStore instead.""" diff --git a/libs/partners/upstage/langchain_upstage/tools/groundedness_check.py b/libs/partners/upstage/langchain_upstage/tools/groundedness_check.py index eac1eb9e279..fa93303491a 100644 --- a/libs/partners/upstage/langchain_upstage/tools/groundedness_check.py +++ b/libs/partners/upstage/langchain_upstage/tools/groundedness_check.py @@ -110,7 +110,7 @@ class UpstageGroundednessCheck(BaseTool): @deprecated( since="0.1.3", - removal="0.2.0", + removal="0.3.0", alternative_import="langchain_upstage.UpstageGroundednessCheck", ) class GroundednessCheck(UpstageGroundednessCheck):