Skip to content

Commit 44b0b20

Browse files
committed
prompt improved
1 parent 8a992ec commit 44b0b20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

application/src/main/java/org/togetherjava/tjbot/features/moderation/TransferQuestionCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ public void onMessageContext(MessageContextInteractionEvent event) {
9797
String authorId = event.getTarget().getAuthor().getId();
9898
String mostCommonTag = tags.get(0);
9999
String chatGptPrompt = String.format(
100-
"Generate title for question: %s. Minimum %s and maximum %s characters. Return only the title.",
100+
"Generate topic for question: %s. Minimum %s and maximum %s characters.",
101101
originalMessage, TITLE_MIN_LENGTH, TITLE_MAX_LENGTH);
102102
Optional<String> chatGptResponse =
103103
chatGptService.ask(chatGptPrompt, String.join(",", tags));
104-
String title = chatGptResponse.orElse(createTitle(originalMessage)).replace("?", "");
104+
String title = chatGptResponse.orElse(createTitle(originalMessage));
105105

106106
TextInput modalTitle = TextInput.create(MODAL_TITLE_ID, "Title", TextInputStyle.SHORT)
107107
.setMaxLength(TITLE_MAX_LENGTH)

0 commit comments

Comments
 (0)