This commit is contained in:
parent
5decc2b675
commit
73c0d33818
BIN
documentation/en/docs/assets/favicon.ico
Normal file
BIN
documentation/en/docs/assets/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 KiB |
@ -14,7 +14,7 @@ theme:
|
|||||||
name: material
|
name: material
|
||||||
custom_dir: overrides
|
custom_dir: overrides
|
||||||
language: en
|
language: en
|
||||||
# favicon: assets/favicon.ico
|
favicon: assets/favicon.ico
|
||||||
icon:
|
icon:
|
||||||
logo: simple/openai
|
logo: simple/openai
|
||||||
repo: fontawesome/brands/github
|
repo: fontawesome/brands/github
|
||||||
|
@ -115,19 +115,16 @@ public class PersonalChatGPTUnit implements PersonUnitConfiguration {
|
|||||||
.triggerCheck(mail -> {
|
.triggerCheck(mail -> {
|
||||||
if (mail.getFromPersonId().equals(appProperty.getTelegramId())) {
|
if (mail.getFromPersonId().equals(appProperty.getTelegramId())) {
|
||||||
final Optional<CommandAttachment> firstCommand = Attachments.findFirstCommand(mail.getAttachments());
|
final Optional<CommandAttachment> firstCommand = Attachments.findFirstCommand(mail.getAttachments());
|
||||||
if (firstCommand.isPresent()) {
|
return firstCommand.isEmpty();
|
||||||
return !firstCommand.get().getCommandType().equals("/start");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
.answer(message -> {
|
.answer(message -> {
|
||||||
telegramService.executeAction(message.getFromPersonId(), ChatAction.TYPING);
|
|
||||||
|
|
||||||
final long countMessages = chatGptService.getCountMessages(chatInfo.getChatId());
|
final long countMessages = chatGptService.getCountMessages(chatInfo.getChatId());
|
||||||
|
|
||||||
final StringBuilder builder = new StringBuilder();
|
final StringBuilder builder = new StringBuilder();
|
||||||
builder.append("Wait... Response is being generated...\nIt might take a long time ⏳");
|
builder.append("Wait... Response is being generated...\nIt might take a long time ⏳");
|
||||||
|
telegramService.executeAction(message.getFromPersonId(), ChatAction.TYPING);
|
||||||
|
|
||||||
if (countMessages > 40) {
|
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."));
|
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."));
|
||||||
|
Loading…
Reference in New Issue
Block a user