mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 04:26:05 +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,
|
||||
"OpenAI": OpenAIEmbed,
|
||||
"Xinference": XinferenceEmbed,
|
||||
"Tongyi-Qianwen": DefaultEmbedding,#QWenEmbed,
|
||||
"Tongyi-Qianwen": QWenEmbed,
|
||||
"ZHIPU-AI": ZhipuEmbed,
|
||||
"FastEmbed": FastEmbed,
|
||||
"Youdao": YoudaoEmbed,
|
||||
|
@ -71,7 +71,7 @@ class DefaultRerank(Base):
|
||||
res = []
|
||||
for i in range(0, len(pairs), batch_size):
|
||||
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)
|
||||
return np.array(res), token_count
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user