From 5bb1bc74d1764059a2bae937bddd8960d5e46e27 Mon Sep 17 00:00:00 2001 From: Andrei Betlen Date: Fri, 31 Mar 2023 03:25:12 -0400 Subject: [PATCH] Fix type signature of token_to_str --- examples/llama_cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llama_cpp.py b/examples/llama_cpp.py index 2a43ca328..214050855 100644 --- a/examples/llama_cpp.py +++ b/examples/llama_cpp.py @@ -182,7 +182,7 @@ _lib.llama_get_embeddings.restype = POINTER(c_float) # Token Id -> String. Uses the vocabulary in the provided context -def llama_token_to_str(ctx: llama_context_p, token: int) -> bytes: +def llama_token_to_str(ctx: llama_context_p, token: llama_token) -> bytes: return _lib.llama_token_to_str(ctx, token)