fix(main.py): fix caching for router

This commit is contained in:
Krrish Dholakia 2023-11-11 17:45:23 -08:00
parent 4f42beb9d9
commit c6ce3fedcd
3 changed files with 5 additions and 3 deletions

View file

@ -147,7 +147,7 @@ async def acompletion(*args, **kwargs):
else:
# Await normally
init_response = completion(*args, **kwargs)
if isinstance(init_response, dict):
if isinstance(init_response, dict) or isinstance(init_response, ModelResponse):
response = init_response
else:
response = await init_response