浏览代码

avoid ugly exception

Michael Poluektov 8 月之前
父节点
当前提交
44966db505
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)