feat: Switch embed to llama_get_embeddings_seq (#1263)

* switch to llama_get_embeddings_seq

* Remove duplicate definition of llama_get_embeddings_seq

Co-authored-by: Andrei <abetlen@gmail.com>

---------

Co-authored-by: Andrei <abetlen@gmail.com>
This commit is contained in:
Douglas Hanley 2024-03-08 19:59:35 -06:00 committed by GitHub
parent 40c6b54f68
commit 2811014bae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -814,7 +814,7 @@ class Llama:
# store embeddings
for i in range(n_seq):
embedding: List[float] = llama_cpp.llama_get_embeddings_ith(
embedding: List[float] = llama_cpp.llama_get_embeddings_seq(
self._ctx.ctx, i
)[:n_embd]
if normalize: