Skip to content

Commit 4347eb7

Browse files
committed
fix recreate context
1 parent ec8e022 commit 4347eb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llama_cpp/llama.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,9 +2561,10 @@ def recreate_context(
25612561
type_v: Data type for V cache.
25622562
"""
25632563

2564-
current_state = self.save_state()
2565-
2564+
current_state = None
2565+
25662566
if self._ctx is not None:
2567+
current_state = self.save_state()
25672568
self._ctx.close()
25682569
self._ctx = None
25692570

0 commit comments

Comments
 (0)