Skip to content

Commit

Permalink
fix: Fix for an issue with in-memory property graph store and embeddi…
Browse files Browse the repository at this point in the history
  • Loading branch information
anirbanbasu committed Jun 5, 2024
1 parent 0263ada commit dda09e2
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ui/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,16 @@ def initialise_chat_engine() -> bool:
message=f"**Initialising chat engine** from index using the _{sm.global_settings__index_chat_mode.value}_ chat mode."
)
sub_retrievers = [
VectorContextRetriever(
sm.global_knowledge_graph_index.value.property_graph_store
),
LLMSynonymRetriever(
sm.global_knowledge_graph_index.value.property_graph_store
graph_store=sm.global_knowledge_graph_index.value.property_graph_store
),
]
if not sm.global_settings__neo4j_disable.value:
sub_retrievers.append(
VectorContextRetriever(
graph_store=sm.global_knowledge_graph_index.value.property_graph_store
)
)
kg_retriever = PGRetriever(sub_retrievers=sub_retrievers)
# The vector context retriever can make the vector index retriever redundant, in the future.
vector_retriever = VectorIndexRetriever(
Expand Down Expand Up @@ -272,7 +275,7 @@ def build_index_pipeline() -> bool:
llm=Settings.llm,
kg_extractors=kg_extractors,
embed_model=Settings.embed_model,
embed_kg_nodes=True,
embed_kg_nodes=True if not sm.global_settings__neo4j_disable.value else False,
storage_context=sm.global_llamaindex_storage_context.value,
show_progress=True,
)
Expand Down

0 comments on commit dda09e2

Please sign in to comment.