feat: Open AI Recipe Scraper (#3690)

This commit is contained in:
Michael Genson
2024-06-07 06:45:50 -05:00
committed by GitHub
parent a49c32e663
commit 4afb767375
14 changed files with 264 additions and 55 deletions

View File

@@ -128,8 +128,8 @@ export class RecipeAPI extends BaseCRUDAPI<CreateRecipe, Recipe, Recipe> {
return this.requests.post<UpdateImageResponse>(routes.recipesRecipeSlugImage(slug), { url });
}
async testCreateOneUrl(url: string) {
return await this.requests.post<Recipe | null>(routes.recipesTestScrapeUrl, { url });
async testCreateOneUrl(url: string, useOpenAI = false) {
return await this.requests.post<Recipe | null>(routes.recipesTestScrapeUrl, { url, useOpenAI });
}
async createOneByUrl(url: string, includeTags: boolean) {