优化属性图检索功能及支持OpenAI线上模型
This commit is contained in:
@@ -16,6 +16,7 @@ from llama_index.core.storage import StorageContext
|
||||
from llama_index.core.storage.docstore import SimpleDocumentStore
|
||||
from llama_index.core import PropertyGraphIndex
|
||||
from app.engine.graph.extractor import PrjGraphExtractor
|
||||
from app.engine.graph.graphStore import RAGPropertyGraphStore
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger()
|
||||
@@ -103,7 +104,8 @@ class PropertyGraphChache:
|
||||
|
||||
def simplePropertyGraph(self,prjName:str,prjFlag:str,filePath:str):
|
||||
documents = get_documents(prjFlag)
|
||||
storeContext = StorageContext.from_defaults(vector_store=get_vector_store(prjFlag))
|
||||
storeContext = StorageContext.from_defaults(vector_store=get_vector_store(prjFlag),
|
||||
property_graph_store = RAGPropertyGraphStore())
|
||||
index = PropertyGraphIndex(
|
||||
nodes =documents,
|
||||
kg_extractors = [PrjGraphExtractor(prjName)],
|
||||
|
||||
Reference in New Issue
Block a user