memoryscope.core.worker.backend.update_memory_worker

class memoryscope.core.worker.backend.update_memory_worker.UpdateMemoryWorker(embedding_model: str = '', generation_model: str = '', rank_model: str = '', **kwargs)[source]

Bases: MemoryBaseWorker

from_query()[source]

Creates a MemoryNode from the provided query if present in chat_kwargs.

Returns:

A list containing a single MemoryNode created from the query.

Return type:

List[MemoryNode]

from_memory_key()[source]

Retrieves memories based on the memory key if it exists.

Returns:

A list of MemoryNode objects retrieved using the memory key.

Return type:

List[MemoryNode]

delete_all()[source]

Marks all memories for deletion by setting their action_status to ‘DELETE’.

Returns:

A list of all MemoryNode objects marked for deletion.

Return type:

List[MemoryNode]

delete_memory()[source]

Marks specific memories for deletion based on query or memory_id present in chat_kwargs.

Returns:

A list of MemoryNode objects marked for deletion based on the query or memory_id.

Return type:

List[MemoryNode]