PII 표시 토큰 누출 보정
This commit is contained in:
parent
61a41d1f08
commit
7cece90e33
19 changed files with 284 additions and 197 deletions
|
|
@ -247,6 +247,8 @@ async def _retrieve_live_coach_grounding(
|
|||
) -> list[live_coach.LiveCoachGrounding]:
|
||||
"""라이브 코치용 평가 근거 회수. 미가용 시 빈 리스트로 진행한다."""
|
||||
learner_masked = guardrail.mask_pii(learner_text).text_masked
|
||||
# LiveCoachRequest.client_reply는 브라우저가 보내는 제어 입력이므로 합성 출력이
|
||||
# 아니다. 일반 입력용 PII 게이트를 유지해 문맥 없는 실제 이름도 차단한다.
|
||||
client_masked = guardrail.mask_pii(client_reply or "").text_masked
|
||||
query = " ".join(
|
||||
part for part in [stage, theory_mode, learner_masked, client_masked] if part
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ from ..persona_repository import (
|
|||
from ..runtime_policy import require_runtime_fallback_allowed
|
||||
from ..services import (
|
||||
evaluator,
|
||||
guardrail,
|
||||
multimodal_alliance,
|
||||
multimodal_alliance_store,
|
||||
orchestrator,
|
||||
|
|
@ -1512,7 +1513,7 @@ def _client_turn_text_for_speech(sess: InProcSession, turn_seq: int) -> str | No
|
|||
match = visible_clients[index] if 0 <= index < len(visible_clients) else None
|
||||
if match is not None:
|
||||
text = (match.text_masked or match.text).strip()
|
||||
return text or None
|
||||
return guardrail.humanize_pii_placeholders(text) or None
|
||||
return None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue