fix: keep dave chat responsive on llm failures
This commit is contained in:
@@ -611,10 +611,14 @@ export class TelegramAlerter {
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('[Telegram] AI chat error:', err.message);
|
||||
await this.sendMessage('AI chat failed. Please try again or use /status to check the LLM configuration.', {
|
||||
await this.sendConversation([
|
||||
'Dave bekommt gerade keine stabile Antwort vom Modell.',
|
||||
'Ich bleibe erreichbar. Frag kurz nach Status, Quellen, Briefing, Maerkten, Websuche oder starte einen Sweep nach Bestaetigung.',
|
||||
], {
|
||||
chatId: replyChatId,
|
||||
replyToMessageId: msg.message_id,
|
||||
parseMode: null,
|
||||
maxChunkChars: 360,
|
||||
});
|
||||
} finally {
|
||||
stopTyping();
|
||||
@@ -978,7 +982,7 @@ Respond with ONLY valid JSON:
|
||||
const signals = Array.isArray(evaluation.signals) ? evaluation.signals.map(compactLine).filter(Boolean).slice(0, 2) : [];
|
||||
|
||||
const messages = [
|
||||
`[DAVE // ${tierLabel}]\n${headline}`,
|
||||
german ? `Kurzer Hinweis: ${headline}` : `${tierLabel}: ${headline}`,
|
||||
];
|
||||
|
||||
if (reason && reason !== headline) {
|
||||
|
||||
Reference in New Issue
Block a user