대시보드 이슈 정리 1차
This commit is contained in:
parent
94cc56592f
commit
f472883c31
13 changed files with 592 additions and 311 deletions
|
|
@ -1410,13 +1410,12 @@ async def submit_turn(
|
|||
detail=f"engine unavailable: {exc}",
|
||||
) from exc
|
||||
|
||||
await turn_runtime.record_completed_turn(
|
||||
await turn_runtime.finalize_completed_turn(
|
||||
sess,
|
||||
ctx,
|
||||
result,
|
||||
context_prefix="session",
|
||||
)
|
||||
await turn_runtime.record_safety_event(sess, ctx, result)
|
||||
|
||||
return TurnResponse(
|
||||
turn_seq=result.turn_seq,
|
||||
|
|
@ -1473,13 +1472,12 @@ async def stream_turn(
|
|||
data = {**ev.data, "stage": _stage_label(ctx.state_after.stage)}
|
||||
evaluation = await _evaluate_stream_turn(ctx, final_reply)
|
||||
result = _stream_result_from_done(ctx, final_reply, data, evaluation)
|
||||
await turn_runtime.record_completed_turn(
|
||||
await turn_runtime.finalize_completed_turn(
|
||||
sess,
|
||||
ctx,
|
||||
result,
|
||||
context_prefix="session",
|
||||
)
|
||||
await turn_runtime.record_safety_event(sess, ctx, result)
|
||||
yield {"event": "done", "data": json.dumps(data, ensure_ascii=False)}
|
||||
else:
|
||||
yield {"event": ev.event, "data": json.dumps(ev.data, ensure_ascii=False)}
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ async def _run_turn_and_speak(
|
|||
reply = result.client_reply or ""
|
||||
# Persist only after the client reply has been generated. A failed AI turn
|
||||
# must not leave a learner-only transcript in review or history.
|
||||
await turn_runtime.record_completed_turn(
|
||||
await turn_runtime.finalize_completed_turn(
|
||||
sess,
|
||||
ctx,
|
||||
result,
|
||||
|
|
@ -347,7 +347,6 @@ async def _run_turn_and_speak(
|
|||
evaluation=result.evaluation,
|
||||
),
|
||||
)
|
||||
await turn_runtime.record_safety_event(sess, ctx, result)
|
||||
|
||||
# Send the final client text before audio playback.
|
||||
await _safe_send_json(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue