diff --git a/libs/community/langchain_community/chat_message_histories/__init__.py b/libs/community/langchain_community/chat_message_histories/__init__.py index fc20cacacceab..7e91d7b0f0235 100644 --- a/libs/community/langchain_community/chat_message_histories/__init__.py +++ b/libs/community/langchain_community/chat_message_histories/__init__.py @@ -1,6 +1,5 @@ """**Chat message history** stores a history of the message interactions in a chat. - **Class hierarchy:** .. code-block:: @@ -40,6 +39,9 @@ from langchain_community.chat_message_histories.firestore import ( FirestoreChatMessageHistory, ) + from langchain_community.chat_message_histories.falkordb import ( + FalkorDBChatMessageHistory, + ) from langchain_community.chat_message_histories.in_memory import ( ChatMessageHistory, ) @@ -98,6 +100,7 @@ "ElasticsearchChatMessageHistory", "FileChatMessageHistory", "FirestoreChatMessageHistory", + "FalkorDBChatMessageHistory", "MomentoChatMessageHistory", "MongoDBChatMessageHistory", "Neo4jChatMessageHistory", @@ -124,6 +127,7 @@ "ElasticsearchChatMessageHistory": "langchain_community.chat_message_histories.elasticsearch", # noqa: E501 "FileChatMessageHistory": "langchain_community.chat_message_histories.file", "FirestoreChatMessageHistory": "langchain_community.chat_message_histories.firestore", # noqa: E501 + "FalkorDBChatMessageHistory": "langchain_community.chat_message_histories.falkordb", "MomentoChatMessageHistory": "langchain_community.chat_message_histories.momento", "MongoDBChatMessageHistory": "langchain_community.chat_message_histories.mongodb", "Neo4jChatMessageHistory": "langchain_community.chat_message_histories.neo4j", diff --git a/libs/community/poetry.lock b/libs/community/poetry.lock index beeae92b1e4c9..831a034d18c05 100644 --- a/libs/community/poetry.lock +++ b/libs/community/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -3462,6 +3462,24 @@ files = [ [package.dependencies] cffi = {version = "*", markers = "implementation_name == \"pypy\""} +[[package]] +name = "redis" +version = "5.2.0" +description = "Python client for Redis database and key-value store" +optional = false +python-versions = ">=3.8" +files = [ + {file = "redis-5.2.0-py3-none-any.whl", hash = "sha256:ae174f2bb3b1bf2b09d54bf3e51fbc1469cf6c10aa03e21141f51969801a7897"}, + {file = "redis-5.2.0.tar.gz", hash = "sha256:0b1087665a771b1ff2e003aa5bdd354f15a70c9e25d5a7dbf9c722c16528a7b0"}, +] + +[package.dependencies] +async-timeout = {version = ">=4.0.3", markers = "python_full_version < \"3.11.3\""} + +[package.extras] +hiredis = ["hiredis (>=3.0.0)"] +ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==23.2.1)", "requests (>=2.31.0)"] + [[package]] name = "referencing" version = "0.35.1" @@ -4579,4 +4597,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "0179027f05f5159e95267551c013cac474abd3e9f137399f715835b3070d9c33" +content-hash = "fcce70f7723cd0413535185241a25fbdcac71777f72fc3fefe639e43b7cf9c0d" diff --git a/libs/community/pyproject.toml b/libs/community/pyproject.toml index 822c2b7b94995..6de18c23819c5 100644 --- a/libs/community/pyproject.toml +++ b/libs/community/pyproject.toml @@ -41,6 +41,7 @@ dataclasses-json = ">= 0.5.7, < 0.7" pydantic-settings = "^2.4.0" langsmith = "^0.1.125" httpx-sse = "^0.4.0" +redis = "^5.2.0" [[tool.poetry.dependencies.numpy]] version = "^1" python = "<3.12" diff --git a/libs/community/tests/integration_tests/chat_message_histories/test_falkordb_chat_message_history.py b/libs/community/tests/integration_tests/chat_message_histories/test_falkordb_chat_message_history.py index f4f504e08e998..5482b527c5fee 100644 --- a/libs/community/tests/integration_tests/chat_message_histories/test_falkordb_chat_message_history.py +++ b/libs/community/tests/integration_tests/chat_message_histories/test_falkordb_chat_message_history.py @@ -17,7 +17,9 @@ from langchain_core.messages import AIMessage, HumanMessage -from langchain_community.chat_message_histories.falkordb import FalkorDBChatMessageHistory +from langchain_community.chat_message_histories.falkordb import ( + FalkorDBChatMessageHistory, +) from langchain_community.graphs import FalkorDBGraph