QASystemOnMedicalKG/chatbot_graph.py

23 lines
555 B
Python
Raw Normal View History

2018-10-04 17:15:27 +08:00
#!/usr/bin/env python3
# coding: utf-8
# File: chatbot_graph.py
# Author: lhy<lhy_in_blcu@126.com,https://huangyong.github.io>
# Date: 18-10-4
import os
from py2neo import Graph,Node
class ChatBotGraph:
def __init__(self):
self.g = Graph(
host="127.0.0.1", # neo4j 搭载服务器的ip地址ifconfig可获取到
http_port=7474, # neo4j 服务器监听的端口号
user="lhy", # 数据库user name如果没有更改过应该是neo4j
password="lhy123")
handler = ChatBotGraph()