Skip to content

채팅 AI 서버 연동#180

Open
ckdals4600 wants to merge 1 commit intomainfrom
feature/#178-connect-chat-ai
Open

채팅 AI 서버 연동#180
ckdals4600 wants to merge 1 commit intomainfrom
feature/#178-connect-chat-ai

Conversation

@ckdals4600
Copy link
Contributor

@ckdals4600 ckdals4600 commented Feb 26, 2026

관련 이슈

PR 설명

  • 외부 AI 서버와 연동하여 RAG 기반 채팅 답변을 생성하는 Feign Client 및 서비스 구현함.
  • 답변 생성 과정의 상태 추적 및 모니터링 강화를 위해 로깅 추가함.

작업 내용

API 명세

  • AI 채팅 답변 요청 (generateAnswer)
    • Endpoint: POST /webhook/chat-answer
    • 동작: 사용자 질문 및 대화 기록을 AI 서버로 전송하고, 분석된 답변 및 참조 링크, 추론 과정을 List 형태로 수신함.

비즈니스 로직

  • RagAnswerFeign 신규 작성: AI 서버(ai.server.url)와 통신하는 Feign Client 인터페이스 구현함.
  • AnswerClient 구현체 프로파일 분리:
    • RagAnswerClient (!test 프로파일): 실제 Feign Client를 호출하며, 통신 예외 발생 시 트랜잭션 롤백 없이 에러 로그를 남기고 null을 반환하도록 Soft Fail 처리함. 응답받은 List 데이터 중 첫 번째 요소를 반환함.
    • MockAnswerClient (test 프로파일): 외부 API 호출 없이 더미 데이터를 반환하도록 구현함.
  • ChatFacade 로깅 추가:
    • 작업 취소(isCancelled), 예외 발생(ex != null), 결과값 누락(result == null) 등 예외 상황별 상세 로그(info/error) 기록 로직 추가함.

@ckdals4600 ckdals4600 linked an issue Feb 26, 2026 that may be closed by this pull request
@ckdals4600 ckdals4600 self-assigned this Feb 26, 2026
@ckdals4600 ckdals4600 force-pushed the feature/#178-connect-chat-ai branch from 68529f3 to aa7f690 Compare February 26, 2026 14:43
@ckdals4600 ckdals4600 requested review from Goder-0 and minibr February 27, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

채팅 AI 서버 연동

1 participant