memoryscope.core.operation.consolidate_memory_op

class memoryscope.core.operation.consolidate_memory_op.ConsolidateMemoryOp(message_lock, contextual_msg_min_count: int = 0, **kwargs)[source]

Bases: BackendOperation

__init__(message_lock, contextual_msg_min_count: int = 0, **kwargs)[source]

Initializes a new instance of the BaseOperation.

run_operation(target_name: str, **kwargs)[source]

Executes an operation after preparing the chat context, checking message memory status, and updating workflow status accordingly.

If the number of not-memorized messages is less than the contextual message count, the operation is skipped. Otherwise, it sets up the chat context, runs the workflow, captures the result, and updates the memory status.

Parameters:
  • target_name (str) – target_name(human name).

  • **kwargs – Keyword arguments for chat operation configuration.

Returns:

The result obtained from running the workflow.

Return type:

Any