Jelajahi Sumber

avoid ugly exception

Michael Poluektov 8 bulan lalu
induk
melakukan
44966db505
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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)