From 871d43ead6ea934b790e9a985af1cbc106ad3b8e Mon Sep 17 00:00:00 2001 From: Bowen Liang Date: Thu, 12 Sep 2024 07:24:09 +0800 Subject: [PATCH] update --- api/core/model_runtime/model_providers/__base/ai_model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/core/model_runtime/model_providers/__base/ai_model.py b/api/core/model_runtime/model_providers/__base/ai_model.py index d19ee8389d6ed5..e7e343f00ddeba 100644 --- a/api/core/model_runtime/model_providers/__base/ai_model.py +++ b/api/core/model_runtime/model_providers/__base/ai_model.py @@ -72,8 +72,9 @@ def _transform_invoke_error(self, error: Exception) -> InvokeError: if isinstance(error, tuple(model_errors)): if invoke_error == InvokeAuthorizationError: return invoke_error( - description=f"[{provider_name}] Incorrect model credentials provided," - f" please check and try again. " + description=( + f"[{provider_name}] Incorrect model credentials provided, please check and try again." + ) ) return invoke_error(description=f"[{provider_name}] {invoke_error.description}, {str(error)}")