generic_artifact

  • T = TypeVar('T') module-attribute

Bases: BaseArtifact , Generic[T]

Attributes

NameTypeDescription
valueTThe value of the Artifact.
Source Code in griptape/artifacts/generic_artifact.py
@define
class GenericArtifact(BaseArtifact, Generic[T]):
    """Serves as an escape hatch for artifacts that don't fit into any other category.

    Attributes:
        value: The value of the Artifact.
    """

    value: T = field(metadata={"serializable": True})

    def to_text(self) -> str:
        return str(self.value)
  • value = field(metadata={'serializable': True}) class-attribute instance-attribute

to_text()

Source Code in griptape/artifacts/generic_artifact.py
def to_text(self) -> str:
    return str(self.value)

Could this page be better? Report a problem or suggest an addition!