Skip to content

Commit 4f27cc3

Browse files
committed
fix recreate context
1 parent 3d7bc26 commit 4f27cc3

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
@@ -2560,9 +2560,10 @@ def recreate_context(
25602560
type_v: Data type for V cache.
25612561
"""
25622562

2563-
current_state = self.save_state()
2564-
2563+
current_state = None
2564+
25652565
if self._ctx is not None:
2566+
current_state = self.save_state()
25662567
self._ctx.close()
25672568
self._ctx = None
25682569

0 commit comments

Comments
 (0)