Skip to content

Start prompt event

StartPromptEvent

Bases: BasePromptEvent

Source code in griptape/griptape/events/start_prompt_event.py
@define
class StartPromptEvent(BasePromptEvent):
    prompt_stack: PromptStack = field(kw_only=True)
    prompt: str = field(kw_only=True)

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

        return dict(StartPromptEventSchema().dump(self))

prompt: str = field(kw_only=True) class-attribute instance-attribute

prompt_stack: PromptStack = field(kw_only=True) class-attribute instance-attribute

to_dict()

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

    return dict(StartPromptEventSchema().dump(self))