Sfoglia il codice sorgente

Refactor:remove use less convert for FastEmbed (#8984)

### What problem does this PR solve?

remove use less convert for FastEmbed

### Type of change

- [x] Refactoring
tags/v0.20.0
Stephen Hu 3 mesi fa
parent
commit
ec21d9a98f
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1
    2
      rag/llm/embedding_model.py

+ 1
- 2
rag/llm/embedding_model.py Vedi File

@@ -352,8 +352,7 @@ class FastEmbed(DefaultEmbedding):
# Using the internal tokenizer to encode the texts and get the total
# number of tokens
encoding = self._model.model.tokenizer.encode(text)
embedding = next(self._model.query_embed(text)).tolist()

embedding = next(self._model.query_embed(text))
return np.array(embedding), len(encoding.ids)



Loading…
Annulla
Salva