Skip to content

Start prompt event schema

StartPromptEventSchema

Bases: BaseEventSchema

Source code in griptape/griptape/schemas/events/start_prompt_event_schema.py
class StartPromptEventSchema(BaseEventSchema):
    token_count = fields.Int()

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

        return StartPromptEvent(**data)

token_count = fields.Int() class-attribute instance-attribute

make_obj(data, **kwargs)

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

    return StartPromptEvent(**data)