summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Illescas Romero <illescas.daniel@protonmail.com>2024-01-06 16:12:59 +0100
committerGitHub <noreply@github.com>2024-01-06 17:12:59 +0200
commitc75ca5d96f902564cbbbdd7f5cade80d53c288bb (patch)
tree97b0593b1f5b31279d5d2547e36841ebb5ad445f
parent96e80dabc6e73ff68b09b68947b1fc25883c5094 (diff)
llama.swiftui : use correct pointer for llama_token_eos (#4797)
-rw-r--r--examples/llama.swiftui/llama.cpp.swift/LibLlama.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift b/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
index 66244382..8696b493 100644
--- a/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
+++ b/examples/llama.swiftui/llama.cpp.swift/LibLlama.swift
@@ -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()