Skip to content

Commit b0b0f18

Browse files
committed
fix: siliconCloud rerank error
--bug=1054256 --user=王孝刚 【模型】添加硅基流动的重排序模型失败 https://www.tapd.cn/57709429/s/1679612
1 parent f6994e1 commit b0b0f18

File tree

1 file changed

+0
-20
lines changed
  • apps/setting/models_provider/impl/siliconCloud_model_provider/model

1 file changed

+0
-20
lines changed

apps/setting/models_provider/impl/siliconCloud_model_provider/model/reranker.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,6 @@ def new_instance(model_type, model_name, model_credential: Dict[str, object], **
3636
top_n=model_kwargs.get('top_n', 3)
3737
)
3838

39-
def __init__(
40-
self, api_base: Optional[str] = None, model: Optional[str] = None, top_n=3,
41-
api_key: Optional[str] = None
42-
):
43-
super().__init__()
44-
45-
if not api_base:
46-
raise ValueError(_('Please provide server URL'))
47-
48-
if not model:
49-
raise ValueError(_('Please provide the model'))
50-
51-
if not api_key:
52-
raise ValueError(_('Please provide the API Key'))
53-
54-
self.api_base = api_base
55-
self.model = model
56-
self.api_key = api_key
57-
self.top_n = top_n
58-
5939
def compress_documents(self, documents: Sequence[Document], query: str, callbacks: Optional[Callbacks] = None) -> \
6040
Sequence[Document]:
6141
if not documents:

0 commit comments

Comments
 (0)