Explorar o código

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

Daniel Illescas Romero %!s(int64=2) %!d(string=hai) anos
pai
achega
c75ca5d96f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/llama.swiftui/llama.cpp.swift/LibLlama.swift

+ 1 - 1
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()