memoryscope.core.operation.consolidate_memory_op

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

基类:BackendOperation

__init__(message_lock, contextual_msg_min_count: int = 0, **kwargs)[源代码]

Initializes a new instance of the BaseOperation.

run_operation(target_name: str, **kwargs)[源代码]

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.

参数:
  • target_name (str) -- target_name(human name).

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

返回:

The result obtained from running the workflow.

返回类型:

Any