Skip to content
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

Refactor: 프롬프트 수정 #99

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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