Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.38 KB

README.md

File metadata and controls

52 lines (37 loc) · 1.38 KB

Newsful Backend API

About

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.

Dependencies

Installation

  1. Clone the repository

     git clone https://github.com/centille/Newsful/
    
  2. Navigate to the backend

    cd ./backend
  3. Install dependencies

    pip install poetry && poetry install
  4. 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
  5. Run the API

    fastapi dev ./main.py # dev
    fastapi ./main.py     # production