12345678910111213141516171819 |
- #from graph_database.kg_construction.nebula_kg import NebulaConn
- import sys
- sys.path.append('/data/codes/ycj/code/graphRag/nebula-llm-qa/graph-database')
- from nebula_kg import NebulaConn
- if __name__ == "__main__":
- host = '116.204.126.213'
- port = '9669'
- username = 'root'
- password = 'nebula'
- graphSpace = 'knowledgeGraph'
- nebulaDBConn = NebulaConn()
- session, connection_pool = nebulaDBConn.initConnect(host=host, port=port, username=username, password=password, graphSpace=graphSpace)
- print(session.execute('SHOW TAGS'))
- nebulaDBConn.releaseSession(session=session)
- nebulaDBConn.releaseConnectionPool(connection_pool=connection_pool)
|