mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 17:09:11 +08:00
fix embedding_model (#1698)
### What problem does this PR solve? fix embedding_model #1692 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Signed-off-by: seaver <zhudan187@qq.com>
This commit is contained in:
parent
b24abee364
commit
bc50f68127
@ -128,8 +128,8 @@ class LocalAIEmbed(Base):
|
||||
) # local embedding for LmStudio donot count tokens
|
||||
|
||||
def encode_queries(self, text):
|
||||
res = self.client.embeddings.create(text, model=self.model_name)
|
||||
return np.array(res.data[0].embedding), 1024
|
||||
embds, cnt = self.encode([text])
|
||||
return np.array(embds[0]), cnt
|
||||
|
||||
|
||||
class AzureEmbed(OpenAIEmbed):
|
||||
|
Loading…
x
Reference in New Issue
Block a user