Exemplo n.º 1
0
def _create_dummy_lmdb_cache_file(embedding_manager: EmbeddingManager,
                                  embedding_name: str):
    embedding_cache_file = Path(
        embedding_manager.get_embedding_lmdb_path()).joinpath(
            embedding_name).joinpath('data.mdb')
    embedding_cache_file.parent.mkdir(parents=True, exist_ok=True)
    embedding_cache_file.touch()
Exemplo n.º 2
0
 def test_should_disable_lmdb_cache(
         self, embedding_manager: EmbeddingManager):
     embedding_manager.disable_embedding_lmdb_cache()
     assert embedding_manager.get_embedding_lmdb_path() is None