memoryscope.core.worker.frontend.semantic_rank_worker

class memoryscope.core.worker.frontend.semantic_rank_worker.SemanticRankWorker(embedding_model: str = '', generation_model: str = '', rank_model: str = '', **kwargs)[源代码]

基类:MemoryBaseWorker

The SemanticRankWorker class processes queries by retrieving memory nodes, removing duplicates, ranking them based on semantic relevance using a model, assigning scores, sorting the nodes, and storing the ranked nodes back, while logging relevant information.