memoryscope.core.worker.frontend.retrieve_memory_worker

class memoryscope.core.worker.frontend.retrieve_memory_worker.RetrieveMemoryWorker(embedding_model: str = '', generation_model: str = '', rank_model: str = '', **kwargs)[source]

Bases: MemoryBaseWorker

Retrieves memories based on specified criteria such as status, type, and timestamp. Processes these memories concurrently, sorts them by similarity, and logs the activity, facilitating efficient memory retrieval operations within a given scope.

retrieve_from_observation(**kwargs)

The wrapper function that manages the timing of the original function.

Parameters:
  • *args – Variable length argument list for the decorated function.

  • **kwargs – Arbitrary keyword arguments for the decorated function.

Returns:

The result of the decorated function.

Return type:

Any

retrieve_from_insight(**kwargs)

The wrapper function that manages the timing of the original function.

Parameters:
  • *args – Variable length argument list for the decorated function.

  • **kwargs – Arbitrary keyword arguments for the decorated function.

Returns:

The result of the decorated function.

Return type:

Any

retrieve_expired_memory(**kwargs)

The wrapper function that manages the timing of the original function.

Parameters:
  • *args – Variable length argument list for the decorated function.

  • **kwargs – Arbitrary keyword arguments for the decorated function.

Returns:

The result of the decorated function.

Return type:

Any