(self)
| 68 | cosine_better_than_threshold: float = 0.2 |
| 69 | |
| 70 | def __post_init__(self): |
| 71 | self._client_file_name = os.path.join( |
| 72 | self.global_config["working_dir"], f"vdb_{self.namespace}.json" |
| 73 | ) |
| 74 | self._max_batch_size = self.global_config["embedding_batch_num"] |
| 75 | self._client = NanoVectorDB( |
| 76 | self.embedding_func.embedding_dim, storage_file=self._client_file_name |
| 77 | ) |
| 78 | self.cosine_better_than_threshold = self.global_config.get( |
| 79 | "cosine_better_than_threshold", self.cosine_better_than_threshold |
| 80 | ) |
| 81 | |
| 82 | async def upsert(self, data: dict[str, dict]): |
| 83 | logger.info(f"Inserting {len(data)} vectors to {self.namespace}") |
nothing calls this directly
no outgoing calls
no test coverage detected