From a698b5f8321b630c544d0c45122978564cbb3f9f Mon Sep 17 00:00:00 2001 From: Alexej Wolff Date: Thu, 7 May 2026 00:55:00 +0200 Subject: [PATCH] fix: increase max_tokens to 1500, stricter grammar rules --- src/services/deepseek.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/services/deepseek.ts b/src/services/deepseek.ts index ad9f537..5b8ab57 100644 --- a/src/services/deepseek.ts +++ b/src/services/deepseek.ts @@ -88,7 +88,7 @@ export async function sendMessageStream( body: JSON.stringify({ messages, temperature, - max_tokens: 1000, + max_tokens: 1500, }), signal, }); @@ -199,7 +199,8 @@ LANGUAGE: ${story.language} GENRE: ${story.genre.join(", ")} SETTING: ${settingInfo} -IMPORTANT: Respond ONLY in language: ${story.language}. Use proper grammar and spelling. +IMPORTANT: Respond ONLY in language: ${story.language}. +CRITICAL: Use PERFECT grammar and spelling. Double-check every word for typos. No misspellings allowed. === PLAYER CHARACTER === Name: ${player?.name || "Hero"} @@ -255,6 +256,7 @@ RIGHT: **"Я ему не доверяю,"** пробормотала она. Descriptions and narration — plain text without any asterisks. ${oocRules} Respond in language: ${story.language} +CRITICAL: Use PERFECT grammar and spelling. Double-check every word before writing. No typos or misspellings allowed! === PLAYER CHARACTER === Name: ${player?.name || "Hero"} @@ -312,7 +314,7 @@ export function buildDynamicContext( • Do NOT ask "What do you do?" — end with atmosphere, not questions • Format dialogue: **"text"** (double asterisks = bold) • React to player's words explicitly -• Use proper grammar and spelling in the story language +• CRITICAL: Use PERFECT grammar and spelling. Double-check every word. No typos or misspellings! • Characters can only be where they logically should be based on their last known location` : "";