Skip to content

Commit

Permalink
llama : rename ctx to user_data in progress_callback (ggerganov#7045)
Browse files Browse the repository at this point in the history
* 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 <daniel.bevenius@gmail.com>
  • Loading branch information
danbev authored May 3, 2024
1 parent 60325fa commit 433def2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 433def2

Please sign in to comment.