update error logging

cutting all kind of prefixes for prompt making
This commit is contained in:
2026-01-28 16:40:29 +03:00
parent 9a76d36568
commit 63c64dfa8e
19 changed files with 107 additions and 100 deletions
+2 -3
View File
@@ -4,7 +4,6 @@ import {abortOllamaRequest, bot, getOllamaRequest, ollama, ollamaRequests} from
import {
collectReplyChainText,
escapeMarkdownV2Text,
extractText,
logError,
oldReplyToMessage,
startIntervalEditor
@@ -37,7 +36,7 @@ export class OllamaChat extends ChatCommand {
const chatMessages = messageParts.map(part => {
return {
role: part.bot ? "assistant" : "user",
content: (Environment.USE_NAMES_IN_PROMPT && !part.bot ? `MESSAGE FROM USER "${part.name}":\n` : "") + extractText(part.content, Environment.BOT_PREFIX),
content: (Environment.USE_NAMES_IN_PROMPT && !part.bot ? `MESSAGE FROM USER "${part.name}":\n` : "") + part.content,
images: part.images
};
});
@@ -198,7 +197,7 @@ export class OllamaChat extends ChatCommand {
reply_markup: {inline_keyboard: []}
}).catch(logError);
console.error(error);
logError(error);
await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${error.toString()}`).catch(logError);
}
}