memoryscope.core.worker.backend.contra_repeat_worker
- class memoryscope.core.worker.backend.contra_repeat_worker.ContraRepeatWorker(embedding_model: str = '', generation_model: str = '', rank_model: str = '', **kwargs)[源代码]
-
The ContraRepeatWorker class specializes in processing memory nodes to identify and handle contradictory and repetitive information. It extends the base functionality of MemoryBaseWorker.
Responsibilities: - Collects observation nodes from various memory categories. - Constructs a prompt with these observations for language model analysis. - Parses the model's response to detect contradictions or redundancies. - Adjusts the status of memory nodes based on the analysis. - Persists the updated node statuses back into memory.
- FILE_PATH: str = '/home/runner/work/MemoryScope/MemoryScope/memoryscope/core/worker/backend/contra_repeat_worker.py'
- name: str
- workflow_context: Dict[str, Any]
- memoryscope_context: MemoryscopeContext
- raise_exception: bool
- is_multi_thread: bool
- thread_pool: ThreadPoolExecutor
- enable_parallel: bool
- kwargs: dict
- continue_run: bool
- async_task_list: list
- thread_task_list: list