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)[源代码]
-
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 [源代码]
Creates a new MemoryNode for an insight with the given key, enriched with current datetime metadata.
- 参数:
insight_key (str) -- The unique identifier for the insight.
- 返回:
A new MemoryNode instance representing the insight, marked as new and of type INSIGHT.
- 返回类型:
- 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