From e546a1508da53becb0a42904754081bb7aecdca6 Mon Sep 17 00:00:00 2001 From: mtayfur Date: Fri, 3 Oct 2025 21:30:22 +0300 Subject: [PATCH] Refactor Filter class configuration fields for clarity and redundancy removal --- memory_system.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/memory_system.py b/memory_system.py index ee64685..c32beb6 100644 --- a/memory_system.py +++ b/memory_system.py @@ -809,20 +809,13 @@ class Filter: """Configuration valves for the Memory System.""" model: str = Field(default=Constants.DEFAULT_LLM_MODEL, description="Model name for LLM operations") - embedding_model: str = Field(default=Constants.DEFAULT_EMBEDDING_MODEL, description="Sentence transformer model for embeddings") - max_memories_returned: int = Field(default=Constants.MAX_MEMORIES_PER_RETRIEVAL, description="Maximum number of memories to return in context") - - semantic_retrieval_threshold: float = Field(default=Constants.SEMANTIC_RETRIEVAL_THRESHOLD, description="Minimum similarity threshold for memory retrieval") - - enable_llm_reranking: bool = Field(default=True, description="Enable LLM-based memory reranking for improved contextual selection") - - llm_reranking_trigger_multiplier: float = Field(default=Constants.LLM_RERANKING_TRIGGER_MULTIPLIER, description="Controls when LLM reranking activates (lower = more aggressive)") - - relaxed_semantic_threshold_multiplier: float = Field(default=Constants.RELAXED_SEMANTIC_THRESHOLD_MULTIPLIER, description="Adjusts similarity threshold for memory consolidation (lower = more candidates)") - max_message_chars: int = Field(default=Constants.MAX_MESSAGE_CHARS, description="Maximum user message length before skipping memory operations") + semantic_retrieval_threshold: float = Field(default=Constants.SEMANTIC_RETRIEVAL_THRESHOLD, description="Minimum similarity threshold for memory retrieval") + relaxed_semantic_threshold_multiplier: float = Field(default=Constants.RELAXED_SEMANTIC_THRESHOLD_MULTIPLIER, description="Adjusts similarity threshold for memory consolidation (lower = more candidates)") + enable_llm_reranking: bool = Field(default=True, description="Enable LLM-based memory reranking for improved contextual selection") + llm_reranking_trigger_multiplier: float = Field(default=Constants.LLM_RERANKING_TRIGGER_MULTIPLIER, description="Controls when LLM reranking activates (lower = more aggressive)") def __init__(self): """Initialize the Memory System filter with production validation."""