Skip to content

Allow for multiple recipes through AI import #4504

Description

@josephoneill

Is your feature request related to a problem? Please describe.

The AI import feature is extremely helpful to process handwritten or custom printed recipes. However, the import is currently limited a single recipe at a time. When scanning a page that has multiple recipes, the application only imports the first recipe. This results in having to manually crop a page of recipes into individual images containing a single recipe. When trying to import a recipe book consisting of 2 to 4 recipes per page, with a total of over 100 pages, this becomes a lot of overhead to crop each recipe manually.

Describe the solution you'd like

The solution I propose is modifying AI import, and the recipes import page as a whole, to accept an import flow that allows for a list of recipes rather than one single recipe. The LLM call message can be modified to specific a json array of schema.org/recipe items rather than a single recipe. From there, the recipes ai import API can be changed to accept an array of recipes rather than a single recipe. The recipes import page can be slightly modified to support a list of recipes in the case of AI import without breaking single recipe imports by iterating through a list of recipes and assigning the recipe currently being imported to the importResponse.

The biggest challenge for this workflow is designing an intuitive AI on the recipes imports page to allow for importing multiple recipes iteratively. My current proposal is a simple indicator in the form of text showing the user the index of the current recipe they are importing, and how many recipes in total they're importing. From there, once a user imports a recipe, the import flow restarts with the next recipe in the list at the "image" or "keywords" stepper.

Describe alternatives you've considered

No response

Additional context

If this is a feature you'd be willing to accept being added to the application, I'd be more than willing to implement it myself. This is a feature that greatly benefits my use case for the application, and I am sure many others will find it very beneficial as well. I've currently implemented a basic working prototype on my forked repository. I've attached a screenshot of the basic prototype displaying a progress indicator when importing multiple recipes. If this is a feature you're interested in adding to the application, I'd love to work further to implement the user interface for this.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions