model temperature settings
This commit is contained in:
@@ -43,7 +43,14 @@ router.patch('/', (req, res) => {
|
||||
return res.status(400).json({ error: `Path not accessible: ${val}` });
|
||||
}
|
||||
updates.modelsFolderPath = val;
|
||||
}
|
||||
}
|
||||
|
||||
if (req.body.temperature !== undefined) {
|
||||
const val = Number(req.body.temperature);
|
||||
if (isNaN(val) || val < 0 || val > 2)
|
||||
return res.status(400).json({ error: 'temperature must be 0–2' });
|
||||
updates.temperature = val;
|
||||
}
|
||||
|
||||
res.json(settings.save(updates));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user