Skip to content

blob_loader

BlobLoader

Bases: BaseFileLoader[BlobArtifact]

Source code in griptape/loaders/blob_loader.py
@define
class BlobLoader(BaseFileLoader[BlobArtifact]):
    def parse(self, data: bytes) -> BlobArtifact:
        if self.encoding is None:
            return BlobArtifact(data)
        else:
            return BlobArtifact(data, encoding=self.encoding)

parse(data)

Source code in griptape/loaders/blob_loader.py
def parse(self, data: bytes) -> BlobArtifact:
    if self.encoding is None:
        return BlobArtifact(data)
    else:
        return BlobArtifact(data, encoding=self.encoding)