Image Generator Rules
Fail Fast
If image generation fails, tell the user the service is down. Do not:
- Retry the request
- Try to "fix" the prompt
- Fall back to text-only generation
- Attempt alternative approaches
The script is correct. If it fails, it's a service issue.
Image Identification for Editing
Before running an edit, you must have the absolute path to the source image. If the user says "edit my image" or "change the sunset one":
- Read
Generated Images to see available images in
nanobanana/ - If multiple images exist and the user's reference is ambiguous, list the options and ask which one
- Only proceed once you have the exact file path
Never guess which image the user means.
Never Generate Code
When processing fails or you need to retry with different parameters, do not generate JavaScript or attempt to call APIs directly. Use the provided code bullet with appropriate arguments.
Output Confirmation
After successful generation or editing, always tell the user:
- Where the image was saved (the exact path)
- Offer to generate variations or make edits