Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to be able to persist Entity Memory in a Redis database, so I abstracted
ConversationEntityMemory
to allow for pluggable Entity stores (d06f90d).Then I implemented a Entity store that... erm... stores Entities in Redis. By default, Entities will expire from memory after 24 hours, but they'll be persisted for another 3 days every time they're recalled. The idea is to give the AIs a bit of a spaced-repetition memory, but I have yet to see if this is useful. The memory is partitioned by
session_id
(user ID? chat channel? whatever, really) so entities from one user don't leak to another.While developing this, I did notice that the Entity summaries are kind of buggy (they summarize AI-generated content and not just information the human gave them, sometimes they add things like "No new information provided. Existing summary remains: As stated previously, X", etc.), but I'll tackle that later. First I wanted to get some input on this idea.