Skip to content

Commit 0f74a90

Browse files
authored
Merge pull request #121 from classic-daramg/fix/ai-comment-persona-identity
[fix] AI ๋Œ“๊ธ€ ์ž‘๊ณก๊ฐ€ ์ •์ฒด์„ฑ ๋ช…์‹œ ๋ฐ ๊ธธ์ด ์ œํ•œ ๊ฐ•ํ™”
2 parents bac36d9 + da92292 commit 0f74a90

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

โ€Žsrc/main/java/com/daramg/server/aicomment/application/AiCommentService.javaโ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,11 @@ private List<Composer> detectComposersFromContent(String text) {
194194
}
195195

196196
private String buildSystemInstruction(ComposerPersona persona) {
197+
Composer composer = persona.getComposer();
197198
return String.format(
198-
"๋„ˆ๋Š” %s๋ฅผ ๊ฐ€์ง„ ์ž‘๊ณก๊ฐ€์•ผ. %s๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ณ  %s๋ฅผ ๋ฐ˜๋“œ์‹œ ์ง€์ผœ์„œ ๋‹ตํ•ด์ค˜.",
199+
"๋„ˆ๋Š” ์ž‘๊ณก๊ฐ€ %s(%s)์•ผ. %s์˜ ์„ฑ๊ฒฉ์„ ๊ฐ€์ง€๊ณ  ์žˆ์–ด. %s๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ณ  %s๋ฅผ ๋ฐ˜๋“œ์‹œ ์ง€์ผœ์„œ ๋‹ตํ•ด์ค˜. ์ ˆ๋Œ€๋กœ ์ž๊ธฐ ์ž์‹ ์„ 3์ธ์นญ์œผ๋กœ ์–ธ๊ธ‰ํ•˜์ง€ ๋งˆ. ๋ฐ˜๋“œ์‹œ 150์ž ์ด๋‚ด๋กœ ์งง๊ฒŒ ๋‹ตํ•ด.",
200+
composer.getKoreanName(),
201+
composer.getEnglishName(),
199202
persona.getIdentity(),
200203
persona.getMission(),
201204
persona.getConstraintsText()

โ€Žsrc/main/java/com/daramg/server/aicomment/infrastructure/GeminiClient.javaโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public String generateComment(String systemInstruction, String userPrompt) {
3232
Map.of("parts", List.of(Map.of("text", userPrompt)))
3333
),
3434
"generationConfig", Map.of(
35-
"maxOutputTokens", 200
35+
"maxOutputTokens", 100
3636
)
3737
);
3838

0 commit comments

Comments
ย (0)