tools.generate_image module

Generate images via native Gemini API and send to the current channel.

async tools.generate_image.run(prompt, aspect_ratio='16:9', model=None, ctx=None)[source]

Execute this tool and return the result.

Parameters:
  • prompt (str) – The prompt value.

  • aspect_ratio (str) – The aspect ratio value.

  • model (str | None) – The model value.

  • ctx (ToolContext | None) – Tool execution context providing access to bot internals.

Returns:

Result string.

Return type:

str