feat:接入mongodb
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""会话存储:创建时即占位,用于校验 ID 由后端签发;当前为进程内存实现"""
|
||||
"""会话存储:创建时即占位,用于校验 ID 由后端签发;此处为协议和进程内存实现,MongoDB 实现见 conversation_mongo"""
|
||||
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from typing import Protocol
|
||||
@@ -9,7 +9,7 @@ from app.schemas.conversation import Turn
|
||||
|
||||
|
||||
class ConversationStore(Protocol):
|
||||
"""后续接入 MongoDB 时实现同一组方法,业务代码不需要改动"""
|
||||
"""内存和 MongoDB 实现同一组方法,业务代码不需要关心具体存储"""
|
||||
|
||||
async def create(self) -> str: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user