From ec9895a14acf1aec3d541ff26baeb4f7691be8b7 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 18 Mar 2024 11:02:09 -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 b012f237f..d03748a2c 100644 --- a/backend/apps/openai/main.py +++ b/backend/apps/openai/main.py @@ -197,7 +197,9 @@ async def get_all_models(): "data": merge_models_lists( list( map( - lambda response: response["data"] if response else None, + lambda response: ( + response["data"] if "data" in response else None + ), responses, ) )