Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ public String makeQuestionString(ChatGPTQuestionDTO chatGPTQuestionDTO) {
question += "\n";
}

question += "아래형식을 반드시지켜서 등호의오른쪽에 답변내용을 넣어줘. 점수는100점만점으로숫자만넣어줘. 추천제품은 구체적인제품명을 영어는최대한적지말고 한국어로알려줘\n" +
// care 답변 길이가 varchar(255)를 넘는 경우가 있어 255자 이내로 요약해달라는 내용 추가함
question += "아래형식을 반드시지켜서 등호의오른쪽에 답변내용을 넣어줘. 점수는100점만점으로 숫자만 넣어줘. 추천제품은 구체적인제품명을 영어는최대한적지말고 한국어로알려주고, detail과 care는 각각 255자 이내로 요약해줘.\n" +
"위 기록의 점수는 [score=점수]점입니다. [detail=세부설명] [care=추후관리법] 추천 제품은 다음과 같습니다. " +
"[product1=추천제품] [product2=추천제품] [product3=추천제품] [product4=추천제품] [product5=추천제품]";

Expand Down Expand Up @@ -408,7 +409,7 @@ public String diagnoseByChatGPT(String question) {
ChatGPTCompletionDTO chatGPTCompletionDTO = new ChatGPTCompletionDTO("user", question);

// String으로 받아온 questions를 DTO에 넣어서 DTO 구성
ChatGPTRequestDTO chatGPTRequestDTO = new ChatGPTRequestDTO("gpt-4o", List.of(chatGPTCompletionDTO));
ChatGPTRequestDTO chatGPTRequestDTO = new ChatGPTRequestDTO("gpt-5-nano", List.of(chatGPTCompletionDTO));
// System.out.println("chatGPTRequestDTO is : " + chatGPTRequestDTO);

// ObjectMapper를 사용하여 DTO를 JSON 문자열로 변환
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Integer getPointsByMember(Long memberId) throws Exception {
// 포인트 객체가 없을 경우 객체를 생성함
point = Point.builder()
.member(managedMember)
.points(10)
.points(3)
.updatedAt(LocalDateTime.now())
.build();

Expand All @@ -76,14 +76,21 @@ public Integer getPointsByMember(Long memberId) throws Exception {
Integer points = point.getPoints();
LocalDateTime updatedAt = point.getUpdatedAt();

System.out.println("조회된 포인트: " + points);
// 지금 여기가 아예 출력이 안되는데????

if (isToday(updatedAt)) { // 최근 포인트 업데이트 날짜가 오늘이라면 그대로 해당 포인트를 반환함
System.out.println("테스트1");
return points;
} else {
// 최근 포인트 업데이트 날짜가 오늘이 아니라면 10점으로 초기화 후 반환함
point.setPoints(10);
// 최근 포인트 업데이트 날짜가 오늘이 아니라면 3점으로 초기화 후 반환함
// 기존 10점 -> 3점으로 변경
System.out.println("테스트2");
point.setPoints(3);
System.out.println("업데이트된 포인트: " + points);
point.setUpdatedAt(LocalDateTime.now());
pointRepository.save(point);
return 10;
return 3;
}
}

Expand Down