feat: Unified AI recipe page (#8043)
This commit is contained in:
1 parent
29897e35ec
commit
e305551b19
69 files changed
+3503
-750
No files matched your search
@@ -24,6 +24,31 @@ While Mealie has prompts for each AI task, you can override these with your own
|
||||
|
||||
## AI Features
|
||||
- The OpenAI Ingredient Parser can be used as an alternative to the NLP and Brute Force parsers. Simply choose the OpenAI parser while parsing ingredients (:octicons-tag-24: v1.7.0)
|
||||
- When importing a recipe via URL, if the default recipe scraper is unable to read the recipe data from a webpage, the webpage contents will be parsed by OpenAI (:octicons-tag-24: v1.9.0)
|
||||
- You can import an image of a written recipe, which is sent to OpenAI and imported into Mealie. The recipe can be hand-written or typed, as long as the text is in the picture. You can also optionally have OpenAI translate the recipe into your own language (:octicons-tag-24: v1.12.0)
|
||||
- You can import a recipe via a video URL (e.g., a YouTube link). The video is transcribed AI, and the transcription is parsed into a recipe (:octicons-tag-24: v3.13.0)
|
||||
- When importing a recipe via URL, if the default recipe scraper is unable to read the recipe data from a webpage, the webpage contents will be parsed by AI (:octicons-tag-24: v1.9.0)
|
||||
- The **Import with AI** page creates a recipe out of just about anything: pasted text, HTML, or JSON, photos of a recipe, a link, or any combination of them (:octicons-tag-24: v3.23.0)
|
||||
|
||||
## Import with AI
|
||||
|
||||
The **Import with AI** page, found under *Create ➞ Import with AI*, creates a recipe from any combination of:
|
||||
|
||||
- **A URL.** Mealie fetches the page and reads the recipe from it. Give it a link to a video (e.g. YouTube or Instagram) and the video is transcribed instead, provided you've configured an audio provider. The URL is always saved as the recipe's source.
|
||||
- **Content.** Paste a recipe as plain text, or paste raw HTML or a [schema.org Recipe](https://schema.org/Recipe) JSON object. This is useful when a site blocks Mealie from reading it directly. If you provide content, it's used instead of reading the URL.
|
||||
- **Images.** Upload one or more photos of a recipe, hand-written or typed. Multiple photos are treated as pages of a single recipe, and the first one becomes the recipe's image. This requires an image provider.
|
||||
|
||||
When you supply your own text alongside photos or a video, your text wins wherever the two disagree, so you can correct a detail or name the recipe yourself.
|
||||
|
||||
You can also optionally have the recipe translated into your own language.
|
||||
|
||||
### Organizers
|
||||
|
||||
Mealie asks AI which tags, categories, and tools the recipe refers to, and always matches what comes back against the organizers you already have, so an import doesn't create a near-duplicate of a tag you're already using.
|
||||
|
||||
Organizers that don't match anything you have are discarded, unless you check **Create new organizers**, in which case they're created for you.
|
||||
|
||||
Mealie only assigns an organizer that the recipe itself refers to. It won't guess a cuisine from the ingredients or a course from the kind of dish, so a bare list of ingredients and steps usually imports with no organizers at all.
|
||||
|
||||
### Which provider is used
|
||||
|
||||
Reading the source material is the only step that needs to understand images or audio, so that's the only step that uses your image or audio provider. Turning what it read into a recipe, and working out its organizers, always use your default provider.
|
||||
|
||||
This means an import with photos attached is read by your image provider even if you also pasted text alongside them.
|
||||
@@ -19,6 +19,7 @@ Use your best judgement when deciding what to do.
|
||||
By default, the API is **not** rate limited. This leaves Mealie open to a potential **Denial of Service Attack**. While it's possible to perform a **Denial of Service Attack** on any endpoint, there are a few key endpoints that are more vulnerable than others.
|
||||
|
||||
- `/api/recipes/create/url`
|
||||
- `/api/recipes/create/ai`
|
||||
- `/api/recipes/{id}/image`
|
||||
|
||||
These endpoints are used to scrape data based off a user provided URL. It is possible for a malicious user to issue multiple requests to download an arbitrarily large external file (e.g a Debian ISO) and sufficiently saturate a CPU assigned to the container. While we do implement some protections against this by chunking the response, and using a timeout strategy, it's still possible to overload the CPU if an attacker issues multiple requests concurrently.
|
||||
@@ -34,6 +35,7 @@ If you'd like to mitigate this risk, we suggest that you rate limit the API in g
|
||||
## Server Side Request Forgery
|
||||
|
||||
- `/api/recipes/create/url`
|
||||
- `/api/recipes/create/ai`
|
||||
- `/api/recipes/{id}/image`
|
||||
|
||||
Given the nature of these APIs it's possible to perform a **Server Side Request Forgery** attack. This is where a malicious user can issue a request to an internal network resource, and potentially exfiltrate data. We _do_ perform some checks to mitigate access to resources within your network but at the end of the day, users of Mealie are allowed to trigger HTTP requests on **your server**.
|
||||
|
||||
Reference in new issue
Block a user