llama.swiftui : use correct pointer for llama_token_eos (#4797)

This commit is contained in:
Daniel Illescas Romero
2024-01-06 16:12:59 +01:00
committed by GitHub
parent 33c9d849fd
commit 34d18eff4c

View File

@@ -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()