Skip to content

Commit

Permalink
llama.swiftui : use correct pointer for llama_token_eos (#4797)
Browse files Browse the repository at this point in the history
  • Loading branch information
illescasDaniel committed Jan 6, 2024
1 parent 96e80da commit c75ca5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ actor LlamaContext {
new_token_id = llama_sample_token_greedy(context, &candidates_p)
}

if new_token_id == llama_token_eos(context) || n_cur == n_len {
if new_token_id == llama_token_eos(model) || n_cur == n_len {
print("\n")
let new_token_str = String(cString: temporary_invalid_cchars + [0])
temporary_invalid_cchars.removeAll()
Expand Down

0 comments on commit c75ca5d

Please sign in to comment.