/*
Command-line script for creating image sets using ai.
Console friendly formatting.
Step 1:
– User inputs a prompt.
Step 2:
OpenAI request for 5 image prompts returned as array. Save response and prompt to nedb.
Step 3:
Display results on screen, user can Accept or Start Over.
Step 4:
On Accept, loops through the array of prompts and creates images using Dezgo API. Save images to local folder and update nedb.
Step 5:
Display Image names on screen. User can Accept or Start Over.
Step 6:
On Accept, images are uploaded to cloudinary sequentially and new urls saved to nedb.
Step 7:
Summary of cloudinary results on screen. End of session.
Application files:
– index.js to run the application
– sequence.js to hold the sequence of steps and functions (isolates the logic)
– text.js to hold messages in object
– schema.js to define our collections
– nedb.js to ORM our collections
– cloudinary.js manages cloudinary uploads
– openai.js manages openai requests
Save raw OpenAI + Dezgo responses for traceability/debugging.
uses command line utilities:
– inquirer
– chalk
– ora
– boxen
– cli-table3
*/
Leave a Reply