fix: ignore spark provider credential validate (#2344)

This commit is contained in:
takatost 2024-02-01 18:04:05 +08:00 committed by GitHub
parent 0c330fc020
commit a84e15b8cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,26 +16,5 @@ class SparkProvider(ModelProvider):
:param credentials: provider credentials, credentials form defined in `provider_credential_schema`.
"""
try:
model_instance = self.get_model_instance(ModelType.LLM)
model_instance.validate_credentials(
model='spark-1.5',
credentials=credentials
)
except CredentialsValidateFailedError as ex:
try:
model_instance = self.get_model_instance(ModelType.LLM)
model_instance.validate_credentials(
model='spark-3',
credentials=credentials
)
except CredentialsValidateFailedError as ex:
raise ex
except Exception as ex:
logger.exception(f'{self.get_provider_schema().provider} credentials validate failed')
raise ex
except Exception as ex:
logger.exception(f'{self.get_provider_schema().provider} credentials validate failed')
raise ex
# ignore credentials validation because every model has their own spark quota pool
pass