Browse Source

avoid ugly exception

Michael Poluektov 8 tháng trước cách đây
mục cha
commit
44966db505
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)