tomasonjo / NeoGPT-Explorer

Knowledge-graph based chatbot using GPT3 and Neo4j
https://medium.com/neo4j/knowledge-graph-based-chatbot-with-gpt-3-and-neo4j-c4ebbd325ed
MIT License
185 stars 58 forks source link

graphdatascience #1

Closed new4u closed 1 year ago

new4u commented 1 year ago

when i install database it shows not graphdatascience, and i cannot pip install that

$  sh seed_database.sh
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement graphdatascience (from versions: none)
ERROR: No matching distribution found for graphdatascience
WARNING: You are using pip version 20.2.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
Traceback (most recent call last):

# pip install graphdatascience
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement graphdatascience (from versions: none)
ERROR: No matching distribution found for graphdatascience
WARNING: You are using pip version 20.2.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
tomasonjo commented 1 year ago

It looks like you are using python 2 still. Try using Python3 by changing the command to pip3 install

new4u commented 1 year ago

Thank you seems port 8501 started When I ask question I get error

ServiceUnavailable: Couldn't connect to neo4j:7687 (resolved to ()): Failed to establish connection to ResolvedIPv4Address(('172.18.0.2', 7687)) (reason [Errno 111] Connection refused)

image

tomasonjo commented 1 year ago

Is Neo4j service running? You can check localhost:7474

new4u commented 1 year ago

Is Neo4j service running? You can check localhost:7474

nope~ how can i do next

root@walink:~/tools/NeoGPT-Explorer# sudo docker-compose up
[+] Running 2/2
 ⠿ Container neo4j      Recreated 0.1s
 ⠿ Container streamlit  Recreated 0.1s
Attaching to neo4j, streamlit
neo4j      | Installing Plugin 'apoc' from /var/lib/neo4j/labs/apoc-*-core.jar to /var/lib/neo4j/plugins/apoc.jar
neo4j      | Applying default values for plugin apoc to neo4j.conf
neo4j      | Fetching versions.json for Plugin 'graph-data-science' from https://graphdatascience.ninja/versions.json
streamlit  | 
streamlit  | Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.
streamlit  | 
streamlit  | 
streamlit  |   You can now view your Streamlit app in your browser.
streamlit  | 
streamlit  |   URL: http://0.0.0.0:8501
streamlit  | 
neo4j      | Installing Plugin 'graph-data-science' from https://graphdatascience.ninja/neo4j-graph-data-science-2.3.1.jar to /var/lib/neo4j/plugins/graph-data-science.jar 
streamlit  | 2023-03-13 11:05:03.399 Uncaught app exception
streamlit  | Traceback (most recent call last):
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_async_compat/network/_bolt_socket.py", line 507, in _connect
streamlit  |     s.connect(resolved_address)
streamlit  | ConnectionRefusedError: [Errno 111] Connection refused
streamlit  | 
streamlit  | The above exception was the direct cause of the following exception:
streamlit  | 
streamlit  | Traceback (most recent call last):
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_async_compat/network/_bolt_socket.py", line 652, in connect
streamlit  |     s = BoltSocket._connect(resolved_address, timeout, keep_alive)
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_async_compat/network/_bolt_socket.py", line 525, in _connect
streamlit  |     raise ServiceUnavailable(
streamlit  | neo4j.exceptions.ServiceUnavailable: Failed to establish connection to ResolvedIPv4Address(('172.18.0.2', 7687)) (reason [Errno 111] Connection refused)
streamlit  | 
streamlit  | The above exception was the direct cause of the following exception:
streamlit  | 
streamlit  | Traceback (most recent call last):
streamlit  |   File "/usr/local/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
streamlit  |     exec(code, module.__dict__)
streamlit  |   File "/app/app.py", line 79, in <module>
streamlit  |     output, cypher_query = generate_response(user_input)
streamlit  |   File "/app/app.py", line 25, in generate_response
streamlit  |     message = read_query(cypher_query)
streamlit  |   File "/app/driver.py", line 11, in read_query
streamlit  |     result = session.run(query, params)
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/work/session.py", line 280, in run
streamlit  |     self._connect(self._config.default_access_mode)
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/work/session.py", line 120, in _connect
streamlit  |     super()._connect(access_mode, **access_kwargs)
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/work/workspace.py", line 168, in _connect
streamlit  |     self._connection = self._pool.acquire(**acquire_kwargs_)
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/io/_pool.py", line 411, in acquire
streamlit  |     return self._acquire(
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/io/_pool.py", line 221, in _acquire
streamlit  |     return connection_creator()
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/io/_pool.py", line 138, in connection_creator
streamlit  |     connection = self.opener(
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/io/_pool.py", line 386, in opener
streamlit  |     return Bolt.open(
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_sync/io/_bolt.py", line 322, in open
streamlit  |     BoltSocket.connect(
streamlit  |   File "/usr/local/lib/python3.9/site-packages/neo4j/_async_compat/network/_bolt_socket.py", line 679, in connect
streamlit  |     raise ServiceUnavailable(
streamlit  | neo4j.exceptions.ServiceUnavailable: Couldn't connect to neo4j:7687 (resolved to ()):
streamlit  | Failed to establish connection to ResolvedIPv4Address(('172.18.0.2', 7687)) (reason [Errno 111] Connection refused)
neo4j      | Applying default values for plugin graph-data-science to neo4j.conf
neo4j      | Changed password for user 'neo4j'. IMPORTANT: this change will only take effect if performed before the database is started for the first time.
neo4j      | 2023-03-13 11:06:38.649+0000 INFO  Starting...
neo4j      | 2023-03-13 11:06:40.013+0000 INFO  This instance is ServerId{4b9f0e3a} (4b9f0e3a-ea8e-4658-92d9-bd8470c8bf3b)
neo4j      | 2023-03-13 11:06:42.056+0000 INFO  ======== Neo4j 5.4.0 ========
neo4j      | 2023-03-13 11:06:42.756+0000 INFO  GDS compatibility: for Neo4j Settings 4.4 -- not available, for Neo4j Settings 5.1 -- not available, for Neo4j Settings 5.2.0 -- not available, for Neo4j Settings 5.3 -- not available, for Neo4j Settings 5.4 -- available, for Neo4j Settings 5.5 -- not available, selected: Neo4j Settings 5.4
neo4j      | 2023-03-13 11:06:42.757+0000 INFO  GDS compatibility: for Neo4j 4.4 -- not available, for Neo4j 5.1 -- not available, for Neo4j 5.2.0 -- not available, for Neo4j 5.3 -- not available, for Neo4j 5.4 -- available, for Neo4j 5.5 -- not available, selected: Neo4j 5.4
neo4j      | 2023-03-13 11:07:12.684+0000 INFO  Bolt enabled on 0.0.0.0:7687.
neo4j      | 2023-03-13 11:07:14.602+0000 INFO  Remote interface available at http://localhost:7474/
neo4j      | 2023-03-13 11:07:14.611+0000 INFO  id: 64C89B742733B59681BAA8AF6C07D444A49430A39CFBC220158756995A6D6916
neo4j      | 2023-03-13 11:07:14.613+0000 INFO  name: system
neo4j      | 2023-03-13 11:07:14.615+0000 INFO  creationDate: 2023-03-13T10:58:46.721Z
neo4j      | 2023-03-13 11:07:14.616+0000 INFO  Started.
new4u commented 1 year ago

image

tomasonjo commented 1 year ago

check example questions

new4u commented 1 year ago

image

tomasonjo commented 1 year ago

The last error means that you have properly populated the database