refactor(memory): remove expired_at field and add dialog_at timestamp
Remove the deprecated expired_at field from all graph models, Neo4j Cypher queries, repositories, and pipeline code. Replace with dialog_at on StatementNode to track the original dialog timestamp. - Strip expired_at from DialogueNode, ChunkNode, StatementNode, ExtractedEntityNode, edges, and all Cypher queries - Add dialog_at to MessageItem schema and propagate through extraction and graph build steps - Extract emotion/metadata async submission from WritePipeline into a generic _submit_celery_task helper - Add post_store_dedup_and_alias_merge Celery task for async alias merging and second-layer dedup after Neo4j write - Switch pytest async backend from anyio to asyncio_mode=auto
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from abc import ABC
|
||||
from enum import Enum
|
||||
from typing import Any, Optional
|
||||
from pydantic import Field
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
@@ -21,6 +22,10 @@ class MessageItem(BaseModel):
|
||||
"""单条消息结构"""
|
||||
role: str
|
||||
content: str
|
||||
dialog_at: Optional[str] = Field(
|
||||
None,
|
||||
description="该条消息发生的绝对时间(ISO 8601 格式),不传则使用服务端当前时间",
|
||||
)
|
||||
files: Optional[list[dict]] = None
|
||||
file_content: Optional[list[Any]] = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user