소스 검색

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)