소스 검색

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

tags/0.5.6
takatost 1 년 전
부모
커밋
4cf475680d
No account linked to committer's email address
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],

Loading…
취소
저장