Repository navigation
Conversation
search_memory dumped the entire result_list through str(list) into a single JSON blob, so callers saw one unusable memory instead of each hit's memory_info text. Emit one role/parts entry per result.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
VikingDBLTMBackend.search_memorytookdata.result_listand returned a single JSON string whoseparts[0].textwasstr(result_list)— the Python list repr of every hit.LongTermMemorythen turned that into one unusableMemoryEntry, discarding per-hitmemory_info(summary / profile / event fields) and thetop_kshape.Fix
{"role":"user","parts":[{"text": ...}]}entry perresult_listitem.memory_info(summary,user_profile,original_messages,question,answer,content,text); otherwise serializememory_info.How to reproduce
New tests in
tests/test_vikingdb_memory_backend.pyfail on main and pass with this change. Full file: 22 passed.Test plan
pytest tests/test_vikingdb_memory_backend.py— 22 passed