File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ class LLAMAContextEvalWorker : Napi::AsyncWorker, Napi::Promise::Deferred {
391
391
}
392
392
393
393
if (use_grammar && (grammar_evaluation_state)->grammar != nullptr ) {
394
- llama_sample_grammar ( ctx->ctx , &candidates_p, (grammar_evaluation_state)-> grammar );
394
+ llama_grammar_sample ((grammar_evaluation_state)-> grammar , ctx->ctx , &candidates_p);
395
395
}
396
396
397
397
if (temperature <= 0 ) {
@@ -414,7 +414,7 @@ class LLAMAContextEvalWorker : Napi::AsyncWorker, Napi::Promise::Deferred {
414
414
}
415
415
416
416
if (new_token_id != eos_token && use_grammar && (grammar_evaluation_state)->grammar != nullptr ) {
417
- llama_grammar_accept_token (ctx-> ctx , (grammar_evaluation_state)->grammar , new_token_id);
417
+ llama_grammar_accept_token ((grammar_evaluation_state)->grammar , ctx-> ctx , new_token_id);
418
418
}
419
419
420
420
result = new_token_id;
You can’t perform that action at this time.
0 commit comments