server : make token_with_probs non-const (clang-tidy)

According to the 'performance-no-automatic-move' check, this allows an
automatic move of the return value (std::move) instead of a copy.
This commit is contained in:
Cebtenzzre 2023-09-05 18:46:19 -04:00
parent 0b0fe663f8
commit 49a700ccff

View file

@ -611,7 +611,7 @@ struct llama_server_context
completion_token_output doCompletion() completion_token_output doCompletion()
{ {
const completion_token_output token_with_probs = nextToken(); auto token_with_probs = nextToken();
const std::string token_text = token_with_probs.tok == -1 ? "" : llama_token_to_piece(ctx, token_with_probs.tok); const std::string token_text = token_with_probs.tok == -1 ? "" : llama_token_to_piece(ctx, token_with_probs.tok);
generated_text += token_text; generated_text += token_text;