Session deletion method in motorhead memory (#6609)

Motorhead Memory module didn't support deletion of a session. Added a
method to enable deletion.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
Hrag Balian 2023-06-23 21:27:42 -07:00 committed by GitHub
parent 9fbe346860
commit 2518e6c95b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,3 +86,7 @@ class MotorheadMemory(BaseChatMemory):
headers=self.__get_headers(),
)
super().save_context(inputs, outputs)
def delete_session(self) -> None:
"""Delete a session"""
requests.delete(f"{self.url}/sessions/{self.session_id}/memory")