fabricatio_memory.capabilities.remember
Provide a memory system to remember things.
Classes
Configuration class for memory-related settings in the Remember capability. |
|
Provide a memory system to remember things. |
Module Contents
- class fabricatio_memory.capabilities.remember.RememberScopedConfig(/, **data: Any)
Bases:
fabricatio_core.models.generic.ScopedConfigConfiguration class for memory-related settings in the Remember capability.
- memory_llm: fabricatio_core.models.kwargs_types.LLMKwargs = None
Configuration for LLM generation parameters used in memory operations.
- class fabricatio_memory.capabilities.remember.Remember(/, **data: Any)
Bases:
fabricatio_core.capabilities.propose.Propose,RememberScopedConfig,abc.ABCProvide a memory system to remember things.
- mount_memory_store(memory_store: fabricatio_memory.rust.MemoryStore | None = None) Self
Mount a memory system to the capability.
- unmount_memory_system() Self
Unmount the memory system from the capability.
- access_memory_store(fallback_default: fabricatio_memory.rust.MemoryStore | None = None) fabricatio_memory.rust.MemoryStore
Access the memory system.
- async record(raw: str, **kwargs: Unpack[fabricatio_core.models.kwargs_types.ValidateKwargs[fabricatio_memory.models.note.Note]]) fabricatio_memory.models.note.Note
Record a piece of information into the memory system.
- Parameters:
raw – The raw string content to be recorded.
**kwargs – Additional keyword arguments for generation.
- Returns:
A Memory object representing the recorded information.
- async recall(query: str, top_k: int = 100, boost_recent: bool = True, **kwargs: Unpack[fabricatio_core.models.kwargs_types.LLMKwargs]) str
Recall information from the memory system based on a query, Process with llm, which make a summary over memories.
- Parameters:
query – The query string to search for relevant memories.
top_k – The number of top memories to retrieve.
boost_recent – Whether to boost the relevance of more recent memories.
**kwargs – Additional keyword arguments for generation.
- Returns:
A string containing the recalled information.