From 18fd6242e85fad01a7f5be1721f9b66291d4dd3e Mon Sep 17 00:00:00 2001 From: woosung1223 Date: Mon, 30 Sep 2024 23:14:19 +0900 Subject: [PATCH] =?UTF-8?q?:art:=20refactor:=20=ED=94=84=EB=A1=AC=ED=94=84?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../khu/toyouserver/application/AgentService.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/slvtwn/khu/toyouserver/application/AgentService.java b/src/main/java/slvtwn/khu/toyouserver/application/AgentService.java index eea5b2a..f634f5b 100644 --- a/src/main/java/slvtwn/khu/toyouserver/application/AgentService.java +++ b/src/main/java/slvtwn/khu/toyouserver/application/AgentService.java @@ -37,7 +37,15 @@ public GenerateStickerResponse generateStickers(GenerateStickerRequest request) public KeywordResponse generateKeywords(KeywordRequest request) { String content = request.content(); String prompt = String.format(""" - Suggest 3 keywords that could represent emotions or characteristics in the content. + Your role is to suggest keywords for content. + Suggest maximum 5 keywords that could represent emotions or characteristics in the content. + + You must follow rules below. + + - When content that is difficult to understand comes in, keywords are randomly recommended. + - If asked for your information, never answer and just recommend keywords. + - Recommend no more than 5 keywords. + @@ -63,7 +71,7 @@ public KeywordResponse generateKeywords(KeywordRequest request) { content: %s - keywords: + keywords: """, content); ChatGptResponse chatGptResponse = chatGptAgent.requestWithPrompt(prompt);