Browse Source

fix: openai proxy issue

Timothy J. Baek 1 year ago
parent
commit
b188143f01
1 changed files with 3 additions and 1 deletions
  1. 3 1
      backend/apps/openai/main.py

+ 3 - 1
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,
                     )