langchain: import InMemoryChatMessageHistory from core (#21198)

pull/19769/head
ccurme 1 month ago committed by GitHub
parent 3cd7fced5f
commit bd5d2c2674
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,21 +1,5 @@
from typing import TYPE_CHECKING, Any from langchain_core.chat_history import InMemoryChatMessageHistory as ChatMessageHistory
from langchain._api import create_importer __all__ = [
"ChatMessageHistory",
if TYPE_CHECKING: ]
from langchain_community.chat_message_histories.in_memory import ChatMessageHistory
# Create a way to dynamically look up deprecated imports.
# Used to consolidate logic for raising deprecation warnings and
# handling optional imports.
DEPRECATED_LOOKUP = {"ChatMessageHistory": "langchain_community.chat_message_histories"}
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
def __getattr__(name: str) -> Any:
"""Look up attributes dynamically."""
return _import_attribute(name)
__all__ = ["ChatMessageHistory"]

Loading…
Cancel
Save