nat.plugins.mem0ai.mem0_editor#
Classes#
Wrapper class that implements NAT interfaces for Mem0 Integrations Async. |
Module Contents#
- class Mem0Editor(mem0_client: mem0.AsyncMemoryClient)#
Bases:
nat.memory.interfaces.MemoryEditorWrapper class that implements NAT interfaces for Mem0 Integrations Async.
Initialize class with Predefined Mem0 Client.
Args: mem0_client (AsyncMemoryClient): Preinstantiated AsyncMemoryClient object for Mem0.
- _client#
- async add_items(items: list[nat.memory.models.MemoryItem]) None#
Insert Multiple MemoryItems into the memory. Each MemoryItem is translated and uploaded.
- async search( ) list[nat.memory.models.MemoryItem]#
Retrieve items relevant to the given query.
- Args:
query (str): The query string to match. top_k (int): Maximum number of items to return. kwargs: Other keyword arguments for search.
- Returns:
list[MemoryItem]: The most relevant MemoryItems for the given query.
- async remove_items(**kwargs)#
Remove items. Additional parameters needed for deletion can be specified in keyword arguments.
- Args:
kwargs (dict): Keyword arguments to pass to the remove-items method.