system prompt backend

This commit is contained in:
Storme-bit
2026-04-19 02:32:38 -07:00
parent 9c903a56ae
commit a0154e15e6
4 changed files with 25 additions and 27 deletions

View File

@@ -73,6 +73,13 @@ if (req.body.topK !== undefined) {
updates.topK = val;
}
if (req.body.systemPrompt !== undefined) {
const val = req.body.systemPrompt;
if (typeof val !== 'string')
return res.status(400).json({ error: 'systemPrompt must be a string' });
updates.systemPrompt = val.trim() || null; // null reverts to default
}
res.json(settings.save(updates));
});