Improve narrative rules, update temperature defaults, fix session character loading
This commit is contained in:
+19
-14
@@ -54,6 +54,7 @@ export async function sendMessage(
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
// model: "deepseek-chat",
|
||||
model: "deepseek-chat",
|
||||
messages,
|
||||
temperature,
|
||||
@@ -213,20 +214,24 @@ ${nsfwBlock}
|
||||
=== NARRATIVE RULES ===
|
||||
1. Player writes their own actions and dialogue
|
||||
2. Weave player actions into the scene, describe character reactions and consequences
|
||||
3. NEVER make decisions for the player
|
||||
4. NEVER ask the player questions
|
||||
5. NEVER offer action choices
|
||||
6. NEVER assume player intentions
|
||||
3. Do not make decisions for the player — let them choose
|
||||
4. Do not ask questions like "What do you do?" or "What will you choose?"
|
||||
5. Do not offer explicit action choices
|
||||
6. Do not assume what player wants to do next
|
||||
7. No time skips without explicit indication
|
||||
8. If action not written by player — it did NOT happen
|
||||
|
||||
=== PROTAGONIST RULES ===
|
||||
You are NOT ALLOWED to:
|
||||
— describe MC's physical actions
|
||||
— describe their internal sensations, emotions, or thoughts
|
||||
— put words or dialogue in their mouth
|
||||
Until player writes an action or dialogue,
|
||||
the hero is considered motionless, silent, and observing.
|
||||
=== PROTAGONIST HANDLING ===
|
||||
Guidelines for the main character (MC):
|
||||
— Do not describe MC's physical actions (walking, grabbing, looking) unless player wrote them
|
||||
— Do not put thoughts or internal monologue in MC's mind
|
||||
— Do not speak for MC unless player wrote dialogue
|
||||
— When player hasn't acted, describe the scene and other characters' reactions
|
||||
— You may describe what MC perceives (sights, sounds, sensations) to set atmosphere
|
||||
— End scenes with situation that invites action, not with direct questions
|
||||
|
||||
WRONG: "Ты протягиваешь руку и берёшь кристалл. Что ты делаешь?"
|
||||
RIGHT: "Кристалл лежит на земле, мерцая голубым светом. Где-то вдали слышен стук копыт."
|
||||
|
||||
=== REACTIONS TO MC's DIALOGUE ===
|
||||
Characters MUST explicitly react to MC's words:
|
||||
@@ -341,8 +346,8 @@ export async function generateStoryResponse(
|
||||
{ role: "user", content: userMessage },
|
||||
];
|
||||
|
||||
// Use temperature from story settings (default 1.3)
|
||||
return sendMessage(messages, story.temperature || 1.3);
|
||||
// Use temperature from story settings (default 0.9 for balanced creative writing)
|
||||
return sendMessage(messages, story.temperature || 0.9);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -372,7 +377,7 @@ export async function generateStoryResponseStream(
|
||||
{ role: "user", content: userMessage },
|
||||
];
|
||||
|
||||
return sendMessageStream(messages, story.temperature || 1.3, onChunk, signal);
|
||||
return sendMessageStream(messages, story.temperature || 0.9, onChunk, signal);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user