workflow-agent / core /graph_engine.py
derangedsaturnian's picture
Update core/graph_engine.py
b457ce3 verified
Raw History Blame
504 Bytes
#from llama_index.core import KnowledgeGraphIndex,StorageContext
#from llama_index.core.graph_stores import SimpleGraphStore
from llama_index.core import VectorStoreIndex
def build_graph_idx(docs):
#graph_store=SimpleGraphStore()
#storage_context=StorageContext.from_defaults(graph_store=graph_store)
#idx=KnowledgeGraphIndex.from_documents(docs,max_triplets_per_chunk=3,storage_context=storage_context,include_embeddings=True)
idx = VectorStoreIndex.from_documents(docs)
return idx