import File class LocalFileStore: def __init__(self, file_type, base_path, name): self.embeddings_path = os.path.join(base_path, 'embeddings') self.chunks_path = file_type(os.path.join(self.embeddings_path, f'{name}_chunks.msgpack')) self.dense_path = NumpyFile(os.path.join(self.embeddings_path, f'{name}_dense.npz')) self.sparse_path = SparseFile(os.path.join(self.embeddings_path, f'{name}_sparse.npz')) if not os.path.exists(self.embeddings_path): os.makedirs(self.embeddings_path)