新增属性图谱

This commit is contained in:
wanyaokun
2024-09-14 09:44:43 +08:00
parent e18e4f22db
commit df7ebf3d4f
7 changed files with 316 additions and 29 deletions
+12 -1
View File
@@ -2,6 +2,7 @@ import os
from llama_index.vector_stores.chroma import ChromaVectorStore
from llama_index.vector_stores.qdrant import QdrantVectorStore
from qdrant_client import qdrant_client
from llama_index.graph_stores.neo4j import Neo4jPropertyGraphStore
qclient = None
@@ -69,4 +70,14 @@ def get_vector_store(docType:str):
case _:
raise ValueError(f"Invalid vector store type: {store_type}")
return store
return store
def get_Neo4j_Graph_Store(docType:str):
neo4jStore = Neo4jPropertyGraphStore(
username= os.getenv('NEO4J_USERNAME'),
password= os.getenv('NEO4J_PASSWORD'),
url=os.getenv('NEO4J_URL'),
database= docType
)
return neo4jStore