Giter VIP home page Giter VIP logo

media_agents's Introduction

Llama in the news room

Media Agents

Media Agents is a Python-based project that implements Llama-3.1 / GPT4 based LLM assistant which helps journalists to find news leads and materials for news based on CourtListener online base. This system utilizes natural language processing and a graph-based workflow to find newsworthy stories, extract key facts and references, and compose draft with headline from various opinions and sources.

Features

  • Automated search of newsworthy stories.
  • Building support materials: key facts, key entities (mentioned events & locations, involved people & organizations), references to original legal documents.
  • Updates by email.

Prerequisites

Before using Media Agents, ensure you have the following:

  • Python 3.10 or higher installed.
  • media_agents package installed (see the Installation section).
  • Setup env variables
  • Setup email recipients' list.

Installation

Clone the repository:

git clone https://github.com/lliryc/media_agents.git
cd media_agents
python3 setup.py install

Setup env variables

The .env file is used to store environment variables that the application needs. Copy and rename .env.example as .env file in the current directory of the project and define values:

LLM_CLIENT=YOUR_LLM_CLIENT_MODEL_NAME # examples: accounts/fireworks/models/llama-v3p1-405b-instruct, gpt-4-turbo
OPENAI_API_KEY=YOUR_OPENAI_API_KEY # for gpt-4 turbo
FIREWORKS_API_KEY=YOUR_FIREWORKS_API_KEY # for llama3.1 405b
SMTP_SERVER=YOUR_SMTP_SERVER # 
SMTP_PORT_SSL=YOUR_SMTP_PORT_SSL
SMTP_USER=YOUR_SMTP_USER
SMTP_PASSWORD=YOUR_SMTP_PASSWORD

Setup list of subscribers

The recipients.txt file defines a list of email subscribers. Copy and rename recipients.txt.example in subscriptions folder as recipients.txt and set up your values:

Run LLM assistant

To run a program type following command in the console

python3 app/app.py

After that AI assistant will start processing recent updates from CourtListener portal. Usually it takes about 2-3 hours to process recently published legal documents. Once all documents was processed, your recepients will get a email with news leads and support materials for news writing.

Run LLM assistant as a Docker container

To launch a program as a Docker container use following command

bash start_container.sh

Please ensure you logged in on Docker Hub

Contributing

Feel free to open issues or submit pull requests if you have suggestions or improvements.

License

This project is licensed under the Apache License (Version 2.0, January 2004) - see the LICENSE file for details.

media_agents's People

Contributors

lliryc avatar

Stargazers

 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.