]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : rename ctx to user_data in progress_callback (#7045)
authorDaniel Bevenius <redacted>
Fri, 3 May 2024 13:24:30 +0000 (15:24 +0200)
committerGitHub <redacted>
Fri, 3 May 2024 13:24:30 +0000 (15:24 +0200)
* llama : rename ctx to user_data in progress_callback

This commit renames the `ctx` parameter to `user_data` in the
`llama_progress_callback` typedef.

The motivation for this is that other callbacks use `user_data` or
`data`, and using `ctx` in this case might be confusing as it could be
confused with `llama_context`.

---------

Signed-off-by: Daniel Bevenius <redacted>
llama.h

diff --git a/llama.h b/llama.h
index 059d78f115c6dd1731a6b52de57951f35dee102b..790339af93083c6ee5987b77ec3edf90f1572be5 100644 (file)
--- a/llama.h
+++ b/llama.h
@@ -171,7 +171,7 @@ extern "C" {
         bool sorted;
     } llama_token_data_array;
 
-    typedef bool (*llama_progress_callback)(float progress, void *ctx);
+    typedef bool (*llama_progress_callback)(float progress, void * user_data);
 
     // Input data for llama_decode
     // A llama_batch object can contain input about one or many sequences