Skip to content

[FEAT]: RAG 기반 채팅 서비스 및 Spring AI 연동 설정#16

Open
dydwls2227 wants to merge 3 commits intodevelopfrom
feat/chat
Open

[FEAT]: RAG 기반 채팅 서비스 및 Spring AI 연동 설정#16
dydwls2227 wants to merge 3 commits intodevelopfrom
feat/chat

Conversation

@dydwls2227
Copy link
Collaborator

@dydwls2227 dydwls2227 commented Mar 5, 2026

#️⃣연관된 이슈

ex) #10

📝작업 내용

Spring AI 의존성 추가

Spring AI BOM 1.1.0
비용 절감을 위해 Vertex AI (유료, GCP 서비스 계정) → Google AI Studio (무료, API 키) 방식으로 전환

  • ChatMessage 엔티티, ChatMessageRepository 구현
  • ChatService/ChatServiceImpl (RAG: 벡터 검색 → 컨텍스트 → Gemini 호출)
  • MockChatService (로컬 테스트용 더미 응답)
  • ChatController (Swagger 문서화 포함)
  • application.yml: Vertex AI Gemini/Embedding 설정
  • application-local.yml: Chroma 자동설정 exclude, 더미 AI 설정
  • ChatServiceImpl/ChatController에 @Profile(!local) 적용

스크린샷 (선택)

💬리뷰 요구사항(선택)

Chroma DB 연동 및 실제 RAG 테스트는 Data Pipeline 담당자 구현 후 진행해야 합니다.
현재 로컬에서는 MockChatService가 더미 응답 제공하고 있습니다.

- Spring AI 1.0.0 (Vertex AI Gemini + Embedding + Chroma) 의존성 추가
- ChatMessage 엔티티, ChatMessageRepository 구현
- ChatService/ChatServiceImpl (RAG: 벡터 검색 → 컨텍스트 → Gemini 호출)
- MockChatService (로컬 테스트용 더미 응답)
- ChatController (Swagger 문서화 포함)
- application.yml: Vertex AI Gemini/Embedding 설정
- application-local.yml: Chroma 자동설정 exclude, 더미 AI 설정
- ChatServiceImpl/ChatController에 @Profile(!local) 적용
- Spring AI BOM 1.0.0 → 1.1.0 업그레이드
- spring-ai-starter-model-vertex-ai-gemini/embedding 제거
- spring-ai-starter-model-google-genai 추가 (무료 API 키 방식)
- application.yml: Vertex AI 설정 → Google GenAI API 키 설정
- application-local.yml: 더미 Vertex AI 값 → 더미 GenAI API 키
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChatMessage를 Role로 구분한 건 대화 문맥을 관리하기에 아주 좋은 것 같습니다. 그런데 현재 ASSISTANT 역할일 떄도 memberId가 필수여서 DB에 무조건 넣어야 하는 구조입니다. 이 부분 개선되면 좋을 것 같습니다!

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.

2 participants