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
Copy file name to clipboardExpand all lines: SPEC.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,9 +142,11 @@ Rules:
142
142
- Build the public `url`.
143
143
- When budget remains:
144
144
- Generate a fresh unique image key.
145
-
- Build the prompt as a single random dish popular in the request country.
145
+
- Build the prompt as one randomly chosen prepared dish, snack, pastry, or street food genuinely eaten in the request country.
146
146
- Include a normalized `-{country-slug}` suffix in the generated key when country lookup succeeds.
147
-
- Instruct the model to prefer specific, visually distinct local dishes over generic national defaults, and to avoid repeatedly defaulting to globally common fast food unless it is genuinely the random choice.
147
+
- Instruct the model to prefer specific regional, city, market, bakery, holiday, breakfast, dessert, or home-cooked foods over the first national stereotype.
148
+
- Instruct the model to show exactly one hero food item with no combo meals, side dishes, drinks, menus, flags, labels, or text.
149
+
- Instruct the model to avoid defaulting to globally common fast food such as hamburgers, fries, pizza, or hot dogs unless the subject is a distinctive named local variation.
148
150
- Fall back to the same prompt structure scoped to somewhere in the world when the client IP or country cannot be resolved.
149
151
- Call the OpenAI image generation API with model `gpt-image-1.5`.
150
152
- Upload the PNG to the generated image key used for the dated generation pool.
@@ -194,6 +196,7 @@ The implementation is considered complete when:
194
196
- The backend returns `200` only after a fresh image upload succeeds or a random fallback image has been selected.
195
197
- When the daily budget is exhausted, the backend returns a random existing generated image instead of making a new OpenAI request.
196
198
- Fresh generations use the request origin country in the prompt when the server can resolve it from the client IP, and otherwise fall back to the generic worldwide prompt.
199
+
- Fresh generation prompts ask for one specific, non-stereotyped hero food item and discourage generic fast-food defaults and combo meals.
197
200
- Fresh generations include a country slug suffix in the image key when the request country is known.
198
201
- When the daily budget is exhausted, fallback selection prefers existing images whose keys match the current request country and otherwise falls back to any existing image.
199
202
- The backend persists deterministic daily per-page cache keys separately from the dated generation pool.
0 commit comments