diff --git a/demo/utils/simple_memory_manager.py b/demo/utils/simple_memory_manager.py index f5526650..b0b2908e 100644 --- a/demo/utils/simple_memory_manager.py +++ b/demo/utils/simple_memory_manager.py @@ -244,7 +244,6 @@ async def search( query: Query text top_k: Number of results to return (default: 3) mode: Retrieval mode (default: "rrf") - - "rrf": RRF fusion (recommended) - "keyword": Keyword retrieval (BM25) - "vector": Vector retrieval - "hybrid": Keyword + Vector + Rerank diff --git a/docker-compose.yaml b/docker-compose.yaml index 29407030..373f860b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -14,7 +14,6 @@ services: - "27017:27017" volumes: - mongodb_data:/data/db - - ./docker/mongodb/init:/docker-entrypoint-initdb.d networks: - memsys-network healthcheck: diff --git a/src/biz_layer/mem_db_operations.py b/src/biz_layer/mem_db_operations.py index 66519a42..03800bfd 100644 --- a/src/biz_layer/mem_db_operations.py +++ b/src/biz_layer/mem_db_operations.py @@ -143,7 +143,7 @@ def _convert_timestamp_to_time( try: dt = from_iso_format(timestamp) return to_iso_format(dt) - except: + except Exception: # If parsing fails, return string directly return timestamp else: diff --git a/src/infra_layer/adapters/out/search/repository/episodic_memory_milvus_repository.py b/src/infra_layer/adapters/out/search/repository/episodic_memory_milvus_repository.py index 4aad056b..7b1e7131 100644 --- a/src/infra_layer/adapters/out/search/repository/episodic_memory_milvus_repository.py +++ b/src/infra_layer/adapters/out/search/repository/episodic_memory_milvus_repository.py @@ -124,7 +124,7 @@ async def create_and_save_episodic_memory( metadata_json = metadata try: metadata_dict = json.loads(metadata) - except: + except Exception: metadata_dict = {} # Prepare entity data diff --git a/src/memory_layer/prompts/en/episode_mem_prompts.py b/src/memory_layer/prompts/en/episode_mem_prompts.py index 3ff63378..364bf588 100644 --- a/src/memory_layer/prompts/en/episode_mem_prompts.py +++ b/src/memory_layer/prompts/en/episode_mem_prompts.py @@ -17,12 +17,12 @@ Custom instructions: {custom_instructions} -IMPORTANT TIME HANDLING: -- Use the provided "Conversation start time" as the exact time when this conversation/episode began -- When the conversation mentions relative times (e.g., "yesterday", "last week"), preserve both the original relative expression AND calculate the absolute date -- Format time references as: "original relative time (absolute date)" - e.g., "last week (May 7, 2023)" -- This dual format supports both absolute and relative time-based questions -- All absolute time calculations should be based on the provided start time +IMPORTANT TIME HANDLING (STRICT ISO 8601): +- Always use ISO 8601 format with timezone: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS+HH:MM +- Example correct formats: 2026-01-23T02:19:25Z or 2026-01-23T10:07:00+08:00 +- NEVER use Chinese characters (年, 月, 日), weekdays, or partial times +- Example incorrect: "2026年1月22日11:25:33" or "2026年1月23日 02:19:25 UTC" +- Always convert relative times to absolute ISO 8601 format Please generate a structured episodic memory and return only a JSON object containing the following two fields: {{