mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-17 04:31:55 +00:00
fix(gateway): preview memory prefetch context in chat
This commit is contained in:
parent
13038dc747
commit
2a1e0fc205
8 changed files with 508 additions and 9 deletions
|
|
@ -202,6 +202,20 @@ class TestMemoryManager:
|
|||
assert p1.prefetch_queries == ["what do you know?"]
|
||||
assert p2.prefetch_queries == ["what do you know?"]
|
||||
|
||||
def test_prefetch_all_details_returns_provider_names(self):
|
||||
mgr = MemoryManager()
|
||||
p1 = FakeMemoryProvider("builtin")
|
||||
p1._prefetch_result = "Memory from builtin"
|
||||
p2 = FakeMemoryProvider("hindsight")
|
||||
p2._prefetch_result = "Memory from hindsight"
|
||||
mgr.add_provider(p1)
|
||||
mgr.add_provider(p2)
|
||||
|
||||
text, providers = mgr.prefetch_all_details("what do you know?")
|
||||
|
||||
assert text == "Memory from builtin\n\nMemory from hindsight"
|
||||
assert providers == ["builtin", "hindsight"]
|
||||
|
||||
def test_prefetch_skips_empty(self):
|
||||
mgr = MemoryManager()
|
||||
p1 = FakeMemoryProvider("builtin")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue