Skip to content

Base event

BaseEvent

Bases: SerializableMixin, ABC

Source code in griptape/events/base_event.py
@define
class BaseEvent(SerializableMixin, ABC):
    id: str = field(default=Factory(lambda: uuid.uuid4().hex), kw_only=True, metadata={"serializable": True})
    timestamp: float = field(default=Factory(lambda: time.time()), kw_only=True, metadata={"serializable": True})

id: str = field(default=Factory(lambda: uuid.uuid4().hex), kw_only=True, metadata={'serializable': True}) class-attribute instance-attribute

timestamp: float = field(default=Factory(lambda: time.time()), kw_only=True, metadata={'serializable': True}) class-attribute instance-attribute