Skip to content

Completion chunk event

CompletionChunkEvent

Bases: BaseEvent

Source code in griptape/griptape/events/completion_chunk_event.py
@define
class CompletionChunkEvent(BaseEvent):
    token: str = field(kw_only=True)

    def to_dict(self):
        from griptape.schemas import CompletionChunkEventSchema

        return dict(CompletionChunkEventSchema().dump(self))

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

to_dict()

Source code in griptape/griptape/events/completion_chunk_event.py
def to_dict(self):
    from griptape.schemas import CompletionChunkEventSchema

    return dict(CompletionChunkEventSchema().dump(self))