mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 00:59:02 +08:00
Fix voyage embedding. (#3818)
### What problem does this PR solve? #3816 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
ed7e46b6ca
commit
6a0583f5ad
@ -680,11 +680,10 @@ class VoyageEmbed(Base):
|
||||
return np.array(res.embeddings), res.total_tokens
|
||||
|
||||
def encode_queries(self, text):
|
||||
res = self.client.embed
|
||||
res = self.client.embed(
|
||||
texts=text, model=self.model_name, input_type="query"
|
||||
)
|
||||
return np.array(res.embeddings), res.total_tokens
|
||||
return np.array(res.embeddings)[0], res.total_tokens
|
||||
|
||||
|
||||
class HuggingFaceEmbed(Base):
|
||||
|
Loading…
x
Reference in New Issue
Block a user