mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-07-22 01:05:52 -04:00
a7af32c274
# Cassandra support for chat history
### Description
- Store chat messages in cassandra
### Dependency
- cassandra-driver - Python Module
## Before submitting
- Added Integration Test
## Who can review?
@hwchase17
@agola11
# Your PR Title (What it does)
<!--
Thank you for contributing to LangChain! Your PR will appear in our next
release under the title you set. Please make sure it highlights your
valuable contribution.
Replace this with a description of the change, the issue it fixes (if
applicable), and relevant context. List any dependencies required for
this change.
After you're done, someone will review your PR. They may suggest
improvements. If no one reviews your PR within a few days, feel free to
@-mention the same people again, as notifications can get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
<!-- If you're adding a new integration, include an integration test and
an example notebook showing its use! -->
## Who can review?
Community members can review the PR once tests pass. Tag
maintainers/contributors who might be interested:
<!-- For a quicker response, figure out the right person to tag with @
@hwchase17 - project lead
Tracing / Callbacks
- @agola11
Async
- @agola11
DataLoaders
- @eyurtsev
Models
- @hwchase17
- @agola11
Agents / Tools / Toolkits
- @vowelparrot
VectorStores / Retrievers / Memory
- @dev2049
-->
Co-authored-by: Jinto Jose <129657162+jj701@users.noreply.github.com>
54 lines
2.1 KiB
Python
54 lines
2.1 KiB
Python
from langchain.memory.buffer import (
|
|
ConversationBufferMemory,
|
|
ConversationStringBufferMemory,
|
|
)
|
|
from langchain.memory.buffer_window import ConversationBufferWindowMemory
|
|
from langchain.memory.chat_message_histories.cassandra import (
|
|
CassandraChatMessageHistory,
|
|
)
|
|
from langchain.memory.chat_message_histories.cosmos_db import CosmosDBChatMessageHistory
|
|
from langchain.memory.chat_message_histories.dynamodb import DynamoDBChatMessageHistory
|
|
from langchain.memory.chat_message_histories.file import FileChatMessageHistory
|
|
from langchain.memory.chat_message_histories.in_memory import ChatMessageHistory
|
|
from langchain.memory.chat_message_histories.mongodb import MongoDBChatMessageHistory
|
|
from langchain.memory.chat_message_histories.postgres import PostgresChatMessageHistory
|
|
from langchain.memory.chat_message_histories.redis import RedisChatMessageHistory
|
|
from langchain.memory.combined import CombinedMemory
|
|
from langchain.memory.entity import (
|
|
ConversationEntityMemory,
|
|
InMemoryEntityStore,
|
|
RedisEntityStore,
|
|
)
|
|
from langchain.memory.kg import ConversationKGMemory
|
|
from langchain.memory.readonly import ReadOnlySharedMemory
|
|
from langchain.memory.simple import SimpleMemory
|
|
from langchain.memory.summary import ConversationSummaryMemory
|
|
from langchain.memory.summary_buffer import ConversationSummaryBufferMemory
|
|
from langchain.memory.token_buffer import ConversationTokenBufferMemory
|
|
from langchain.memory.vectorstore import VectorStoreRetrieverMemory
|
|
|
|
__all__ = [
|
|
"CombinedMemory",
|
|
"ConversationBufferWindowMemory",
|
|
"ConversationBufferMemory",
|
|
"SimpleMemory",
|
|
"ConversationSummaryBufferMemory",
|
|
"ConversationKGMemory",
|
|
"ConversationEntityMemory",
|
|
"InMemoryEntityStore",
|
|
"RedisEntityStore",
|
|
"ConversationSummaryMemory",
|
|
"ChatMessageHistory",
|
|
"ConversationStringBufferMemory",
|
|
"ReadOnlySharedMemory",
|
|
"ConversationTokenBufferMemory",
|
|
"RedisChatMessageHistory",
|
|
"DynamoDBChatMessageHistory",
|
|
"PostgresChatMessageHistory",
|
|
"VectorStoreRetrieverMemory",
|
|
"CosmosDBChatMessageHistory",
|
|
"FileChatMessageHistory",
|
|
"MongoDBChatMessageHistory",
|
|
"CassandraChatMessageHistory",
|
|
]
|