mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
fix: credentials validation of ababa (#2183)
This commit is contained in:
parent
ac4bb5c35f
commit
dda32c6880
|
@ -55,7 +55,7 @@ class MinimaxLargeLanguageModel(LargeLanguageModel):
|
|||
stream=False,
|
||||
user=''
|
||||
)
|
||||
except InvalidAuthenticationError as e:
|
||||
except (InvalidAuthenticationError, InsufficientAccountBalanceError) as e:
|
||||
raise CredentialsValidateFailedError(f"Invalid API key: {e}")
|
||||
|
||||
def get_num_tokens(self, model: str, credentials: dict, prompt_messages: list[PromptMessage],
|
||||
|
|
|
@ -27,4 +27,4 @@ class MinimaxProvider(ModelProvider):
|
|||
raise ex
|
||||
except Exception as ex:
|
||||
logger.exception(f'{self.get_provider_schema().provider} credentials validate failed')
|
||||
raise ex
|
||||
raise CredentialsValidateFailedError(f'{ex}')
|
||||
|
|
Loading…
Reference in New Issue
Block a user