From ad317498135a8c041ae37ea135800a80100e6217 Mon Sep 17 00:00:00 2001 From: legop3 Date: Wed, 25 Feb 2026 05:19:42 -0500 Subject: [PATCH] set frequency to 0 (instant skipped or not) --- server/prompts/commentary_system.txt | 2 +- server/src/services/llmCommentaryService.js | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/server/prompts/commentary_system.txt b/server/prompts/commentary_system.txt index c4063060..3026ab82 100644 --- a/server/prompts/commentary_system.txt +++ b/server/prompts/commentary_system.txt @@ -12,7 +12,7 @@ Do not invent facts. Do not assume people's intentions, motivations, or next actions. Use self-quieting: -- If self_talk_recent_5m >= 1, strongly prefer SKIP. +- If self_talk_recent_30m >= 5, strongly prefer SKIP. Significant examples: wheels_off_ground true, dock/charge change, battery_low true, clear chat+rover event tie. Never post generic filler like "X is on the move". diff --git a/server/src/services/llmCommentaryService.js b/server/src/services/llmCommentaryService.js index ff571910..f1eb46dc 100644 --- a/server/src/services/llmCommentaryService.js +++ b/server/src/services/llmCommentaryService.js @@ -11,9 +11,9 @@ const { getNickname } = require('./nicknameService'); const { getRecentMessages, sendSystemMessage } = require('./chatService'); const PROMPT_PATH = path.join(__dirname, '..', '..', 'prompts', 'commentary_system.txt'); -const DEFAULT_FREQUENCY_MS = 120000; -const MIN_FREQUENCY_MS = 15000; -const JITTER_MS = 30000; +const DEFAULT_FREQUENCY_MS = 0; +const MIN_FREQUENCY_MS = 0; +const JITTER_MS = 0; const MAX_ROVERS = 6; const MAX_CHAT_MESSAGES = 6; const MAX_BOT_MESSAGES = 1; @@ -21,6 +21,7 @@ const MAX_OUTPUT_CHARS = 140; const SKIP_TOKEN = 'SKIP'; const ACTIVITY_WINDOW_MS = 30000; const ACTIVITY_BUCKET_MS = 1000; +const SELF_TALK_WINDOW_MS = 30 * 60 * 1000; const config = loadConfig(); const commentaryConfig = config.llmCommentary || {}; @@ -328,14 +329,16 @@ function buildSnapshot() { .filter((entry) => Number(entry?.ts) >= contextResetAt) .filter((entry) => entry?.system); const lastBotMessage = botRecentWindow.length ? botRecentWindow[botRecentWindow.length - 1] : null; - const botRecent5m = botRecentWindow.filter((entry) => nowMs - Number(entry?.ts || 0) <= 5 * 60 * 1000); + const botRecent30m = botRecentWindow.filter( + (entry) => nowMs - Number(entry?.ts || 0) <= SELF_TALK_WINDOW_MS, + ); return { activity: { active_driver_count: driverEntries.length, driving_rovers: driverEntries.map(([roverId]) => String(roverId)), }, - self_talk_recent_5m: botRecent5m.length, + self_talk_recent_30m: botRecent30m.length, last_message_focus: buildLastMessageFocus(lastBotMessage, rovers), rovers, chat_recent: chatRecent,