Skip to content

Commit

Permalink
more tests for WorkingMemory
Browse files Browse the repository at this point in the history
  • Loading branch information
pieroit committed Jan 27, 2025
1 parent 94d5acc commit 356b822
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/tests/memory/test_class_working_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,16 @@ def test_langchainfy_chat_history():
assert langchain_convo[1].name == "AI"
assert langchain_convo[1].content == "Meow"


def test_working_memory_as_dictionary_object():

wm = WorkingMemory()
wm.a = "a"
wm["b"] = "b"
assert wm.a == "a"
assert wm["a"] == "a"
assert wm.b == "b"
assert wm["b"] == "b"
# assert wm.c is None # too dangerous

# TODOV2: add tests for multimodal messages!

0 comments on commit 356b822

Please sign in to comment.