세션 계약 SSOT 정리
This commit is contained in:
parent
1881fe50bd
commit
17b114f647
8 changed files with 43 additions and 47 deletions
|
|
@ -31,6 +31,7 @@ from ..store import InProcSession, TurnRecord, store
|
|||
router = APIRouter(prefix="/sessions", tags=["sessions"])
|
||||
|
||||
TheoryMode = Literal["humanistic", "cbt", "integrative"]
|
||||
StageLabel = Literal["라포", "탐색", "개입", "정리"]
|
||||
EndStateValue = str | int | float | bool | None | dict[str, float]
|
||||
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ class SessionStartResponse(BaseModel):
|
|||
session_id: str
|
||||
case_id: str
|
||||
session_no: int
|
||||
stage: str
|
||||
stage: StageLabel
|
||||
effective_openness: float
|
||||
recall_summary: Optional[str] = None
|
||||
degraded: bool = False
|
||||
|
|
@ -61,7 +62,7 @@ class CrisisResourceResponse(BaseModel):
|
|||
|
||||
class TurnResponse(BaseModel):
|
||||
turn_seq: int
|
||||
stage: str
|
||||
stage: StageLabel
|
||||
effective_openness: float
|
||||
client_reply: Optional[str] = None
|
||||
safety_flagged: bool = False
|
||||
|
|
@ -83,7 +84,7 @@ class LearnerSessionSummary(BaseModel):
|
|||
persona_name: str
|
||||
session_no: int
|
||||
status: Literal["active", "ended"]
|
||||
stage: str
|
||||
stage: StageLabel
|
||||
turn_count: int
|
||||
learner_turn_count: int
|
||||
client_turn_count: int
|
||||
|
|
@ -100,7 +101,7 @@ class LearnerSessionsResponse(BaseModel):
|
|||
class SessionDetailTurn(BaseModel):
|
||||
turn_seq: int
|
||||
speaker: Literal["learner", "client"]
|
||||
stage: str
|
||||
stage: StageLabel
|
||||
text: str
|
||||
created_at: str
|
||||
|
||||
|
|
@ -112,7 +113,7 @@ class SessionDetailResponse(BaseModel):
|
|||
persona_name: str
|
||||
theory_mode: str
|
||||
status: Literal["active", "ended"]
|
||||
stage: str
|
||||
stage: StageLabel
|
||||
effective_openness: float
|
||||
started_at: str
|
||||
ended_at: str | None = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue