community: add KafkaChatMessageHistory (#22216)

Add chat history store based on Kafka.

Files added: 
`libs/community/langchain_community/chat_message_histories/kafka.py`
`docs/docs/integrations/memory/kafka_chat_message_history.ipynb`

New issue to be created for future improvement:
1. Async method implementation.
2. Message retrieval based on timestamp.
3. Support for other configs when connecting to cloud hosted Kafka (e.g.
add `api_key` field)
4. Improve unit testing & integration testing.
This commit is contained in:
Chang Liu
2024-06-17 20:34:01 -07:00
committed by GitHub
parent 3e835a1aa1
commit 62c8a67f56
4 changed files with 613 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ EXPECTED_ALL = [
"XataChatMessageHistory",
"ZepChatMessageHistory",
"ZepCloudChatMessageHistory",
"KafkaChatMessageHistory",
]