Created
May 2, 2023 11:44
-
-
Save Kotrotsos/9d796e1c76972c5979cfd26113fee95e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"in": { | |
"topic": "life-lessons for a 20 year old" | |
}, | |
"stacks": [ | |
{ | |
"comment":"Step 1. Generate an outline for an ebook with the topic {topic}", | |
"command": "gpt3", | |
"prompt": "give me an outline for a ebook about {topic}.", | |
"output": "$result_outline" | |
}, | |
{ | |
"comment":"This prompt will be used in the iteration, because it has an {item} variable, it will not be executed on it's own.", | |
"command": "gpt3-description", | |
"prompt": "give me an chapter for an book called {topic}, the chapter is: {item}", | |
"output": "$result_description" | |
}, | |
{ | |
"comment":"Step 2. Split the resulting generation from step 1, split by newline", | |
"command": "split", | |
"valueToSplit": "{result_outline}", | |
"separator": "\n", | |
"output": "$result_split" | |
}, | |
{ | |
"comment":"Loop over the splitted content from Step 2, put the value into {item}- separate using the separator property", | |
"command": "loop", | |
"list": "{result_split}", | |
"stackCommandToCall": "gpt3-description", | |
"separator": "\n\n\n", | |
"output": "$result_loop" | |
} | |
], | |
"out": [ | |
{ | |
"comment":"Output to screen", | |
"target": "screen", | |
"text": "{result_loop}" | |
}, | |
{ | |
"comment":"Output to a file too", | |
"target": "file", | |
"text": "{result_loop}", | |
"filename": "output35turbo2.txt" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment