M2b:删除旧 chat 体系——线性会话/叩心/情绪/纪念日模型与页面退役(迁移 003 双向验证),runs 去会话外键,测试全量修剪
This commit is contained in:
1 parent
5f36e3785c
commit
ad9c9e942a
22 files changed
+424
-427
No files matched your search
@@ -28,14 +28,12 @@ async def create_run(
|
||||
session: AsyncSession,
|
||||
*,
|
||||
character_id: str,
|
||||
session_id: str | None,
|
||||
model_hint: str,
|
||||
goal: str = "回复用户消息",
|
||||
origin: str = "chat",
|
||||
) -> Run:
|
||||
run = Run(
|
||||
character_id=character_id,
|
||||
session_id=session_id,
|
||||
status="running",
|
||||
goal=goal,
|
||||
origin=origin,
|
||||
@@ -175,17 +173,15 @@ async def get_run_response(run_id: str) -> RunResponse:
|
||||
async def list_runs_response(
|
||||
*,
|
||||
character_id: str | None = None,
|
||||
session_id: str | None = None,
|
||||
status: str | None = None,
|
||||
page: int = 1,
|
||||
page_size: int = 20,
|
||||
) -> Page[RunResponse]:
|
||||
"""Run 列表(按创建时间倒序);可选按人物/会话/状态过滤。归档页运行时间河数据源。"""
|
||||
"""Run 列表(按创建时间倒序);可选按人物/状态过滤。归档页运行时间河数据源。"""
|
||||
async with AsyncSessionLocal() as session:
|
||||
items, total = await runtime_repo.list_runs(
|
||||
session,
|
||||
character_id=character_id,
|
||||
session_id=session_id,
|
||||
status=status,
|
||||
page=page,
|
||||
page_size=page_size,
|
||||
|
||||
Reference in new issue
Block a user