refactor(eval+memoir):精简内部评测路由与服务,composite/对话摘要与 judge 能力补强
- 访谈:新增 interview_state_hints,联动 orchestrator 与提示词 - 回忆录:story_pipeline_sync/state/memory/post_commit 与 Celery 任务调整 - 基建:开发用 celery broker、compose/development 脚本、依赖注入 - eval-web:移除数据集/实验/版本等页面与流式轮询,突出 Playground - 文档与单测同步
This commit is contained in:
@@ -97,6 +97,7 @@ class ReplayConversationService:
|
||||
conversation_id: str,
|
||||
fixture_filename: str,
|
||||
flush_memoir_after: bool,
|
||||
skip_memoir: bool,
|
||||
skip_tts: bool,
|
||||
) -> tuple[int, list[str], list[str]]:
|
||||
try:
|
||||
@@ -112,6 +113,7 @@ class ReplayConversationService:
|
||||
conversation_id=conversation_id,
|
||||
utterances=utterances,
|
||||
flush_memoir_after=flush_memoir_after,
|
||||
skip_memoir=skip_memoir,
|
||||
skip_tts=skip_tts,
|
||||
)
|
||||
return n, utterances, segment_ids
|
||||
@@ -122,6 +124,7 @@ class ReplayConversationService:
|
||||
conversation_id: str,
|
||||
utterances: list[str],
|
||||
flush_memoir_after: bool,
|
||||
skip_memoir: bool,
|
||||
skip_tts: bool,
|
||||
) -> tuple[int, list[str]]:
|
||||
cid = (conversation_id or "").strip()
|
||||
@@ -144,11 +147,12 @@ class ReplayConversationService:
|
||||
segment = await conv_service.create_user_segment(conv, conv.user_id, text)
|
||||
segment_ids.append(segment.id)
|
||||
ts = segment.created_at or conv.last_message_at
|
||||
await background_runner.queue_message(
|
||||
conv.user_id,
|
||||
segment.id,
|
||||
text_char_count=len(text),
|
||||
)
|
||||
if not skip_memoir:
|
||||
await background_runner.queue_message(
|
||||
conv.user_id,
|
||||
segment.id,
|
||||
text_char_count=len(text),
|
||||
)
|
||||
await process_user_message(
|
||||
conversation_id=cid,
|
||||
user_message=text,
|
||||
@@ -161,14 +165,19 @@ class ReplayConversationService:
|
||||
)
|
||||
count += 1
|
||||
|
||||
if flush_memoir_after and conv.user_id:
|
||||
if (
|
||||
flush_memoir_after
|
||||
and conv.user_id
|
||||
and (not skip_memoir)
|
||||
):
|
||||
await background_runner.flush_pending(conv.user_id)
|
||||
|
||||
logger.info(
|
||||
"eval replay done conversation_id={} turns={} flush={} skip_tts={}",
|
||||
"eval replay done conversation_id={} turns={} flush={} skip_memoir={} skip_tts={}",
|
||||
cid,
|
||||
count,
|
||||
flush_memoir_after,
|
||||
skip_memoir,
|
||||
skip_tts,
|
||||
)
|
||||
return count, segment_ids
|
||||
|
||||
Reference in New Issue
Block a user