Skip to content

reference

Reference

Bases: SerializableMixin

Source code in griptape/common/reference.py
@define(kw_only=True)
class Reference(SerializableMixin):
    id: str = field(default=Factory(lambda: uuid.uuid4().hex), metadata={"serializable": True})
    title: str = field(metadata={"serializable": True})
    authors: list[str] = field(factory=list, metadata={"serializable": True})
    source: Optional[str] = field(default=None, metadata={"serializable": True})
    year: Optional[str] = field(default=None, metadata={"serializable": True})
    url: Optional[str] = field(default=None, metadata={"serializable": True})

authors: list[str] = field(factory=list, metadata={'serializable': True}) class-attribute instance-attribute

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

source: Optional[str] = field(default=None, metadata={'serializable': True}) class-attribute instance-attribute

title: str = field(metadata={'serializable': True}) class-attribute instance-attribute

url: Optional[str] = field(default=None, metadata={'serializable': True}) class-attribute instance-attribute

year: Optional[str] = field(default=None, metadata={'serializable': True}) class-attribute instance-attribute