Skip to content

Commit fbd3c19

Browse files
author
ochafik
committed
add cast to please some gccs
1 parent 2e656f9 commit fbd3c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ struct server_task {
392392
const std::string & word = t.at("value");
393393
auto ids = common_tokenize(vocab, word, /* add_special= */ false, /* parse_special= */ true);
394394
if (ids.size() == 1) {
395-
auto token = ids[0];
395+
auto token = (llama_token) ids[0];
396396
if (std::find(params.sampling.preserved_tokens.begin(), params.sampling.preserved_tokens.end(), token) == params.sampling.preserved_tokens.end()) {
397397
throw std::runtime_error("Grammar trigger word should be marked as preserved token: " + word);
398398
}

0 commit comments

Comments
 (0)