This commit is contained in:
Timothy Jaeryang Baek committed 2024-11-20 06:09:53 -08:00
commit bd1dae2c66
2 files changed
+79 -74

No files matched your search

+5
View File
@@ -855,6 +855,11 @@ class PipelineMiddleware(BaseHTTPMiddleware):
status_code=status.HTTP_401_UNAUTHORIZED,
content={"detail": "Not authenticated"},
)
except HTTPException as e:
return JSONResponse(
status_code=e.status_code,
content={"detail": e.detail},
)
model_list = await get_all_models()
models = {model["id"]: model for model in model_list}