system prompt backend
This commit is contained in:
@@ -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));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user