Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
5163dd38
Unverified
Commit
5163dd38
authored
Aug 19, 2023
by
takatost
Committed by
GitHub
Aug 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: run extra model serval ex not return (#916)
parent
2a27dad2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
azure_openai_embedding.py
...odel_providers/models/embedding/azure_openai_embedding.py
+1
-1
openai_embedding.py
...core/model_providers/models/embedding/openai_embedding.py
+1
-1
openai_moderation.py
...re/model_providers/models/moderation/openai_moderation.py
+1
-1
openai_whisper.py
...core/model_providers/models/speech2text/openai_whisper.py
+1
-1
No files found.
api/core/model_providers/models/embedding/azure_openai_embedding.py
View file @
5163dd38
...
@@ -71,7 +71,7 @@ class AzureOpenAIEmbedding(BaseEmbedding):
...
@@ -71,7 +71,7 @@ class AzureOpenAIEmbedding(BaseEmbedding):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
return
LLMRateLimitError
(
'Azure '
+
str
(
ex
))
return
LLMRateLimitError
(
'Azure '
+
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
r
aise
LLMAuthorizationError
(
'Azure '
+
str
(
ex
))
r
eturn
LLMAuthorizationError
(
'Azure '
+
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
return
LLMBadRequestError
(
'Azure '
+
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
return
LLMBadRequestError
(
'Azure '
+
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
else
:
else
:
...
...
api/core/model_providers/models/embedding/openai_embedding.py
View file @
5163dd38
...
@@ -65,7 +65,7 @@ class OpenAIEmbedding(BaseEmbedding):
...
@@ -65,7 +65,7 @@ class OpenAIEmbedding(BaseEmbedding):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
return
LLMRateLimitError
(
str
(
ex
))
return
LLMRateLimitError
(
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
r
aise
LLMAuthorizationError
(
str
(
ex
))
r
eturn
LLMAuthorizationError
(
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
return
LLMBadRequestError
(
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
return
LLMBadRequestError
(
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
else
:
else
:
...
...
api/core/model_providers/models/moderation/openai_moderation.py
View file @
5163dd38
...
@@ -41,7 +41,7 @@ class OpenAIModeration(BaseProviderModel):
...
@@ -41,7 +41,7 @@ class OpenAIModeration(BaseProviderModel):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
return
LLMRateLimitError
(
str
(
ex
))
return
LLMRateLimitError
(
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
r
aise
LLMAuthorizationError
(
str
(
ex
))
r
eturn
LLMAuthorizationError
(
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
return
LLMBadRequestError
(
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
return
LLMBadRequestError
(
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
else
:
else
:
...
...
api/core/model_providers/models/speech2text/openai_whisper.py
View file @
5163dd38
...
@@ -40,7 +40,7 @@ class OpenAIWhisper(BaseSpeech2Text):
...
@@ -40,7 +40,7 @@ class OpenAIWhisper(BaseSpeech2Text):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
elif
isinstance
(
ex
,
openai
.
error
.
RateLimitError
):
return
LLMRateLimitError
(
str
(
ex
))
return
LLMRateLimitError
(
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
elif
isinstance
(
ex
,
openai
.
error
.
AuthenticationError
):
r
aise
LLMAuthorizationError
(
str
(
ex
))
r
eturn
LLMAuthorizationError
(
str
(
ex
))
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
elif
isinstance
(
ex
,
openai
.
error
.
OpenAIError
):
return
LLMBadRequestError
(
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
return
LLMBadRequestError
(
ex
.
__class__
.
__name__
+
":"
+
str
(
ex
))
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment