Merge branch 'refactor/backend-architecture' into development
This commit is contained in:
23
api/app/features/memory/service.py
Normal file
23
api/app/features/memory/service.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
MemoryService — conversation / memoir 的统一门面。
|
||||
一期先实现基础接口签名,具体逻辑后续补充。
|
||||
"""
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
|
||||
class MemoryService:
|
||||
def __init__(self, db: AsyncSession):
|
||||
self._db = db
|
||||
|
||||
async def ingest_transcript(self, user_id: str, conversation_id: str, transcript: str) -> str:
|
||||
"""Ingest conversation transcript into memory. Returns source_id."""
|
||||
raise NotImplementedError("Phase 2+ implementation")
|
||||
|
||||
async def retrieve(self, user_id: str, query: str, *, top_k: int = 10) -> dict:
|
||||
"""Retrieve relevant evidence for a query. 一期返回空结构,二期接入混合检索。"""
|
||||
return {
|
||||
"relevant_chunks": [],
|
||||
"relevant_summaries": [],
|
||||
"relevant_facts": [],
|
||||
"timeline_hints": [],
|
||||
}
|
||||
Reference in New Issue
Block a user