You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
creates a new Document per message, and searches are based on
filter={
"session_id": self.session_id,
},
However, this not terribly efficient once we start getting into 10s or 100s of messages in history: many documents need to be returned and then ordered.
Alternate data models could include:
Maintaining a list of Message within a single document where the key is the conversation ID
Use CassandraChatMessageHistoryhttps://python.langchain.com/docs/integrations/memory/cassandra_chat_message_history/ which stores within a standard Cassandra table that has the conversation ID as the partition key; the Cassandra libraries do have some intelligence around maintaining connections so it does not require a new connection per interaction, and the library correctly supports token/endpoint connection paradigm.
The text was updated successfully, but these errors were encountered:
https://github.com/langchain-ai/langchain-datastax/blob/main/libs/astradb/langchain_astradb/chat_message_histories.py
creates a new Document per message, and searches are based on
However, this not terribly efficient once we start getting into 10s or 100s of messages in history: many documents need to be returned and then ordered.
Alternate data models could include:
list
ofMessage
within a single document where the key is the conversation IDCassandraChatMessageHistory
https://python.langchain.com/docs/integrations/memory/cassandra_chat_message_history/ which stores within a standard Cassandra table that has the conversation ID as the partition key; the Cassandra libraries do have some intelligence around maintaining connections so it does not require a new connection per interaction, and the library correctly supports token/endpoint connection paradigm.The text was updated successfully, but these errors were encountered: