Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion demo/utils/simple_memory_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ services:
- "27017:27017"
volumes:
- mongodb_data:/data/db
- ./docker/mongodb/init:/docker-entrypoint-initdb.d
networks:
- memsys-network
healthcheck:
Expand Down
2 changes: 1 addition & 1 deletion src/biz_layer/mem_db_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions src/memory_layer/prompts/en/episode_mem_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
{{
Expand Down
6 changes: 6 additions & 0 deletions src/memory_layer/prompts/zh/episode_mem_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
自定义指令:
{custom_instructions}

重要时间格式要求(必须遵守):
- 必须使用ISO 8601格式:YYYY-MM-DDTHH:MM:SSZ 或 YYYY-MM-DDTHH:MM:SS+HH:MM
- 正确示例:2026-01-23T02:19:25Z 或 2026-01-23T10:07:00+08:00
- 禁止使用中文时间格式(如2026年1月22日11:25:33)、星期几、部分时间
- 相对时间(如昨天、上周)必须转换为绝对ISO 8601格式

请遵循以下指导原则:

1. **叙事性与连贯性**:
Expand Down