Class swarmauri_base.vector_stores.VectorStoreSaveLoadMixin.VectorStoreSaveLoadMixin
swarmauri_base.vector_stores.VectorStoreSaveLoadMixin.VectorStoreSaveLoadMixin
Bases: IVectorStoreSaveLoad
, BaseModel
Base class for vector stores with built-in support for saving and loading the vectorizer's model and the documents.
save_store
save_store(directory_path)
Saves both the vectorizer's model and the documents.
Source code in swarmauri_base/vector_stores/VectorStoreSaveLoadMixin.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
load_store
load_store(directory_path)
Loads both the vectorizer's model and the documents.
Source code in swarmauri_base/vector_stores/VectorStoreSaveLoadMixin.py
38 39 40 41 42 43 44 45 46 47 48 49 |
|
save_parts
save_parts(directory_path, chunk_size=10485760)
Splits the file into parts if it's too large and saves those parts individually.
Source code in swarmauri_base/vector_stores/VectorStoreSaveLoadMixin.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
load_parts
load_parts(directory_path, file_pattern='*.part*')
Combines file parts from a directory back into a single file and loads it.
Source code in swarmauri_base/vector_stores/VectorStoreSaveLoadMixin.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|