Skip to content

Commit 74dbb65

Browse files
committed
updated some error
1 parent 9ad6351 commit 74dbb65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fact_checker_cli/fact_checker.py

100644100755
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
import requests
1717
from pydantic import BaseModel, Field
18+
from newspaper import Article, ArticleException
19+
from requests.exceptions import RequestException
1820

1921

2022
class Claim(BaseModel):
@@ -92,6 +94,8 @@ def _load_system_prompt(self, prompt_file: str) -> str:
9294
try:
9395
with open(prompt_file, 'r', encoding='utf-8') as f:
9496
return f.read().strip()
97+
except FileNotFoundError:
98+
print(f"Warning: Prompt file not found at {prompt_file}", file=sys.stderr)
9599
except Exception as e:
96100
print(f"Warning: Could not load system prompt from {prompt_file}: {e}", file=sys.stderr)
97101
print("Using default system prompt.", file=sys.stderr)

0 commit comments

Comments
 (0)