Skip to content

Commit 993b767

Browse files
committed
server : fix duplicated n_predict key in the generation_settings (#8994)
Author: Riceball Lee
1 parent 84337c2 commit 993b767

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ struct server_context {
15291529

15301530
return json {
15311531
{"n_ctx", slot.n_ctx},
1532-
{"n_predict", slot.n_predict},
1532+
{"n_predict", slot.n_predict}, // Server configured n_predict
15331533
{"model", params.model_alias},
15341534
{"seed", slot.sparams.seed},
15351535
{"temperature", slot.sparams.temp},
@@ -1556,7 +1556,7 @@ struct server_context {
15561556
{"mirostat_eta", slot.sparams.mirostat_eta},
15571557
{"penalize_nl", slot.sparams.penalize_nl},
15581558
{"stop", slot.params.antiprompt},
1559-
{"n_predict", slot.params.n_predict}, // TODO: fix duplicate key n_predict
1559+
{"max_tokens", slot.params.n_predict}, // User configured n_predict
15601560
{"n_keep", slot.params.n_keep},
15611561
{"n_discard", slot.params.n_discard},
15621562
{"ignore_eos", ignore_eos},

0 commit comments

Comments
 (0)