-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation class of the Memory interface, does not support serialization and deserialization. #1117
Comments
Hi. There is an implementation of the ChatMemory interface for Cassandra and there is a PR for pgvector. That said, we would like to provide an impelmentation that delgates to Spring's Cache abstraction along the lines of what was done in llamaindex. I'll create a new issue and post it back here. I don't see an implementation where having ChatMemory implement serializable is needed, entries of the memory may or may not need to be serializable depending upon the storage approach. |
I've encountered the same issue with implementing a Redis-based cache for Implementation Details
Note: Ensure that all mixin classes (e.g., |
Moreover, Message has not yet implemented Serializable. Now ChatMemory can only be in memory. Can you provide a persistence method so that historical information can be queried normally even if the service is restarted or distributed? |
Thank you very much. In future versions, it will be directly supported without having to rely on Jackson serialization to be compatible with this problem. |
Bug description
deserialization. Currently, ChatMemory only implements a memory-based dialogue cache storage. I wanted to implement a Redis-based cache for Memory in my project, but I encountered a problem: the implementation classes of the Memory interface do not implement the Serializable interface, which causes failures in accessing Redis.
Environment
Spring AI 1.0.0-SNAPSHOT
Steps to reproduce
step1 :
`@Slf4j
public class RedisChatMemory implements ChatMemory {
}`
Step2:
Runtime error
Expected behavior
Support for Redis-based session storage
The text was updated successfully, but these errors were encountered: