Writing documentation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Struchkov Mark 2023-03-15 23:09:06 +03:00
parent 5decc2b675
commit 73c0d33818
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
3 changed files with 3 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

View File

@ -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

View File

@ -115,19 +115,16 @@ public class PersonalChatGPTUnit implements PersonUnitConfiguration {
.triggerCheck(mail -> {
if (mail.getFromPersonId().equals(appProperty.getTelegramId())) {
final Optional<CommandAttachment> 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."));