Skip to content

Commit 63bb00b

Browse files
committed
feat(ai): 면접 모드를 mode로 통합해 관리
1 parent 5489a9f commit 63bb00b

17 files changed

Lines changed: 35 additions & 29 deletions

ai/src/ai_server/chain/feedback_generation_chain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def generate(
2828
self,
2929
*,
3030
job_category: str,
31-
interview_type: str,
31+
mode: str,
3232
total_question_count: int | None,
3333
end_reason: str | None,
3434
transcript: str,
@@ -44,7 +44,7 @@ async def generate(
4444
self,
4545
*,
4646
job_category: str,
47-
interview_type: str,
47+
mode: str,
4848
total_question_count: int | None,
4949
end_reason: str | None,
5050
transcript: str,
@@ -53,7 +53,7 @@ async def generate(
5353
result = await self._chain.ainvoke(
5454
{
5555
"job_category": job_category,
56-
"interview_type": interview_type,
56+
"mode": mode,
5757
"total_question_count": total_question_count or 0,
5858
"end_reason": end_reason or "USER_REQUEST",
5959
"transcript": transcript,

ai/src/ai_server/chain/followup_generation_chain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async def generate(
2424
self,
2525
*,
2626
job_category: str,
27-
interview_type: str,
27+
mode: str,
2828
previous_question: str,
2929
answer_text: str,
3030
) -> FollowupResult: ...
@@ -38,14 +38,14 @@ async def generate(
3838
self,
3939
*,
4040
job_category: str,
41-
interview_type: str,
41+
mode: str,
4242
previous_question: str,
4343
answer_text: str,
4444
) -> FollowupResult:
4545
result = await self._chain.ainvoke(
4646
{
4747
"job_category": job_category,
48-
"interview_type": interview_type,
48+
"mode": mode,
4949
"previous_question": previous_question,
5050
"answer_text": answer_text,
5151
}

ai/src/ai_server/chain/prompts/feedback_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
HUMAN_PROMPT = (
2424
"직군: {job_category}\n"
25-
"면접 유형: {interview_type}\n"
25+
"면접 모드: {mode}\n"
2626
"총 질문 수: {total_question_count}\n"
2727
"종료 사유: {end_reason}\n\n"
2828
"=== 메시지 시퀀스 ===\n"

ai/src/ai_server/chain/prompts/followup_generation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
HUMAN_PROMPT = (
1919
"직군: {job_category}\n"
20-
"면접 유형: {interview_type}\n\n"
20+
"면접 모드: {mode}\n\n"
2121
"직전 질문:\n{previous_question}\n\n"
2222
"지원자 답변:\n{answer_text}\n\n"
2323
"{format_instructions}"

ai/src/ai_server/chain/prompts/question_generation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# 질문 풀 생성 프롬프트 (US-18)
2-
# 분석된 이력서/레포 컨텍스트 + 직군 + 면접 유형 → 질문 N개.
2+
# 분석된 이력서/레포 컨텍스트 + 직군 + 면접 모드 → 질문 N개.
33

44
SYSTEM_PROMPT = (
55
"당신은 IT 직군 채용을 진행하는 시니어 면접관입니다. "
6-
"지원자 컨텍스트(이력서, GitHub 레포 분석)와 면접 유형에 맞춰 면접 질문 풀을 "
6+
"지원자 컨텍스트(이력서, GitHub 레포 분석)와 면접 모드에 맞춰 면접 질문 풀을 "
77
"생성하세요.\n"
88
"- 사실에 근거한 질문만. 자료에 없는 내용은 추측하지 않습니다.\n"
99
"- 자료에 명시된 기술 스택과 프로젝트 경험을 적극 인용하세요.\n"
@@ -15,7 +15,7 @@
1515

1616
HUMAN_PROMPT = (
1717
"직군: {job_category}\n"
18-
"면접 유형: {interview_type}\n"
18+
"면접 모드: {mode}\n"
1919
"최대 질문 수: {max_questions}\n\n"
2020
"지원자 컨텍스트 (이력서/레포 분석):\n"
2121
"---\n"
@@ -24,7 +24,7 @@
2424
"요구 사항:\n"
2525
"1. 정확히 {max_questions}개의 질문을 생성합니다.\n"
2626
"2. 각 질문에 적절한 category 를 부여합니다.\n"
27-
"3. 직군({job_category})·유형({interview_type}) 에 맞는 비중으로 카테고리 분배:\n"
27+
"3. 직군({job_category})·면접 모드({mode}) 에 맞는 비중으로 카테고리 분배:\n"
2828
" - TECHNICAL: CS_FUNDAMENTAL + TECH_CHOICE + PROJECT_DEEP_DIVE 중심.\n"
2929
" - PERSONALITY: BEHAVIORAL 중심.\n"
3030
" - INTEGRATED: 모두 균형.\n"

ai/src/ai_server/chain/question_generation_chain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async def generate(
2323
self,
2424
*,
2525
job_category: str,
26-
interview_type: str,
26+
mode: str,
2727
max_questions: int,
2828
context: str,
2929
) -> GeneratedQuestionPool: ...
@@ -37,14 +37,14 @@ async def generate(
3737
self,
3838
*,
3939
job_category: str,
40-
interview_type: str,
40+
mode: str,
4141
max_questions: int,
4242
context: str,
4343
) -> GeneratedQuestionPool:
4444
result = await self._chain.ainvoke(
4545
{
4646
"job_category": job_category,
47-
"interview_type": interview_type,
47+
"mode": mode,
4848
"max_questions": max_questions,
4949
"context": context,
5050
}

ai/src/ai_server/messaging/consumers/feedback_consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async def handle(self, message: AbstractIncomingMessage) -> None:
8787

8888
result = await self._generator.generate(
8989
job_category=req.job_category,
90-
interview_type=req.interview_type,
90+
mode=req.mode,
9191
total_question_count=req.total_question_count,
9292
end_reason=req.end_reason,
9393
transcript=transcript,

ai/src/ai_server/messaging/consumers/followup_consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def handle(self, message: AbstractIncomingMessage) -> None:
6262

6363
result = await self._generator.generate(
6464
job_category=req.job_category,
65-
interview_type=req.interview_type,
65+
mode=req.mode,
6666
previous_question=req.previous_question,
6767
answer_text=req.answer_text,
6868
)

ai/src/ai_server/messaging/consumers/questions_consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def handle(self, message: AbstractIncomingMessage) -> None:
7171
context_text = _build_context(req.documents)
7272
pool = await self._generator.generate(
7373
job_category=req.job_category,
74-
interview_type=req.interview_type,
74+
mode=req.mode,
7575
max_questions=effective_pool_size,
7676
context=context_text,
7777
)

ai/src/ai_server/model/messages/feedback.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from ai_server.model._config import camel_config
66

7+
InterviewMode = Literal["PERSONALITY", "TECHNICAL", "INTEGRATED"]
8+
79

810
class FeedbackMessageItem(BaseModel):
911
"""세션 시퀀스 한 줄 (Core 가 통째로 동봉)."""
@@ -21,7 +23,7 @@ class GenerateFeedbackRequest(BaseModel):
2123
model_config = camel_config()
2224

2325
session_id: int
24-
interview_type: Literal["PERSONALITY", "TECHNICAL", "LIVE_CODING", "INTEGRATED"]
26+
mode: InterviewMode
2527
job_category: Literal["FRONTEND", "BACKEND", "INFRA", "DBA"]
2628
total_question_count: int | None = None
2729
end_reason: Literal["USER_REQUEST", "MAX_QUESTIONS_REACHED"] | None = None

0 commit comments

Comments
 (0)