5f5edb1e6d
- 상담 기록 분석 및 요약 - 상담 기록 db 저장 - 상담 평가 - 상담 평가 db 저장
23 lines
968 B
Python
23 lines
968 B
Python
from sqlalchemy.orm import Session
|
|
from backend.repository.models import CallEvaluation
|
|
from backend.schemas.evaluation_schema import EvaluationResponse
|
|
|
|
|
|
# 질의 응답
|
|
def get_call_evaluation(call_id:int, db:Session):
|
|
# DB 검색 - call_id와 일치하는 정보 추출
|
|
if call_id:
|
|
evaluation = db.query(CallEvaluation).filter(CallEvaluation.call_id == call_id).first()
|
|
|
|
return EvaluationResponse(
|
|
identity_verification=evaluation.identity_verification,
|
|
identity_verification_reason=evaluation.identity_verification_reason,
|
|
empathy=evaluation.empathy,
|
|
empathy_reason=evaluation.empathy_reason,
|
|
issue_resolution=evaluation.issue_resolution,
|
|
issue_resolution_reason=evaluation.issue_resolution_reason,
|
|
survey_guidance=evaluation.survey_guidance,
|
|
survey_guidance_reason=evaluation.survey_guidance_reason,
|
|
score=evaluation.score,
|
|
created_at=evaluation.created_at,
|
|
) |