Summarizing URLs with ChatGPT
Here’s a simple way to use ChatGPT’s API. I want to add a list of links that I find interesting to the blog, and I was getting the description of the post from the heads, but I thought why not just download the whole text, pipe it through ChatGPT and see what it says?
The Script 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 #!/usr/bin/env ruby require 'bundler/inline' require 'net/http' gemfile do source 'https://rubygems.org' gem 'nokogiri' gem 'json' gem 'ruby-openai' end if ARGV[0].nil? puts
Will Schenk