Memory management
Memory, MemoryManager and memory components
Last updated
Memory, MemoryManager and memory components
Last updated
Manage data
directory (Optional[str], optional): Path to directory. Defaults to None.
initial_data (Optional[Dict[str, Any]], optional): Data for initialization of memory. Defaults to None.
Save state with the given identifier
identifier (str): Identifier that will be used.
state (Any): State that will be associated with provided identifier.
Retrieve state by its identifier, either from memory or disk
identifier (str): Identifier that will be used.
KeyError: If identiifier is invalid.
Any: Data associated with identifier.
Delete a state by its identifier from both memory and disk
identifier (str): Identifier to delete.
Clean memory
Set memory instruction
Set data to memory
Set data to memory and remove it from current data
set_key (str): Destination key.
get_key (Optional[str], optional): Key that used to retrieve data from register. If equals to None, complete register will be added to memory. Defaults to None.
InavalidMemoryInstruction: If provided instruction doesnt exists.
Get memory instruction
Get data from memory
Get data from memory and delete it from memory
identifiers (List[Union[str, Tuple[str, str]]]): Key/keys that will be used to access data in memory and for setting to register.
default (Dict[str, Any]): A map of values to be returned for each provided identifier if the identifier(s) are not found. If an identifier is not found and no default value is provided for it, an exception will be raised. Defaults to None.
InavalidMemoryInstruction: If provided instruction doesnt exists.
Delete data from memory
identifiers (Optional[List[str]], optional): Keys associated with data. If equals to None, flushes memory. Defaults to None.
InavalidMemoryInstruction: If provided instruction doesnt exists.
Manage memory
directory (Optional[str], optional): Path to directory. Defaults to None.
initial_data (Optional[Dict[str, Any]], optional): Data for initialization of memory. Defaults to None.
Get data from memory
identifiers (List[Union[str, Tuple[str, str]]]): Key/keys that will be used to access data in memory and for setting to register.
default (Dict[str, Any]): A map of values to be returned for each provided identifier if the identifier(s) are not found. If an identifier is not found and no default value is provided for it, an exception will be raised. Defaults to None.
delete (bool, optional): If equals to True, deletes accessed memory identifiers. Defaults to False.
Set data to memory
get_key (str): Source of data.
set_key (str): Destination in memory.
Delete specified identifier from memory
identifier (str): Identifier to delete.
Clean memory
Subclass of
memory_instruction (, optional): Strategy for memory setting. Defaults to ..
input_data (): Current data.
evaluator (Optional[], optional): Evaluator in context of which executed. If equals to None, default evaluator will be created. Defaults to None.
: Result of execution.
Subclass of
memory_instruction (, optional): Strategy for memory access. Defaults to ..
input_data (): Current data.
evaluator (Optional[], optional): Evaluator in context of which executed. If equals to None, default evaluator will be created. Defaults to None.
: Result of execution.
input_data (): Current data.
evaluator (Optional[], optional): Evaluator in context of which executed. If equals to None, default evaluator will be created. Defaults to None.
: Result of execution.
register (): Current data.
: Result of execution.
register (): Current data.