Skip to content

Start image generation event

StartImageGenerationEvent

Bases: BaseImageGenerationEvent

Source code in griptape/griptape/events/start_image_generation_event.py
@define
class StartImageGenerationEvent(BaseImageGenerationEvent):
    prompts: list[str] = field(kw_only=True)
    negative_prompts: list[str] | None = field(default=None, kw_only=True)

    def to_dict(self) -> dict:
        from griptape.schemas import StartImageGenerationEventSchema

        return dict(StartImageGenerationEventSchema().dump(self))

negative_prompts: list[str] | None = field(default=None, kw_only=True) class-attribute instance-attribute

prompts: list[str] = field(kw_only=True) class-attribute instance-attribute

to_dict()

Source code in griptape/griptape/events/start_image_generation_event.py
def to_dict(self) -> dict:
    from griptape.schemas import StartImageGenerationEventSchema

    return dict(StartImageGenerationEventSchema().dump(self))