将属性图流程同步至主流程中
This commit is contained in:
@@ -9,7 +9,7 @@ import os
|
||||
from llama_index.core.storage.storage_context import StorageContext
|
||||
from llama_index.core import load_index_from_storage
|
||||
from app.observability import init_observability
|
||||
from app.engine.vectordb import get_Neo4j_Graph_Store
|
||||
from app.engine.vectordb import get_Neo4j_Graph_Store,get_vector_store
|
||||
from llama_index.core.response_synthesizers import ResponseMode
|
||||
from util.register import *
|
||||
from llama_index.core.query_engine import RetrieverQueryEngine
|
||||
@@ -44,7 +44,7 @@ class PropertyGraph:
|
||||
prjCachePath = GRAPH_STORAGE_DIR + f"/{self._prjFlag}"
|
||||
if not os.path.exists(prjCachePath):
|
||||
return None
|
||||
storeContext = StorageContext.from_defaults(persist_dir = prjCachePath)
|
||||
storeContext = StorageContext.from_defaults(persist_dir = prjCachePath,vector_store = get_vector_store(self._prjFlag))
|
||||
index = load_index_from_storage(storeContext)
|
||||
return index
|
||||
|
||||
@@ -77,8 +77,8 @@ class PropertyGraph:
|
||||
if __name__ == "__main__":
|
||||
init_settings()
|
||||
init_observability()
|
||||
# graph = PropertyGraph('projects_1b20bbf4-3243-4ac3-bcf0-8a91e9157521')
|
||||
# graph.query('代码为XLBT的金额是')
|
||||
graph = PropertyGraph('projects_1b20bbf4-3243-4ac3-bcf0-8a91e9157521')
|
||||
graph.query('代码为XLBT的金额是')
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user