From b188143f01b3e6688b28617cef90b63877d660d9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 18 Mar 2024 11:04:22 -0700 Subject: [PATCH] fix: openai proxy issue --- backend/apps/openai/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/apps/openai/main.py b/backend/apps/openai/main.py index d03748a2c..67a99794c 100644 --- a/backend/apps/openai/main.py +++ b/backend/apps/openai/main.py @@ -198,7 +198,9 @@ async def get_all_models(): list( map( lambda response: ( - response["data"] if "data" in response else None + response["data"] + if response and "data" in response + else None ), responses, )