Skip to content

Commit 4ff460d

Browse files
authored
Merge pull request #85 from sumbisori/feat/fix-paging-duplicate
fix: 페이징 중복 데이터 문제 및 GPT 프롬프트 수정
2 parents 5ff31c9 + 2597b24 commit 4ff460d

2 files changed

Lines changed: 23 additions & 9 deletions

File tree

src/main/java/com/groom/sumbisori/domain/experience/repository/ExperienceQueryRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Page<ExperienceQueryDto> findByUserId(Long userId, Pageable pageable) {
4141
.leftJoin(file).on(file.refId.eq(experience.id)
4242
.and(file.refType.eq(RefType.EXPERIENCE))
4343
.and(file.sequence.eq(REPRESENTATIVE_SEQUENCE)))
44-
.orderBy(experience.experienceDate.desc())
44+
.orderBy(experience.experienceDate.desc(), experience.id.asc())
4545
.offset(pageable.getOffset())
4646
.limit(pageable.getPageSize())
4747
.fetch();

src/main/java/com/groom/sumbisori/domain/file/service/ChatGPTService.java

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,29 @@
2121
public class ChatGPTService {
2222
private static final String PROMPT_TEXT = """
2323
Identify seafood and marine debris in the image.
24-
Return **only** the identified items from the following list along with their count.
25-
The response **must be a plain JSON array** without any metadata, schema, or additional fields.
26-
Use **"detail": "low"** in the image request to optimize for speed.
27-
Use exactly the English name key as shown in the list (do not change casing or add spacing).
24+
Return only the identified items from the following list along with their count.
25+
The response must be a plain JSON array without any metadata, schema, or additional fields.
26+
Use "detail": "low" in the image request to optimize for speed.
2827
29-
## List of Recognizable Items
30-
1. 전복 (Abalone), 2. 성게 (SeaUrchin), 3. 조개 (Clam), 6. 뿔소라 (Murex), 7. 미역 (SeaMustard), 8. 멍게 (SeaSquirt), 9. 홍합 (Mussel), 10. 고둥 (Gastropods)
31-
11. 굴 (Oyster), 12. 문어 (Octopus), 13. 해삼 (SeaCucumber), 14. 오징어 (Squid)
32-
15. 그물조각 (Net), 16. 밧줄 (Rope), 17. 비닐 (Vinyl), 18. 물병 (WaterBottle).
28+
Do not switch or mix koreanName and englishName fields.
29+
30+
## List of Recognizable Items (with fixed IDs)
31+
1. seafoodId: 1, koreanName: "전복", englishName: "Abalone"
32+
2. seafoodId: 2, koreanName: "성게", englishName: "SeaUrchin"
33+
3. seafoodId: 3, koreanName: "조개", englishName: "Clam"
34+
4. seafoodId: 6, koreanName: "뿔소라", englishName: "Murex"
35+
5. seafoodId: 7, koreanName: "미역", englishName: "SeaMustard"
36+
6. seafoodId: 8, koreanName: "멍게", englishName: "SeaSquirt"
37+
7. seafoodId: 9, koreanName: "홍합", englishName: "Mussel"
38+
8. seafoodId: 10, koreanName: "고둥", englishName: "Gastropods"
39+
9. seafoodId: 11, koreanName: "굴", englishName: "Oyster"
40+
10. seafoodId: 12, koreanName: "문어", englishName: "Octopus"
41+
11. seafoodId: 13, koreanName: "해삼", englishName: "SeaCucumber"
42+
12. seafoodId: 14, koreanName: "오징어", englishName: "Squid"
43+
13. seafoodId: 15, koreanName: "그물조각", englishName: "Net"
44+
14. seafoodId: 16, koreanName: "밧줄", englishName: "Rope"
45+
15. seafoodId: 17, koreanName: "비닐", englishName: "Vinyl"
46+
16. seafoodId: 18, koreanName: "물병", englishName: "WaterBottle"
3347
""";
3448

3549
private final ChatClient chatClient;

0 commit comments

Comments
 (0)