From d7de0e8014d9b18cd7e1ede07c3ea786a532767e Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Sat, 15 Apr 2023 00:08:04 -0400 Subject: [PATCH] Bugfix --- llama_cpp/llama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_cpp/llama.py b/llama_cpp/llama.py index 93c6288..0754a8d 100644 --- a/llama_cpp/llama.py +++ b/llama_cpp/llama.py @@ -339,7 +339,7 @@ class Llama: prompt_tokens = self.tokenize(b" " + prompt.encode("utf-8")) text = b"" returned_characters = 0 - stop = stop if not None else [] + stop = stop if stop is not None else [] if self.verbose: llama_cpp.llama_reset_timings(self.ctx)