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:
parent
0b0fe663f8
commit
49a700ccff
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue