Skip to content

Finish prompt event schema

FinishPromptEventSchema

Bases: BasePromptEventSchema

Source code in griptape/griptape/schemas/events/finish_prompt_event_schema.py
class FinishPromptEventSchema(BasePromptEventSchema):
    result = fields.Str()

    @post_load
    def make_obj(self, data, **kwargs):
        from griptape.events import FinishPromptEvent

        return FinishPromptEvent(**data)

result = fields.Str() class-attribute instance-attribute

make_obj(data, **kwargs)

Source code in griptape/griptape/schemas/events/finish_prompt_event_schema.py
@post_load
def make_obj(self, data, **kwargs):
    from griptape.events import FinishPromptEvent

    return FinishPromptEvent(**data)