(self, path: str, create_path: bool = True)
| 33 | return len(self._obj.docstore._dict) |
| 34 | |
| 35 | def save(self, path: str, create_path: bool = True): |
| 36 | with self.acquire(): |
| 37 | if not os.path.isdir(path) and create_path: |
| 38 | os.makedirs(path) |
| 39 | ret = self._obj.save_local(path) |
| 40 | # logger.info(f"已将向量库 {self.key} 保存到磁盘") |
| 41 | return ret |
| 42 | |
| 43 | def clear(self): |
| 44 | ret = [] |
no test coverage detected