diff --git a/documentation/en/docs/assets/favicon.ico b/documentation/en/docs/assets/favicon.ico new file mode 100644 index 0000000..b542a84 Binary files /dev/null and b/documentation/en/docs/assets/favicon.ico differ diff --git a/documentation/en/mkdocs.yml b/documentation/en/mkdocs.yml index 94ba6e9..9c817ed 100644 --- a/documentation/en/mkdocs.yml +++ b/documentation/en/mkdocs.yml @@ -14,7 +14,7 @@ theme: name: material custom_dir: overrides language: en -# favicon: assets/favicon.ico + favicon: assets/favicon.ico icon: logo: simple/openai repo: fontawesome/brands/github diff --git a/src/main/java/dev/struchkov/example/bot/unit/PersonalChatGPTUnit.java b/src/main/java/dev/struchkov/example/bot/unit/PersonalChatGPTUnit.java index 4753e80..e0f5e93 100644 --- a/src/main/java/dev/struchkov/example/bot/unit/PersonalChatGPTUnit.java +++ b/src/main/java/dev/struchkov/example/bot/unit/PersonalChatGPTUnit.java @@ -115,19 +115,16 @@ public class PersonalChatGPTUnit implements PersonUnitConfiguration { .triggerCheck(mail -> { if (mail.getFromPersonId().equals(appProperty.getTelegramId())) { final Optional firstCommand = Attachments.findFirstCommand(mail.getAttachments()); - if (firstCommand.isPresent()) { - return !firstCommand.get().getCommandType().equals("/start"); - } + return firstCommand.isEmpty(); } return false; }) .answer(message -> { - telegramService.executeAction(message.getFromPersonId(), ChatAction.TYPING); - final long countMessages = chatGptService.getCountMessages(chatInfo.getChatId()); final StringBuilder builder = new StringBuilder(); builder.append("Wait... Response is being generated...\nIt might take a long time ⏳"); + telegramService.executeAction(message.getFromPersonId(), ChatAction.TYPING); if (countMessages > 40) { builder.append(Strings.escapeMarkdown("\n-- -- -- -- --\nWe recommend periodically clearing the conversation context (/clear_context). If this is not done, then the memory resources on your PC will run out."));