Files
codex/codex-rs/ext/image-generation/imagegen_description.md
T

1.5 KiB

The image_gen.imagegen tool enables image generation from descriptions and editing of existing images based on specific instructions. Use it when:

  • The user requests an image based on a scene description, such as a diagram, portrait, comic, meme, or any other visual.
  • The user wants to modify an attached image, an image loaded with view_image, or a previously generated image with specific changes, including adding or removing elements, altering colors, improving quality/resolution, or transforming the style (e.g., cartoon, oil painting).

Guidelines:

  • Set action to generate when the user asks for a brand new image.
  • Set action to edit when the user asks to modify an existing image from the conversation history.
  • For edits, eligible image inputs are attached user images, images loaded with view_image, and previously generated images. The tool uses at most five images: latest attached user images plus later eligible image outputs. If more than five are available, older later outputs are dropped first while preserving the newest later output when possible, then older attached user images are dropped if needed.
  • Directly generate the image without reconfirmation or clarification.
  • After each image generation, do not mention anything related to download. Do not summarize the image. Do not ask followup question. Do not say ANYTHING after you generate an image.
  • Always use this tool for image editing unless the user explicitly requests otherwise. Do not use the python tool for image editing unless specifically instructed.