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)[源代码]

基类:MemoryBaseWorker

from_query()[源代码]

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

返回:

A list containing a single MemoryNode created from the query.

返回类型:

List[MemoryNode]

from_memory_key()[源代码]

Retrieves memories based on the memory key if it exists.

返回:

A list of MemoryNode objects retrieved using the memory key.

返回类型:

List[MemoryNode]

delete_all()[源代码]

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

返回:

A list of all MemoryNode objects marked for deletion.

返回类型:

List[MemoryNode]

delete_memory()[源代码]

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

返回:

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

返回类型:

List[MemoryNode]