소스 검색

fix: Update openai.py

need to await get_filtered_models
Jonathan Respeto 3 달 전
부모
커밋
a32782e527
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      backend/open_webui/routers/openai.py

+ 1 - 1
backend/open_webui/routers/openai.py

@@ -489,7 +489,7 @@ async def get_models(
                 raise HTTPException(status_code=500, detail=error_detail)
                 raise HTTPException(status_code=500, detail=error_detail)
 
 
     if user.role == "user" and not BYPASS_MODEL_ACCESS_CONTROL:
     if user.role == "user" and not BYPASS_MODEL_ACCESS_CONTROL:
-        models["data"] = get_filtered_models(models, user)
+        models["data"] = await get_filtered_models(models, user)
 
 
     return models
     return models