mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 06:15:53 +08:00
fix: error type get wrong (#2403)
This commit is contained in:
parent
517f6d1a26
commit
42344795cd
@ -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:
|
||||||
|
@ -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),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user