This is the backend API for the Newsful Browser Plugin. It is a Python-FastAPI application that uses OpenAI's GPT-4o, Google Programmable Search Engine connected using langchain to fact-check news articles. It also contains a knowledge graph with built-in phishing detection.
-
Clone the repository
git clone https://github.com/centille/Newsful/
-
Navigate to the backend
cd ./backend
-
Install dependencies
pip install poetry && poetry install
-
Set environment variables
OPENAI_API_KEY="" # https://platform.openai.com/account/api-keys GOOGLE_CSE_ID="" # https://cse.google.com/cse GOOGLE_API_KEY="" # https://developers.google.com/custom-search/v1/introduction TESSERACT_PATH="" # https://github.com/tesseract-ocr/tesseract MONGO_URI="" # https://www.mongodb.com ENV="dev" # dev or prod
-
Run the API
fastapi dev ./main.py # dev fastapi ./main.py # production