mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 07:35:55 +08:00
fix bug 994 ,991 (#1004)
### What problem does this PR solve? #994 #991 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
4f4d8baf49
commit
dc7afe46fb
@ -23,7 +23,7 @@ EmbeddingModel = {
|
|||||||
"Ollama": OllamaEmbed,
|
"Ollama": OllamaEmbed,
|
||||||
"OpenAI": OpenAIEmbed,
|
"OpenAI": OpenAIEmbed,
|
||||||
"Xinference": XinferenceEmbed,
|
"Xinference": XinferenceEmbed,
|
||||||
"Tongyi-Qianwen": DefaultEmbedding,#QWenEmbed,
|
"Tongyi-Qianwen": QWenEmbed,
|
||||||
"ZHIPU-AI": ZhipuEmbed,
|
"ZHIPU-AI": ZhipuEmbed,
|
||||||
"FastEmbed": FastEmbed,
|
"FastEmbed": FastEmbed,
|
||||||
"Youdao": YoudaoEmbed,
|
"Youdao": YoudaoEmbed,
|
||||||
|
@ -71,7 +71,7 @@ class DefaultRerank(Base):
|
|||||||
res = []
|
res = []
|
||||||
for i in range(0, len(pairs), batch_size):
|
for i in range(0, len(pairs), batch_size):
|
||||||
scores = self._model.compute_score(pairs[i:i + batch_size], max_length=2048)
|
scores = self._model.compute_score(pairs[i:i + batch_size], max_length=2048)
|
||||||
scores = sigmoid(np.array(scores))
|
scores = sigmoid(np.array(scores)).tolist()
|
||||||
res.extend(scores)
|
res.extend(scores)
|
||||||
return np.array(res), token_count
|
return np.array(res), token_count
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user