revert limit max n_predict

This commit is contained in:
ngxson 2024-03-09 15:52:08 +01:00
parent c15f5a6e1b
commit 400d4e637f

View file

@ -841,12 +841,12 @@ struct server_context {
} }
if (slot.n_predict > 0 && slot.params.n_predict > slot.n_predict) { if (slot.n_predict > 0 && slot.params.n_predict > slot.n_predict) {
// Might be better to reject the request with a 400 ?
LOG_WARNING("Max tokens to predict exceeds server configuration", { LOG_WARNING("Max tokens to predict exceeds server configuration", {
{"params.n_predict", slot.params.n_predict}, {"params.n_predict", slot.params.n_predict},
{"slot.n_predict", slot.n_predict}, {"slot.n_predict", slot.n_predict},
}); });
error_message = "Max tokens to predict exceeds server configuration"; slot.params.n_predict = slot.n_predict;
return false;
} }
// infill // infill