This commit is contained in:
Xuan Son Nguyen
2026-08-22 02:04:35 +02:00
parent e8bdf2cb52
commit cdcd63bc03
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -2,6 +2,7 @@
#include "common.h" #include "common.h"
#include <algorithm> #include <algorithm>
#include <limits>
#include <map> #include <map>
#include <regex> #include <regex>
#include <sstream> #include <sstream>
+2 -2
View File
@@ -655,14 +655,14 @@ struct server_slot {
res["n_prompt_tokens_processed"] = stats.n_prompt_processed; res["n_prompt_tokens_processed"] = stats.n_prompt_processed;
res["n_prompt_tokens_cache"] = stats.n_prompt_cached; res["n_prompt_tokens_cache"] = stats.n_prompt_cached;
res["params"] = ptask->params.to_json(only_metrics); res["params"] = ptask->params.to_json(only_metrics);
res["next_token"] = { res["next_token"] = json::array({
{ {
{"has_next_token", has_next_token}, {"has_next_token", has_next_token},
{"has_new_line", has_new_line}, {"has_new_line", has_new_line},
{"n_remain", n_remaining()}, {"n_remain", n_remaining()},
{"n_decoded", stats.n_gen}, {"n_decoded", stats.n_gen},
} }
}; });
if (!only_metrics) { if (!only_metrics) {
res["prompt"] = ptask->tokens.detokenize(ctx_tgt, true); res["prompt"] = ptask->tokens.detokenize(ctx_tgt, true);