Skip to content

Conversation

@jeemin65-pixel
Copy link
Contributor

@jeemin65-pixel jeemin65-pixel commented Dec 31, 2025

📝요약(Summary)

이슈 번호 : #번호

🔨변경 사항(Changes)

-AI 관련 코드는 철호님이 작성해주신 코드를 활용했고, 폴더 세분화와 부분적인 수정을 하였습니다
-/integration/openai 안에 폴더를 세분화해서 파일을 넣어두었습니다
-build.gradle > AI 관련 의존성 추가
-ErrorCode > vector, FAQ 관련 에러코드 추가
-OpenAIPropertires > record 구조를 application-local.yml 에 맞게 수정
-application-local.yml > AI 관련 설정 추가 (OPENAI_API_KEY 환경변수로 추가 해주시면 됩니다!)
-/domain/faq/Category > 아직 챗봇에 활용할 도메인 범위를 정하지 않아서 임의로 ACCOUNT, ORDER, PAYMENT, OTHER 를 넣었습니다
-FAQ 로만 챗봇을 만들 거라서 VectorType 에 FAQ 만 넣었습니다
-DefaultVectorApi > @requiredargsconstructor 사용 시 초기값이 있는 token은 생성자 주입 대상에서 제외되고 openAIProperties만 주입되면서 초기화 순서 문제로 에러가 발생했습니다. 그래서 @requiredargsconstructor 대신 수동으로 생성자를 주입하는 방식으로 변경했습니다. 혹시 권장되는 방식이 있다면 알려주시면 그에 맞게 수정하거나 나중에 가능하면 WebClient를 사용한 구조로 리팩토링 할 예정입니다
-Postman 에서 vector store 생성, file 업로드 (sample.json 임의로 만들어서 진행), vector store 에 file 연결, search 테스트 진행했습니다

추가 변경사항
-OpenAIConfiguration 에 OpenAIClient Bean 등록
-OpenAIProperties > @ConfigurationProperties(prefix = "spring.ai") 로 prefix 수정
-application-local.yml > ai 관련 설정이 spring 내부에 들어오도록 수정, enabled = true 로 설정
-application-test.yml > ai enabled = false 로 설정 (테스트에서는 외부 AI API 를 불러오지 않도록 함)
-DefaultVectorApi 에 @Profile(“!test”) 추가
-테스트 환경에 FakeVectorApi 추가 > contextLoads 는 ApplicationContext 로딩 여부만 검증하는 것이니
OpenAI 외부 API에 의존하는 DefaultVectorApi 대신 테스트 환경에서는 FakeVectorApi 를 사용하도록 해서 contextLoads 에러를 해결했습니다
-Answer 값 분리 (아직 진행 중) > OpenAICustomAdvisor 에서 코드를 수정했는데 생각보다 잘 안 돼서 우선 주석 처리 해두고 기존 코드를 올려놨습니다

😉리뷰 요구사항

지금 AI 관련 설정은 local.yml 에만 넣어둔 상태인데, 저희가 postman 에서 api 요청을 하고 결과만 받는 선에서 AI 기능을 끝낸다면 dev / prod 에 enabled=false 를 넣어두기만 할지 아니면 그냥 local.yml 에만 넣어두는게 좋을까요?

Copy link
Contributor

@DaveLee-b DaveLee-b left a comment

Choose a reason for hiding this comment

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

확인했습니다 yml설정은 다른 파일에서도 돌아가는지 확인해보고 적용해보면 좋을것같습니다

Copy link
Contributor

@jong15325 jong15325 left a comment

Choose a reason for hiding this comment

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

큰 작업이라 그런지 보기가 쉽지가 않네요 전체적으로 확인 완료했습니다!

Copy link
Contributor

@jungyoyang jungyoyang left a comment

Choose a reason for hiding this comment

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

확인했습니다!

@jeemin65-pixel jeemin65-pixel merged commit a438a55 into develop Jan 6, 2026
1 check passed
@jeemin65-pixel jeemin65-pixel deleted the SHOP-115 branch January 8, 2026 02:29
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.

5 participants