Skip to content

Commit 816a1ce

Browse files
committed
Update fact_checker.py
1 parent 74dbb65 commit 816a1ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fact_checker_cli/fact_checker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ def check_claim(self, text: str, model: str = DEFAULT_MODEL, use_structured_outp
117117
Returns:
118118
The parsed response containing fact check results.
119119
"""
120+
if not text or not text.strip():
121+
return {"error": "Input text is empty. Cannot perform fact check."}
120122
user_prompt = f"Fact check the following text and identify any false or misleading claims:\n\n{text}"
121123

122124
headers = {

0 commit comments

Comments
 (0)