Просмотр исходного кода

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

Daniel Illescas Romero 2 лет назад
Родитель
Сommit
c75ca5d96f
1 измененных файлов с 1 добавлено и 1 удалено
  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()