fix /moderations endpoint

This commit is contained in:
Ishaan Jaff 2024-08-15 08:58:28 -07:00
parent 54d888f566
commit 1c9d824151

View file

@ -65,9 +65,10 @@ async def route_request(
return getattr(user_router, f"{route_type}")(**data) return getattr(user_router, f"{route_type}")(**data)
elif ( elif (
"," in data.get("model", "") route_type == "acompletion"
and data.get("model", "") is not None
and "," in data.get("model", "")
and llm_router is not None and llm_router is not None
and route_type == "acompletion"
): ):
if data.get("fastest_response", False): if data.get("fastest_response", False):
return llm_router.abatch_completion_fastest_response(**data) return llm_router.abatch_completion_fastest_response(**data)