Skip to content

Instantly share code, notes, and snippets.

@searls
Created October 17, 2023 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save searls/be7379d71be2f8f2f70b0b009ff32f44 to your computer and use it in GitHub Desktop.
Save searls/be7379d71be2f8f2f70b0b009ff32f44 to your computer and use it in GitHub Desktop.
LOL, I wrote a Ruby script for generating spreadsheets conversationally with GPT-4.
~/code/searls/spreadsheetify $ ./script/run
Let's define columns.
Column name:
> Name
Column description: (optional)
>
More columns? [Yn]
>
Column name:
> Grade
Column description: (optional)
> School grade (i.e. K12)
More columns? [Yn]
> n
Provide whatever data you want added as rows to the spreadsheet in whatever format you can
> I have 4 kids: Jack, Jill, Jane, and Gorby Puff Puff Thunderhorse the 3rd. They are 6, 8, 11, and 14, respectively.
The assistant generated this Spreadsheet:
Name | Grade
Jack | 1st grade
Jill | 3rd grade
Jane | 6th grade
Gorby Puff Puff Thun | 9th grade
Accept this spreadsheet as complete? [yN]
> n
The assistant has 1 clarifying questions
1.) Is it correct to infer that the kids' names and grades are provided in order?
> Yes
Please provide any follow-up instructions for the assistant:
> Only print the first name of each child
The assistant generated this Spreadsheet:
Name | Grade
Jack | 1st grade
Jill | 3rd grade
Jane | 6th grade
Gorby | 9th grade
Accept this spreadsheet as complete? [yN]
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment