mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-19 12:39:59 +08:00
Fix: rerank with YoudaoRerank issue. (#6396)
### What problem does this PR solve? Fix rerank with YoudaoRerank issue,"'YoudaoRerank' object has no attribute '_dynamic_batch_size'"  ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
d77380f024
commit
a6aed0da46
@ -194,6 +194,8 @@ class YoudaoRerank(DefaultRerank):
|
||||
"maidalun1020", "InfiniFlow"))
|
||||
|
||||
self._model = YoudaoRerank._model
|
||||
self._dynamic_batch_size = 8
|
||||
self._min_batch_size = 1
|
||||
|
||||
def similarity(self, query: str, texts: list):
|
||||
pairs = [(query, truncate(t, self._model.max_length)) for t in texts]
|
||||
|
Loading…
x
Reference in New Issue
Block a user