Skip to content

Commit 7e3b260

Browse files
committed
Reduce log level of a debug message leaking prompt contents
1 parent a2e0088 commit 7e3b260

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/server/server.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3818,7 +3818,7 @@ struct server_context {
38183818

38193819
// when the prompt prefix does not match, print the tokens around the mismatch
38203820
// this is useful for debugging prompt caching
3821-
{
3821+
if (GGML_LOG_LEVEL_DEBUG <= common_log_verbosity_thold) {
38223822
const int np0 = std::max<int>(slot.n_past - 4, 0);
38233823
const int np1 = std::min<int>(slot.n_past + 6, std::min(slot.prompt.tokens.size(), slot.task->tokens.size()));
38243824

@@ -3852,11 +3852,11 @@ struct server_context {
38523852
}
38533853
}
38543854

3855-
SLT_WRN(slot, "%s\n", ss0.str().c_str());
3856-
SLT_WRN(slot, "%s\n", ss1.str().c_str());
3855+
SLT_DBG(slot, "%s\n", ss0.str().c_str());
3856+
SLT_DBG(slot, "%s\n", ss1.str().c_str());
38573857

3858-
SLT_WRN(slot, "%s\n", st0.str().c_str());
3859-
SLT_WRN(slot, "%s\n", st1.str().c_str());
3858+
SLT_DBG(slot, "%s\n", st0.str().c_str());
3859+
SLT_DBG(slot, "%s\n", st1.str().c_str());
38603860
}
38613861

38623862
if (pos_min > pos_min_thold) {

0 commit comments

Comments
 (0)