Add test for log_step_metadata with no long-term memory

- Implemented test_log_step_metadata_no_long_term_memory to ensure that when long-term memory is None, the memory_usage for long_term is an empty dictionary in the log result.
pull/615/head
Sambhav Dixit 2 months ago committed by GitHub
parent 4d300fccf9
commit 672f3eeab4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -33,4 +33,8 @@ class TestAgentLogging(unittest.TestCase):
self.assertEqual(log_result['tokens']['total'], 200)
def test_log_step_metadata_no_long_term_memory(self):
self.agent.long_term_memory = None
log_result = self.agent.log_step_metadata(1, "prompt", "response")
self.assertEqual(log_result['memory_usage']['long_term'], {})

Loading…
Cancel
Save