Skip to content

Base artifact storage

BaseArtifactStorage

Bases: ABC

Source code in griptape/memory/task/storage/base_artifact_storage.py
@define
class BaseArtifactStorage(ABC):
    @abstractmethod
    def store_artifact(self, namespace: str, artifact: BaseArtifact) -> None: ...

    @abstractmethod
    def load_artifacts(self, namespace: str) -> ListArtifact: ...

    @abstractmethod
    def can_store(self, artifact: BaseArtifact) -> bool: ...

    @abstractmethod
    def summarize(self, namespace: str) -> TextArtifact | InfoArtifact: ...

    @abstractmethod
    def query(self, namespace: str, query: str, metadata: Any = None) -> TextArtifact | InfoArtifact: ...

can_store(artifact) abstractmethod

Source code in griptape/memory/task/storage/base_artifact_storage.py
@abstractmethod
def can_store(self, artifact: BaseArtifact) -> bool: ...

load_artifacts(namespace) abstractmethod

Source code in griptape/memory/task/storage/base_artifact_storage.py
@abstractmethod
def load_artifacts(self, namespace: str) -> ListArtifact: ...

query(namespace, query, metadata=None) abstractmethod

Source code in griptape/memory/task/storage/base_artifact_storage.py
@abstractmethod
def query(self, namespace: str, query: str, metadata: Any = None) -> TextArtifact | InfoArtifact: ...

store_artifact(namespace, artifact) abstractmethod

Source code in griptape/memory/task/storage/base_artifact_storage.py
@abstractmethod
def store_artifact(self, namespace: str, artifact: BaseArtifact) -> None: ...

summarize(namespace) abstractmethod

Source code in griptape/memory/task/storage/base_artifact_storage.py
@abstractmethod
def summarize(self, namespace: str) -> TextArtifact | InfoArtifact: ...