소스 검색

fix: error type get wrong (#2403)

tags/0.5.4
takatost 1 년 전
부모
커밋
42344795cd
No account linked to committer's email address
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5
    1
      api/core/app_runner/generate_task_pipeline.py
  2. 0
    1
      api/core/hosting_configuration.py

+ 5
- 1
api/core/app_runner/generate_task_pipeline.py 파일 보기

@@ -477,7 +477,11 @@ class GenerateTaskPipeline:
}

# 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:
data.setdefault('message', getattr(e, 'description', str(e)))
else:

+ 0
- 1
api/core/hosting_configuration.py 파일 보기

@@ -123,7 +123,6 @@ class HostingConfiguration:
restrict_models=[
RestrictModel(model="gpt-4", 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-0125-preview", model_type=ModelType.LLM),
RestrictModel(model="gpt-3.5-turbo", model_type=ModelType.LLM),

Loading…
취소
저장