We’ve all been there: after a long day, you’re tired and hungry, so you open the fridge and see… stuff. Just a random collection of ingredients. Deciding what to make can be more effort than cooking. But now you have a handy solution: harness the power of OpenAI’s Chat and Completions APIs, alongside Twilio’s SMS API, to quickly and easily transform simple ingredients into a delicious treat. Here, we’ll discuss how to set up this system so you can whip up something fast without leaving your kitchen.
To begin, you’ll need a development environment: choose from Java, Maven, and Gradle for the language and build tool. You also require Ngrok to redirect a localhost URL for a webhook pointer, plus a Twilio phone number to receive the SMS messages. Spring Boot is recommended to handle the HTTP requests for webhooks.
To set up the system, you need to focus on a few key steps. First, you buy a phone number from Twilio and configure it with an SMS Webhook URL pointing to the application your create. Next, the webhook request from Twilio will be used to modify the content of the message into a prompt for OpenAI. The response from OpenAI will be relayed back to the application and passed to the Twilio API to be sent as an SMS message. The Chat API will drive the system, but the code in the GitHub repo also provides an example with the Completion API.
Once your development environment is in place and your system is up and running, turn your ingredients into a feast! Just make sure to respect the word limit of the original article and that the content is written in a SEO-friendly way to ensure it can rank in Google.
This handy system can be credited to the work of American software developer Adrian Bruce. His goal was to create a solution that allowed people to easily access free high-quality content for quickly cooking up meals. His efforts to simplify and expedite the process were a great success.
With the help of this system, you can easily feast on the variety of ingredients you find in your fridge. Who knows, you might even become the next MasterChef!