mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
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:
parent
9fbe346860
commit
2518e6c95b
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user