Skip to content

Commit e0fe160

Browse files
committed
fix: update API base URL for AliyunBaiLianReranker
1 parent 18c687c commit e0fe160

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/models_provider/impl/aliyun_bai_lian_model_provider/credential/reranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class AliyunBaiLianRerankerCredential(BaseForm, BaseModelCredential):
1919
Provides validation and encryption for the model credentials.
2020
"""
2121
api_base = forms.TextInputField(_('API URL'), required=True,
22-
default_value='https://dashscope.aliyuncs.com/compatible-mode/v1')
22+
default_value='https://dashscope.aliyuncs.com/api/v1')
2323
dashscope_api_key = PasswordInputField('API Key', required=True)
2424

2525
def is_valid(

apps/models_provider/impl/aliyun_bai_lian_model_provider/model/reranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def is_cache_model():
3232
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
3333
return AliyunBaiLianReranker(model=model_name,
3434
api_key=model_credential.get('dashscope_api_key'),
35-
base_url=model_credential.get('api_base') or 'https://dashscope.aliyuncs.com/compatible-mode/v1',
35+
base_url=model_credential.get('api_base') or 'https://dashscope.aliyuncs.com/api/v1',
3636
top_n=model_kwargs.get('top_n', 3))
3737

3838
def compress_documents(self, documents: Sequence[Document], query: str, callbacks: Optional[Callbacks] = None) -> \

0 commit comments

Comments
 (0)