summaryrefslogtreecommitdiff
path: root/llama.h
diff options
context:
space:
mode:
Diffstat (limited to 'llama.h')
-rw-r--r--llama.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llama.h b/llama.h
index 7c7fd481..61f6c867 100644
--- a/llama.h
+++ b/llama.h
@@ -220,6 +220,14 @@ extern "C" {
LLAMA_API int llama_n_ctx (const struct llama_context * ctx);
LLAMA_API int llama_n_embd (const struct llama_context * ctx);
+ // Get the vocabulary as output parameters.
+ // Returns number of results.
+ LLAMA_API int llama_get_vocab(
+ const struct llama_context * ctx,
+ const char * * strings,
+ float * scores,
+ int capacity);
+
// Token logits obtained from the last call to llama_eval()
// The logits for the last token are stored in the last row
// Can be mutated in order to change the probabilities of the next token