fix: Update the API call address for the text_embedding model (#12342)

Co-authored-by: 方程 <fangcheng@oschina.cn>
This commit is contained in:
方程 2025-01-03 19:19:17 +08:00 committed by GitHub
parent a5fb59b17f
commit 6df17a334c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,8 +24,5 @@ class GiteeAIEmbeddingModel(OAICompatEmbeddingModel):
super().validate_credentials(model, credentials)
@staticmethod
def _add_custom_parameters(credentials: dict, model: Optional[str]) -> None:
if model is None:
model = "bge-m3"
credentials["endpoint_url"] = f"https://ai.gitee.com/api/serverless/{model}/v1/"
def _add_custom_parameters(credentials: dict, model: str) -> None:
credentials["endpoint_url"] = "https://ai.gitee.com/v1"