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 c970d41

Browse filesBrowse files
committed
fix: llama_log_set should be able to accept null pointer
1 parent 9677a1f commit c970d41
Copy full SHA for c970d41

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_cpp.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_cpp.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,15 +2528,15 @@ def llama_print_system_info() -> bytes:
25282528
# // If this is not called, or NULL is supplied, everything is output on stderr.
25292529
# LLAMA_API void llama_log_set(ggml_log_callback log_callback, void * user_data);
25302530
def llama_log_set(
2531-
log_callback: "ctypes._FuncPointer", user_data: c_void_p # type: ignore
2531+
log_callback: Union["ctypes._FuncPointer", c_void_p], user_data: c_void_p # type: ignore
25322532
):
25332533
"""Set callback for all future logging events.
25342534
25352535
If this is not called, or NULL is supplied, everything is output on stderr."""
25362536
return _lib.llama_log_set(log_callback, user_data)
25372537

25382538

2539-
_lib.llama_log_set.argtypes = [llama_log_callback, c_void_p]
2539+
_lib.llama_log_set.argtypes = [ctypes.c_void_p, c_void_p]
25402540
_lib.llama_log_set.restype = None
25412541

25422542

0 commit comments

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