Skip to content

This Ruby script will watch a folder for new text files, summarize them, and save them to a different folder

Notifications You must be signed in to change notification settings

dep/gpt-4-listen-and-summarize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

gpt-4-listen-and-summarize

This Ruby script will watch a folder for new text files, summarize them with GPT (using gpt-4, gpt-3.5-turbo, or another model of your choosing, by updating @model in the script), and save them to a different folder.

Breaks down very large text files into multiple smaller chunks (to get around the API's "max length") and stitches together the responses for you.

I save mine right to my Obsidian vault but you might have other use cases.

Setup

  1. gem install listen
  2. You'll need an OpenAI API key, set as an env variable (OPENAI-API-KEY)
  3. ruby listen.rb

Build using Ruby 3.2.1

ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-darwin21]

About

This Ruby script will watch a folder for new text files, summarize them, and save them to a different folder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages