Skip to content

Commit 09b212d

Browse files
committed
markdown hint
1 parent e19d486 commit 09b212d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

application/src/main/java/org/togetherjava/tjbot/features/chatgpt/ChatGptCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public void onModalSubmitted(ModalInteractionEvent event, List<String> args) {
8282

8383
String question = event.getValue(QUESTION_INPUT).getAsString();
8484

85-
Optional<String> chatgptResponse = chatGptService.ask(question, null);
85+
Optional<String> chatgptResponse =
86+
chatGptService.ask(question, "You may use markdown syntax for the response");
8687
if (chatgptResponse.isPresent()) {
8788
userIdToAskedAtCache.put(event.getMember().getId(), Instant.now());
8889
}

application/src/main/java/org/togetherjava/tjbot/features/help/HelpSystemHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ RestAction<Message> constructChatGptAttempt(ThreadChannel threadChannel,
140140
ForumTag matchingTag = getCategoryTagOfChannel(threadChannel).orElse(defaultTag);
141141

142142
String context =
143-
"Category %s on a Java Q&A discord server".formatted(matchingTag.getName());
143+
"Category %s on a Java Q&A discord server. You may use markdown syntax for the response"
144+
.formatted(matchingTag.getName());
144145
chatGptAnswer = chatGptService.ask(question, context);
145146

146147
if (chatGptAnswer.isEmpty()) {

0 commit comments

Comments
 (0)