-
Notifications
You must be signed in to change notification settings - Fork 0
[feat] 다정이 제거, 슬픔이 추가, 기쁨이에게 다정이 성격 추가 #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
dbfeb30
feat: 다정이 제외, 슬픔이 추가
kite707 13f109b
fix: 댓글 응답 스키마에서 생성에 쓰지 않는 캐릭터 id 제외
kite707 f2c792f
feat: 백오피스 캐릭터 선택·감정 색상에 슬픔이 반영
kite707 ecbd8e4
test: 생성 경로 테스트에서 다정이를 슬픔이로 교체
kite707 dd52760
docs: 감정 API 설명에 슬픔이 추가와 다정이 처리 명시
kite707 95145de
test: 감정 종류가 무관한 테스트에서 다정이를 슬픔이로 교체
kite707 9e10821
refactor: 다정이를 완전히 제거하고 감정 캐릭터를 6종으로 정리
kite707 9c6d7bf
docs: 감정 API 설명에서 다정이 안내 제거
kite707 4fbb4fa
chore: 백오피스 감정 색상표에서 다정이 제거
kite707 6928854
feat: 프롬프트에서 다정이를 빼고 슬픔이를 넣는 마이그레이션 추가
kite707 525dc60
chore: 출시 전 내부 테스트 대화·카드 데이터 정리 마이그레이션 추가
kite707 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
src/main/kotlin/com/nexters/gamss/emotion/domain/EmotionType.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,19 @@ | ||
| package com.nexters.gamss.emotion.domain | ||
|
|
||
| /** | ||
| * 감정 캐릭터 6종. 캐릭터 메시지가 어떤 감정의 말인지 나타낸다. | ||
| * 감정 캐릭터. 캐릭터 메시지가 어떤 감정의 말인지 나타낸다. | ||
| * | ||
| * 카드·메시지가 이 이름을 문자열로 저장하므로(`@Enumerated(EnumType.STRING)`) 상수를 지우거나 이름을 | ||
| * 바꾸면 그 값으로 저장된 과거 레코드를 읽는 순간 역직렬화가 깨진다. 캐릭터 교체는 상수 이름이 아니라 | ||
| * 마이그레이션까지 함께 봐야 하는 변경이다. | ||
| */ | ||
| enum class EmotionType( | ||
| val label: String, | ||
| ) { | ||
| JOY("기쁨"), | ||
| SADNESS("슬픔"), | ||
| ANGER("분노"), | ||
| ANXIETY("불안"), | ||
| GRUMPY("까칠"), | ||
| WARM("다정"), | ||
| QUIRKY("엉뚱"), | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
179 changes: 179 additions & 0 deletions
179
src/main/resources/db/migration/V26__replace_dajeong_with_seulpeum_prompts.sql
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
src/main/resources/db/migration/V27__purge_pre_launch_conversation_data.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| -- 출시 전 내부 테스트로 쌓인 대화·카드·생성 이력을 비운다. | ||
| -- | ||
| -- EmotionType에서 다정이(WARM)를 제거했기 때문에, 그 값으로 저장된 행이 남아 있으면 | ||
| -- 읽는 순간 @Enumerated(EnumType.STRING) 역직렬화가 실패한다(카드·대화 조회, 백오피스 | ||
| -- 감정 집계가 모두 이 경로다). 실사용자 배포 전이라 보존할 데이터가 없어 정리로 대응한다. | ||
| -- | ||
| -- ⚠️ 다정이 행만 골라 지우면 안 된다. messages.replies_to_message_id·root_message_id가 | ||
| -- 사라진 메시지를 가리켜 스레드가 끊긴다(다정이 댓글 -> 유저 답글 -> 캐릭터 재응답). | ||
| -- 그래서 네 테이블을 통째로 비운다 — 서로를 참조하는 컬럼이 이 안에만 있어 | ||
| -- (cards.conversation_id, generation_log.conversation_id, messages의 두 참조) | ||
| -- 함께 비우면 끊어진 참조가 남지 않는다. | ||
| -- | ||
| -- generation_log는 감정 컬럼이 없어 역직렬화와 무관하지만 함께 비운다. 남겨두면 대화가 | ||
| -- 0인데 생성 이력만 있는 상태가 되고, 대시보드 지표와 일일 토큰 상한이 이 테이블만 보기 | ||
| -- 때문에 새 캐릭터 구성 기준으로 다시 쌓는 편이 해석하기 쉽다. | ||
| -- | ||
| -- 회원·소셜 계정·프롬프트 설정은 남긴다(로그인과 프롬프트가 그대로 유지된다). | ||
| -- 새로 만든 환경에서는 대상 행이 없어 아무 일도 하지 않는다. | ||
|
|
||
| DELETE FROM messages; | ||
| DELETE FROM cards; | ||
| DELETE FROM conversations; | ||
| DELETE FROM generation_log; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/test/kotlin/com/nexters/gamss/llm/prompt/PromptCharacterIdTest.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package com.nexters.gamss.llm.prompt | ||
|
|
||
| import com.nexters.gamss.emotion.domain.EmotionType | ||
| import com.nexters.gamss.llm.error.CommentGenerationFailedException | ||
| import kotlin.test.Test | ||
| import kotlin.test.assertEquals | ||
| import kotlin.test.assertFailsWith | ||
|
|
||
| class PromptCharacterIdTest { | ||
| @Test | ||
| fun `모든 감정 캐릭터가 프롬프트 id를 가진다`() { | ||
| // 매핑이 빠진 채로 of()를 부르면 NoSuchElementException으로 죽는다. | ||
| EmotionType.entries.forEach { emotionType -> | ||
| assertEquals(emotionType, PromptCharacterId.of(emotionType).emotionType, "$emotionType 의 프롬프트 id가 없다") | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| fun `슬픔이는 seulpeum으로 번역된다`() { | ||
| assertEquals("seulpeum", PromptCharacterId.of(EmotionType.SADNESS).promptId) | ||
| assertEquals(EmotionType.SADNESS, PromptCharacterId.fromPromptId("seulpeum").emotionType) | ||
| } | ||
|
|
||
| @Test | ||
| fun `모르는 프롬프트 id는 생성 실패로 던진다`() { | ||
| assertFailsWith<CommentGenerationFailedException> { PromptCharacterId.fromPromptId("unknown") } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.