@@ -437,39 +437,39 @@ def _patch_vector_store(
437437 entities = _entities , vectorstore = description_embedding_store
438438 )
439439
440- if with_reports is not None :
441- from graphrag .query .input .loaders .dfs import (
442- store_reports_semantic_embeddings ,
443- )
444- from graphrag .vector_stores .lancedb import LanceDBVectorStore
445-
446- community_reports = with_reports
447- collection_name = (
448- config .embeddings .vector_store .get ("container_name" , "default" )
449- if config .embeddings .vector_store
450- else "default"
451- )
452- # Store report embeddings
453- _reports = read_indexer_reports (
454- community_reports ,
455- nodes ,
456- community_level ,
457- content_embedding_col = "full_content_embedding" ,
458- config = config ,
459- )
460-
461- full_content_embedding_store = LanceDBVectorStore (
462- db_uri = config .embeddings .vector_store ["db_uri" ],
463- collection_name = f"{ collection_name } -community-full_content" ,
464- overwrite = config .embeddings .vector_store ["overwrite" ],
465- )
466- full_content_embedding_store .connect (
467- db_uri = config .embeddings .vector_store ["db_uri" ]
468- )
469- # dump embeddings from the reports list to the full_content_embedding_store
470- store_reports_semantic_embeddings (
471- reports = _reports , vectorstore = full_content_embedding_store
472- )
440+ if with_reports is not None :
441+ from graphrag .query .input .loaders .dfs import (
442+ store_reports_semantic_embeddings ,
443+ )
444+ from graphrag .vector_stores .lancedb import LanceDBVectorStore
445+
446+ community_reports = with_reports
447+ collection_name = (
448+ config .embeddings .vector_store .get ("container_name" , "default" )
449+ if config .embeddings .vector_store
450+ else "default"
451+ )
452+ # Store report embeddings
453+ _reports = read_indexer_reports (
454+ community_reports ,
455+ nodes ,
456+ community_level ,
457+ content_embedding_col = "full_content_embedding" ,
458+ config = config ,
459+ )
460+
461+ full_content_embedding_store = LanceDBVectorStore (
462+ db_uri = config .embeddings .vector_store ["db_uri" ],
463+ collection_name = f"{ collection_name } -community-full_content" ,
464+ overwrite = config .embeddings .vector_store ["overwrite" ],
465+ )
466+ full_content_embedding_store .connect (
467+ db_uri = config .embeddings .vector_store ["db_uri" ]
468+ )
469+ # dump embeddings from the reports list to the full_content_embedding_store
470+ store_reports_semantic_embeddings (
471+ reports = _reports , vectorstore = full_content_embedding_store
472+ )
473473
474474 return config
475475
0 commit comments