marvin.memory.memory
Memory
class Memory(key: str, instructions: str | None = None, provider: MemoryProvider = lambda: marvin.defaults.memory_provider(), auto_use: bool = False, prompt: str | Path = Path('memory.jinja'))
add
def add(self, content: str) -> str
delete
def delete(self, memory_id: str)
friendly_name
def friendly_name(self) -> str
get_prompt
def get_prompt(self) -> str
get_tools
def get_tools(self) -> list[Callable[..., Any]]
search
def search(self, query: str, n: int = 20) -> dict[str, str]
MemoryProvider
class MemoryProvider()
def add(self, memory_key: str, content: str) -> str
configure
def configure(self, memory_key: str)
def delete(self, memory_key: str, memory_id: str)
def search(self, memory_key: str, query: str, n: int = 20) -> dict[str, str]
get_memory_provider
def get_memory_provider(provider: str) -> MemoryProvider
sanitize_memory_key
def sanitize_memory_key(key: str) -> str
memory