memoryscope.core.worker.backend.get_reflection_subject_worker
- class memoryscope.core.worker.backend.get_reflection_subject_worker.GetReflectionSubjectWorker(embedding_model: str = '', generation_model: str = '', rank_model: str = '', **kwargs)[source]
Bases:
MemoryBaseWorker
A specialized worker class responsible for retrieving unreflected memory nodes, generating reflection prompts with current insights, invoking an LLM for fresh insights, parsing the LLM responses, forming new insight nodes, and updating memory statuses accordingly.
- FILE_PATH: str = '/home/runner/work/MemoryScope/MemoryScope/memoryscope/core/worker/backend/get_reflection_subject_worker.py'
- new_insight_node(insight_key: str) MemoryNode [source]
Creates a new MemoryNode for an insight with the given key, enriched with current datetime metadata.
- Parameters:
insight_key (str) – The unique identifier for the insight.
- Returns:
A new MemoryNode instance representing the insight, marked as new and of type INSIGHT.
- Return type:
- 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