PR #2218 does not yet introduce a data model for storing user chat histories and accessing them in chat conversations as part of long term memory. We should either introduce a basic framework for this here or capture an issue to do so later.
We should be able to use https://reference.langchain.com/python/langchain-community/chat_message_histories/firestore/FirestoreChatMessageHistory for this. We will need to decide whether to add this as a separate firestore db or as a new collection or something else. it is a top priority to enforce user-level access so each user can only access their own conversation history.
Originally posted by @nesanders in #2218 (comment)
Here are core requirements for this issue:
- Chat converstaions need to be durably persisted
- Persisted chat conversations should be incrementally updated after each conversation turn
- We should expose a new tool in the REACT loop to enable the chatbot to retrieve previous conversations
- The long term memory tool needs to be able to search previous conversations by semantic relevance
Anti-requirements
- Our approach must NOT prevent a future frontend PR that would expose the chat history to the user
- Our approach must NOT prevent a future frontend PR that would allow the user to open and resume previous chats
- Our approach must NOT prevent a future PR that would enable chat rollback/editing
PR #2218 does not yet introduce a data model for storing user chat histories and accessing them in chat conversations as part of long term memory. We should either introduce a basic framework for this here or capture an issue to do so later.
We should be able to use https://reference.langchain.com/python/langchain-community/chat_message_histories/firestore/FirestoreChatMessageHistory for this. We will need to decide whether to add this as a separate firestore db or as a new collection or something else. it is a top priority to enforce user-level access so each user can only access their own conversation history.
Originally posted by @nesanders in #2218 (comment)
Here are core requirements for this issue:
Anti-requirements