You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
f"Please respond ONLY with a valid JSON code block (```json ... ```).\n"
82
+
f"Fill out the following fields for step {step_number} of the recipe: 'name', 'instruction', 'ingredients', 'time', 'order', 'show_as_header', 'show_ingredients_table'.\n"
83
+
f"- 'name' should be the step number, e.g. 'name': '{step_number}.'\n"
84
+
f"- 'instruction' should be a clear, short description of the step.\n"
85
+
f"- 'ingredients' should be a list of ingredient objects (max 3 per step).\n"
86
+
f"- 'amount' must be a whole number or decimal, NOT a fraction.\n"
87
+
f"- Do NOT repeat ingredients from previous steps.\n"
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part}. Only complete the specified sections. Only complete step {step_number} of the recipe. If the step has more than 3 ingredients, only complete the first 3 and finish the JSON object. The name of the step should be the step number e.g. 'name': '{step_number}.'. Only include the current instruction description in the instruction field. The amount value of the ingredient can only be a whole number or a decimal NOT A FRACTION (convert it to a decimal). If an ingredient has already been mentioned in a previous step, do not include it again as an ingredient in this step. Respond with a JSON code block enclosed in triple backticks (```json)."
110
+
elifmode=="info":
111
+
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part} Only fill out author, description, recipeYield, prepTime and cooktime. The cooktime and pretime should have the format e.g. PT1H for one hour or PT15M for 15 Minutes."
112
+
elifmode=="ingredients":
113
+
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part} Append the ingredients to the 'recipeIngredient' list. One ingredient per line."
114
+
elifmode=="name":
115
+
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part} Keep the name of the recipe short."
116
+
elifmode=="nutrition":
117
+
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part} Only fill out calories and fatContent with a string."
118
+
elifmode=="instructions":
119
+
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part} Write the instruction as one long string. No string separation, just one long text! Don't add ingredients here. JSON FORMAT IN CODE WINDOW!"
120
+
else:
121
+
prompt=f"Write your Response in the language {os.getenv('LANGUAGE_CODE', 'en')}. Please fill out this JSON document {part}. Only complete the specified sections of the document. Ensure the response is formatted as a JSON code block enclosed in triple backticks (```json)."
122
+
result=self.send_json_prompt(prompt)
123
+
ifresult:
124
+
self.logger.info(f"{modeifmodeelse'General'} data processed successfully")
125
+
returnresult
126
+
else:
127
+
self.logger.warning(f"No valid response for {modeifmodeelse'general'} data")
0 commit comments