Selaa lähdekoodia

avoid ugly exception

Michael Poluektov 8 kuukautta sitten
vanhempi
commit
44966db505
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      backend/main.py

+ 1 - 1
backend/main.py

@@ -414,7 +414,7 @@ async def chat_completion_tools_handler(
         content = await get_content_from_response(response)
         log.debug(f"{content=}")
 
-        if content is None:
+        if not content:
             return body, {}
 
         result = json.loads(content)