Skip to content

Finish prompt event

FinishPromptEvent

Bases: BasePromptEvent

Source code in griptape/griptape/events/finish_prompt_event.py
@define
class FinishPromptEvent(BasePromptEvent):
    result: str = field(kw_only=True)

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

        return dict(FinishPromptEventSchema().dump(self))

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

to_dict()

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

    return dict(FinishPromptEventSchema().dump(self))