Skip to content

Commit

Permalink
fix: adapt to breaking llama.cpp changes (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd authored Mar 21, 2024
1 parent d841fff commit 6b012a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llama/addon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class LLAMAContext : public Napi::ObjectWrap<LLAMAContext> {
}

if (options.Has("embedding")) {
context_params.embedding = options.Get("embedding").As<Napi::Boolean>().Value();
context_params.embeddings = options.Get("embedding").As<Napi::Boolean>().Value();
}

if (options.Has("threads")) {
Expand Down Expand Up @@ -409,7 +409,7 @@ class LLAMAContextEvalWorker : Napi::AsyncWorker, Napi::Promise::Deferred {
llama_sample_tail_free(ctx->ctx, &candidates_p, tfs_z, min_keep);
llama_sample_typical(ctx->ctx, &candidates_p, typical_p, min_keep);
llama_sample_top_p(ctx->ctx, &candidates_p, resolved_top_p, min_keep);
llama_sample_temperature(ctx->ctx, &candidates_p, temperature);
llama_sample_temp(ctx->ctx, &candidates_p, temperature);
new_token_id = llama_sample_token(ctx->ctx, &candidates_p);
}

Expand Down

0 comments on commit 6b012a6

Please sign in to comment.