Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit abc538f

Browse filesBrowse files
committed
fix: annoying bug where attribute exceptions were droining out file not found exceptions
1 parent ffa8121 commit abc538f
Copy full SHA for abc538f

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,10 +1503,10 @@ def create_chat_completion(
15031503
return self._convert_text_completion_to_chat(completion)
15041504

15051505
def __del__(self):
1506-
if self.model is not None:
1506+
if hasattr(self, "model") and self.model is not None:
15071507
llama_cpp.llama_free_model(self.model)
15081508
self.model = None
1509-
if self.ctx is not None:
1509+
if hasattr(self, "ctx") and self.ctx is not None:
15101510
llama_cpp.llama_free(self.ctx)
15111511
self.ctx = None
15121512

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.