From: Daniel Bevenius Date: Fri, 3 May 2024 13:24:30 +0000 (+0200) Subject: llama : rename ctx to user_data in progress_callback (#7045) X-Git-Tag: upstream/0.0.4488~1704 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=433def286e98751bf17db75dce53847d075c0be5;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama : rename ctx to user_data in progress_callback (#7045) * 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 --- diff --git a/llama.h b/llama.h index 059d78f1..790339af 100644 --- 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