Code Monkey home page Code Monkey logo

gpt-for-you's Introduction

GPT For You

A python script that queries the Diffbot Knowledge Graph for news and summarizes the top line takeaways with citations.

[
  {
    "name": "Twitter's Disagreement with EU on Disinformation Code",
    "date": 1686061842000,
    "citationIds": [
      "ART51264025820" # https://nationalpost.com/news/twitter-has-chosen-confrontation-by-pulling-out-of-disinformation-code-eu
    ]
  },
  {
    "name": "Senators Warning Twitter and Elon Musk over Data Privacy",
    "date": 1685951340000,
    "citationIds": [
      "ART144302563391" #https://abcnews.go.com/Business/senators-warn-twitter-elon-musk-alleged-disregard-data/story?id=99838319
    ]
  }
]

Read more at ___

Table of Contents

Installation

Clone to a project directory and install some basic dependencies. You may wish to instantiate a venv.

# Optional
python3 -m venv venv
python3 venv/bin/activate

# Install Requirements
pip3 install -r requirements.txt

Add your Diffbot token and OpenAI auth into the corresponding variables in generate_foryou.py

Usage

Run generate_foryou.py with a single argument - the name of a company. By default, this script will query the Diffbot KG for the last 30 days of news on this company and generate top lines on politics related headlines in the form of a JSON array with citations.

python3 generate_foryou.py Tiktok
python3 generate_foryou.py Twitter

Customize the prompt to your liking to curate your own custom For You output.

generate_timeline.py also uses the same single argument but uses the top line workflow to generate an event timeline of a company's history. Like this:

Timeline of FTX from founding to collapse

Careful! This will take a long time and eat up lots of requests from Diffbot and OpenAI!

Support

Open an issue, or reach out to me at [email protected] if you have any questions.

gpt-for-you's People

Contributors

jeromechoo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.