Skip to content

Commit

Permalink
Merge pull request #99 from Princess-in-silvertown/refactor/97
Browse files Browse the repository at this point in the history
Refactor: ํ”„๋กฌํ”„ํŠธ ์ˆ˜์ •
  • Loading branch information
woosung1223 authored Sep 30, 2024
2 parents acfc535 + 18fd624 commit 07a2b5c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main/java/slvtwn/khu/toyouserver/application/AgentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<rules>
- 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.
</rules>
<example>
<request>
Expand All @@ -63,7 +71,7 @@ public KeywordResponse generateKeywords(KeywordRequest request) {
</example>
content: %s
keywords:
keywords:
""", content);

ChatGptResponse chatGptResponse = chatGptAgent.requestWithPrompt(prompt);
Expand Down

0 comments on commit 07a2b5c

Please sign in to comment.