Skip to content

This script is designed to automate the process of searching for relevant articles, extracting content, generating summaries, and creating Twitter threads based on a given query. using OPEN AI, Langchain, Serper

Notifications You must be signed in to change notification settings

brahmbeyond/Research-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script for Extracting Article Summaries and Creating Twitter Threads

This script is designed to automate the process of searching for relevant articles, extracting content, generating summaries, and creating Twitter threads based on a given query.

see the 'shared_research_agent.ipynb' file , its Google Colab Notebook , you can chck it out directly . And Prepare Open AI and SERPER API key beforhand

You can also visit this BLOG for Detailed explanation - https://brahm.code.blog/2023/08/21/crafting-engaging-twitter-threads-with-langchain-and-gpt-3-5-turbo-a-step-by-step-guide/

Table of Contents

Installation

Before running the script, make sure you have the necessary dependencies installed. You can install them using the following command:

!pip install openai langchain playwright beautifulsoup4 unstructured[local-inference] requests

Also, update the OpenAI API key and other necessary keys in the script before running it.

Usage

  1. Define OPEN AI API Key: Set your OpenAI API key in the appropriate section of the script.

  2. Search Query: Modify the query variable to specify the topic you want to search for.

  3. Running the Script: Run the script step by step, following the provided instructions and waiting for a minute or two between functions if you encounter a "RateLimitError."

  4. View Results: The script will output the extracted article content and the generated Twitter thread.

Dependencies

  • openai: Python client for the OpenAI GPT-3 API.
  • langchain: A library for working with AI models, text generation, and more.
  • playwright: A browser automation library for Python.
  • beautifulsoup4: HTML parsing and data extraction library.
  • unstructured: A toolkit for text analysis and extraction.
  • requests: A library for making HTTP requests.

Warnings and Tips

  • If you encounter a "RateLimitError" from the OpenAI API, wait for a minute or two before running the script again.

Extras

If you're facing any issues, consider running each function individually, waiting a bit between executions.

Feel free to customize and enhance this readme with additional information, explanations, usage examples, and any other relevant details. This will help anyone who comes across your script to understand its purpose and functionality.

About

This script is designed to automate the process of searching for relevant articles, extracting content, generating summaries, and creating Twitter threads based on a given query. using OPEN AI, Langchain, Serper

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published