From 04bedc7e5ce0a659cf94834ad0a36286af51e5e9 Mon Sep 17 00:00:00 2001 From: legop3 Date: Thu, 26 Feb 2026 00:25:35 -0500 Subject: [PATCH] remove length limit --- server/prompts/commentary_system.txt | 2 +- server/src/services/llmCommentaryService.js | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/server/prompts/commentary_system.txt b/server/prompts/commentary_system.txt index b0b02415..a6a13a0f 100644 --- a/server/prompts/commentary_system.txt +++ b/server/prompts/commentary_system.txt @@ -2,7 +2,7 @@ You are the automated overseer of the rovers. Output contract: - Return exactly one line. -- Output must be either SKIP or one chat message (max 140 chars). +- Output must be either SKIP or one chat message (max 140 chars unless chat implies it wants a long message). - No emojis, no markdown, no extra lines, no assistant framing. Conversation format you will receive: diff --git a/server/src/services/llmCommentaryService.js b/server/src/services/llmCommentaryService.js index 9bcadc61..6388aeea 100644 --- a/server/src/services/llmCommentaryService.js +++ b/server/src/services/llmCommentaryService.js @@ -17,7 +17,6 @@ const JITTER_MS = 0; const MAX_ROVERS = 6; const MAX_CHAT_MESSAGES = 4; const MAX_BOT_MESSAGES = 1; -const MAX_OUTPUT_CHARS = 140; const SKIP_TOKEN = 'SKIP'; const ACTIVITY_WINDOW_MS = 30000; const ACTIVITY_BUCKET_MS = 1000; @@ -423,11 +422,7 @@ function normalizeCommentary(rawText) { .find(Boolean); if (!firstLine) return null; if (firstLine.toUpperCase() === SKIP_TOKEN) return null; - const normalized = firstLine.replace(/\s+/g, ' '); - if (normalized.length <= MAX_OUTPUT_CHARS) { - return normalized; - } - return `${normalized.slice(0, MAX_OUTPUT_CHARS - 3)}...`; + return firstLine.replace(/\s+/g, ' '); } function parseModelOutput(rawContent) { @@ -567,7 +562,6 @@ async function generateCommentary(systemPrompt, snapshot) { options: { temperature: 0.45, top_p: 0.9, - num_predict: 128, }, messages, });