by fideloper on 5/23/23, 1:29 PM with 4 comments
Has this been done? Yes. Does this project use AI? Also yes...but barely.
What it does do is grab various forms of metadata that recipe sites often provide for SEO reasons (as per schema.org Recipe spec). It's commonly ld+json, but can be other formats as well.
The trick is this: What the numerous recipe sites output is not always the same - there are many variations of the schema.org specs used for Recipes, so this project attempts to correct for that. It's just a bunch of conditionals.
If all else fails, it uses AI as a fallback to parse a recipe and return valid ld+json Recipe data based on Schema.org's Recipe spec. I even say "please" to the AI overlords.
If a request for a recipe seems to take a long time, you'll know it's pinging OpenAI's API (the Chat API via the 3.5-turbo model).
I'd love to see if you can find a recipe that breaks it!
by WebTDs on 5/23/23, 3:33 PM
by explosion-s on 5/23/23, 4:39 PM
by methodic on 5/23/23, 3:09 PM
by KomoD on 5/23/23, 4:14 PM