소스 검색

Update mineru/utils/llm_aided.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Xiaomeng Zhao 4 달 전
부모
커밋
e5735d957b
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      mineru/utils/llm_aided.py

+ 1 - 1
mineru/utils/llm_aided.py

@@ -89,7 +89,7 @@ Corrected title list:
             )
             content_pieces = []
             for chunk in completion:
-                if chunk.choices:
+                if chunk.choices and chunk.choices[0].delta.content is not None:
                     content_pieces.append(chunk.choices[0].delta.content)
             content = "".join(content_pieces).strip()
             # logger.info(f"Title completion: {content}")