fix get embedding model provider in empty dataset (#1986)
Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
parent
0025ba4921
commit
24bdedf802
3 changed files with 28 additions and 14 deletions
|
|
@ -69,9 +69,9 @@ class BaichuanTextEmbeddingModel(TextEmbeddingModel):
|
|||
raise InsufficientAccountBalance(msg)
|
||||
elif err == 'invalid_authentication':
|
||||
raise InvalidAuthenticationError(msg)
|
||||
elif 'rate' in err:
|
||||
elif err and 'rate' in err:
|
||||
raise RateLimitReachedError(msg)
|
||||
elif 'internal' in err:
|
||||
elif err and 'internal' in err:
|
||||
raise InternalServerError(msg)
|
||||
elif err == 'api_key_empty':
|
||||
raise InvalidAPIKeyError(msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue