mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: credential verification of baichuan did not throw all errors (#2475)
This commit is contained in:
parent
ca4aa340f6
commit
4cf475680d
|
@ -103,7 +103,7 @@ class BaichuanLarguageModel(LargeLanguageModel):
|
|||
], parameters={
|
||||
'max_tokens': 1,
|
||||
}, timeout=60)
|
||||
except (InvalidAPIKeyError, InvalidAuthenticationError) as e:
|
||||
except Exception as e:
|
||||
raise CredentialsValidateFailedError(f"Invalid API key: {e}")
|
||||
|
||||
def _generate(self, model: str, credentials: dict, prompt_messages: list[PromptMessage],
|
||||
|
|
Loading…
Reference in New Issue
Block a user