Add return type annotations for embeddings and logits
This commit is contained in:
parent
731c71255b
commit
f20b34a3be
1 changed files with 2 additions and 2 deletions
|
@ -381,7 +381,7 @@ _lib.llama_n_embd.restype = c_int
|
|||
# Can be mutated in order to change the probabilities of the next token
|
||||
# Rows: n_tokens
|
||||
# Cols: n_vocab
|
||||
def llama_get_logits(ctx: llama_context_p):
|
||||
def llama_get_logits(ctx: llama_context_p): # type: (...) -> Array[float] # type: ignore
|
||||
return _lib.llama_get_logits(ctx)
|
||||
|
||||
|
||||
|
@ -391,7 +391,7 @@ _lib.llama_get_logits.restype = POINTER(c_float)
|
|||
|
||||
# Get the embeddings for the input
|
||||
# shape: [n_embd] (1-dimensional)
|
||||
def llama_get_embeddings(ctx: llama_context_p):
|
||||
def llama_get_embeddings(ctx: llama_context_p): # type: (...) -> Array[float] # type: ignore
|
||||
return _lib.llama_get_embeddings(ctx)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue