File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ enum common_grammar_trigger_type {
120120
121121struct common_grammar_trigger {
122122 common_grammar_trigger_type type;
123- std::variant<llama_token, std::string> value = 0 ;
123+ std::variant<llama_token, std::string> value;
124124};
125125
126126// sampling parameters
Original file line number Diff line number Diff line change @@ -397,7 +397,10 @@ struct server_task {
397397 throw std::runtime_error (" Grammar trigger word should be marked as preserved token: " + word);
398398 }
399399 SRV_DBG (" Grammar trigger token: %d (`%s`)\n " , token, word.c_str ());
400- params.sampling .grammar_triggers .push_back ({COMMON_GRAMMAR_TRIGGER_TYPE_TOKEN, token});
400+ common_grammar_trigger trigger;
401+ trigger.type = COMMON_GRAMMAR_TRIGGER_TYPE_TOKEN;
402+ trigger.value = token;
403+ params.sampling .grammar_triggers .push_back (trigger);
401404 } else {
402405 SRV_DBG (" Grammar trigger word: `%s`\n " , word.c_str ());
403406 params.sampling .grammar_triggers .push_back ({COMMON_GRAMMAR_TRIGGER_TYPE_WORD, word});
You can’t perform that action at this time.
0 commit comments