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
42344795
Unverified
Commit
42344795
authored
Feb 06, 2024
by
takatost
Committed by
GitHub
Feb 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: error type get wrong (#2403)
parent
517f6d1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
generate_task_pipeline.py
api/core/app_runner/generate_task_pipeline.py
+5
-1
hosting_configuration.py
api/core/hosting_configuration.py
+0
-1
No files found.
api/core/app_runner/generate_task_pipeline.py
View file @
42344795
...
@@ -477,7 +477,11 @@ class GenerateTaskPipeline:
...
@@ -477,7 +477,11 @@ class GenerateTaskPipeline:
}
}
# Determine the response based on the type of exception
# Determine the response based on the type of exception
data
=
error_responses
.
get
(
type
(
e
))
data
=
None
for
k
,
v
in
error_responses
.
items
():
if
isinstance
(
e
,
k
):
data
=
v
if
data
:
if
data
:
data
.
setdefault
(
'message'
,
getattr
(
e
,
'description'
,
str
(
e
)))
data
.
setdefault
(
'message'
,
getattr
(
e
,
'description'
,
str
(
e
)))
else
:
else
:
...
...
api/core/hosting_configuration.py
View file @
42344795
...
@@ -123,7 +123,6 @@ class HostingConfiguration:
...
@@ -123,7 +123,6 @@ class HostingConfiguration:
restrict_models
=
[
restrict_models
=
[
RestrictModel
(
model
=
"gpt-4"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-turbo-preview"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-turbo-preview"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-32k"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-1106-preview"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-1106-preview"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-0125-preview"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-4-0125-preview"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-3.5-turbo"
,
model_type
=
ModelType
.
LLM
),
RestrictModel
(
model
=
"gpt-3.5-turbo"
,
model_type
=
ModelType
.
LLM
),
...
...
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