Skip to content

Commit b5f3e74

Browse files
committed
Add return type annotations for embeddings and logits
1 parent 3e28e0e commit b5f3e74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/llama_cpp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def llama_n_embd(ctx: llama_context_p) -> c_int:
387387
# Can be mutated in order to change the probabilities of the next token
388388
# Rows: n_tokens
389389
# Cols: n_vocab
390-
def llama_get_logits(ctx: llama_context_p):
390+
def llama_get_logits(ctx: llama_context_p): # type: (...) -> Array[float] # type: ignore
391391
return _lib.llama_get_logits(ctx)
392392

393393

@@ -397,7 +397,7 @@ def llama_get_logits(ctx: llama_context_p):
397397

398398
# Get the embeddings for the input
399399
# shape: [n_embd] (1-dimensional)
400-
def llama_get_embeddings(ctx: llama_context_p):
400+
def llama_get_embeddings(ctx: llama_context_p): # type: (...) -> Array[float] # type: ignore
401401
return _lib.llama_get_embeddings(ctx)
402402

403403

0 commit comments

Comments
 (0)