error_artifact
Adapted from the Griptape AI Framework documentation.
Bases:
BaseArtifact
Attributes
Name | Type | Description |
---|---|---|
value | str | The error message. |
exception | Optional[Exception] | The exception that caused the error. Defaults to None. |
Source Code in griptape/artifacts/error_artifact.py
@define class ErrorArtifact(BaseArtifact): """Represents an error that may want to be conveyed to the LLM. Attributes: value: The error message. exception: The exception that caused the error. Defaults to None. """ value: str = field(converter=str, metadata={"serializable": True}) exception: Optional[Exception] = field(default=None, kw_only=True, metadata={"serializable": False}) def to_text(self) -> str: return self.value
exception = field(default=None, kw_only=True, metadata={'serializable': False})
class-attribute instance-attributevalue = field(converter=str, metadata={'serializable': True})
class-attribute instance-attribute
to_text()
Source Code in griptape/artifacts/error_artifact.py
def to_text(self) -> str: return self.value
- On this page
- Attributes
- to_text()
Could this page be better? Report a problem or suggest an addition!