Skip to content

Commit 3e00e8e

Browse files
committed
Remove unnecessary checks in LlamaContext Class
1 parent 93c9f7e commit 3e00e8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

llama_cpp/_internals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def memory_clear(self, data: bool):
340340
llama_cpp.llama_memory_clear(self.get_memory(), data)
341341

342342
def memory_seq_rm(self, seq_id: int, p0: int, p1: int) -> bool:
343-
if self.ctx is not None and seq_id >= 0:
343+
if self.ctx is not None:
344344
return llama_cpp.llama_memory_seq_rm(self.get_memory(), seq_id, p0, p1)
345345
else:
346346
return False

0 commit comments

Comments
 (0)