mirror of
https://github.com/kennethreitz/simplemind.git
synced 2026-06-05 22:50:18 +00:00
Refactor SimpleMemoryPlugin pre_send_hook method
This commit is contained in:
@@ -123,7 +123,7 @@ class SimpleMemoryPlugin:
|
||||
def yield_memories(self):
|
||||
return (m for m in self.memories)
|
||||
|
||||
def send_hook(self, conversation: sm.Conversation):
|
||||
def pre_send_hook(self, conversation: sm.Conversation):
|
||||
for m in self.yield_memories():
|
||||
conversation.add_message(role="system", text=m)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user