Просмотр исходного кода

fix: credential verification of baichuan did not throw all errors (#2475)

tags/0.5.6
takatost 1 год назад
Родитель
Сommit
4cf475680d
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 1 добавлений и 1 удалений
  1. 1
    1
      api/core/model_runtime/model_providers/baichuan/llm/llm.py

+ 1
- 1
api/core/model_runtime/model_providers/baichuan/llm/llm.py Просмотреть файл

@@ -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],

Загрузка…
Отмена
Сохранить