core[patch]: add back ChatModel.callback_manager deprecation (#26244)

This commit is contained in:
Bagatur
2024-09-09 17:46:48 -07:00
committed by GitHub
parent f2f9187919
commit 9132516c84
2 changed files with 8 additions and 15 deletions

View File

@@ -36,7 +36,6 @@ api_docs_build:
API_PKG ?= text-splitters API_PKG ?= text-splitters
api_docs_quick_preview: api_docs_quick_preview:
poetry run pip install "pydantic<2"
poetry run python docs/api_reference/create_api_rst.py $(API_PKG) poetry run python docs/api_reference/create_api_rst.py $(API_PKG)
cd docs/api_reference && poetry run make html cd docs/api_reference && poetry run make html
poetry run python docs/api_reference/scripts/custom_formatter.py docs/api_reference/_build/html/ poetry run python docs/api_reference/scripts/custom_formatter.py docs/api_reference/_build/html/

View File

@@ -195,20 +195,14 @@ class BaseChatModel(BaseLanguageModel[BaseMessage], ABC):
""" # noqa: E501 """ # noqa: E501
# TODO(0.3): Figure out how to re-apply deprecated decorator callback_manager: Optional[BaseCallbackManager] = deprecated(
# callback_manager: Optional[BaseCallbackManager] = deprecated( name="callback_manager", since="0.1.7", removal="1.0", alternative="callbacks"
# name="callback_manager", since="0.1.7", removal="1.0", alternative="callbacks" )(
# )( Field(
# Field( default=None,
# default=None, exclude=True,
# exclude=True, description="Callback manager to add to the run trace.",
# description="Callback manager to add to the run trace.", )
# )
# )
callback_manager: Optional[BaseCallbackManager] = Field(
default=None,
exclude=True,
description="Callback manager to add to the run trace.",
) )
rate_limiter: Optional[BaseRateLimiter] = Field(default=None, exclude=True) rate_limiter: Optional[BaseRateLimiter] = Field(default=None, exclude=True)