neo4j / NaLLM

Repository for the NaLLM project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to import unstructured data

kayleecopter opened this issue · comments

I have followed the steps, create .env file in root path and ui folder.
And the followed the suggestion from #68 (comment)
to set the neo4j url : NEO4J_URL=neo4j+s://demo.neo4jlabs.com:7687

However, when I started running docker composer up, I am not able to import data.
image

And the logs show as below.
api | INFO: Started server process [8]
api | INFO: Waiting for application startup.
api | INFO: Application startup complete.
api | INFO: 172.20.0.1:34960 - "GET /hasapikey HTTP/1.1" 200 OK
api | INFO: 172.20.0.1:58074 - "GET /hasapikey HTTP/1.1" 200 OK
api | INFO: 172.20.0.1:45770 - "OPTIONS /data2cypher/data2cypher HTTP/1.1" 200 OK
api | INFO: 172.20.0.1:45770 - "POST /data2cypher/data2cypher HTTP/1.1" 404 Not Found
api | INFO: 172.20.0.1:47902 - "GET / HTTP/1.1" 404 Not Found
api | INFO: 172.20.0.1:53978 - "GET / HTTP/1.1" 404 Not Found

Is there anyone has this problem ?

My problem is it has no reaction when I click , and the backend UI cannot open as well~

I have the same problem than @KongFSOooO . The import button does not perform any action.

Also the report-generation use case fails. #73
The selector to pick a company does not appear (if it has to appear) and when I click on the Generate button it stays like processing something but does not finish.

getting the same error

commented

same for me, no reaction

commented

Could you solve the problem?
I also face the same problem. The import button doesn't work. And in the terminal I have the below output.

api | INFO: Started server process [7]
api | INFO: Waiting for application startup.
api | INFO: Application startup complete.
api | INFO: 172.18.0.1:49948 - "GET /hasapikey HTTP/1.1" 200 OK
api | INFO: 172.18.0.1:48854 - "GET /hasapikey HTTP/1.1" 200 OK
api | INFO: 172.18.0.1:37846 - "GET / HTTP/1.1" 404 Not Found
api | INFO: 172.18.0.1:37846 - "GET /favicon.ico HTTP/1.1" 404 Not Found
api | INFO: 172.18.0.1:37846 - "GET / HTTP/1.1" 404 Not Found
api | INFO: 172.18.0.1:37846 - "GET / HTTP/1.1" 404 Not Found
api | INFO: 172.18.0.1:37850 - "GET / HTTP/1.1" 404 Not Found

For a more up-to-date solution of generating graphs using LLMs, you can take a look at this blog post and the accompanying code: https://blog.langchain.dev/constructing-knowledge-graphs-from-text-using-openai-functions/

there is not any reaction when I click the button of "import"

Facing the same issue. Was anyone able to resolve this?

I was not able to solve it.

Same, any fix yet?

how to resolve?

I encountered the same issue and resolved it by removing the trailing '/' from the API endpoint URL specified in the env file located under the ui folder.

Original:
VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860/

Updated:
VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860

Now, it is functioning correctly for me.

Tried removing the the '/' from the API endpoint but still not able to import any data. Any fix yet?

Tried removing the the '/' from the API endpoint but still not able to import any data. Any fix yet?

Make sure you replace both the .env.example file and the .env.example file with your own two .env files that contain the information provided in the templates. Then, first go inside your root .env file and change the NEO4J_URL, and in the UI folder .env file and remove the backslash.

So you should have two .env files, one in your root which should look like this:

OPENAI_API_KEY="your api key goes here"
NEO4J_URL=neo4j+s://demo.neo4jlabs.com:7687
NEO4J_USER=companies
NEO4J_PASS=companies
NEO4J_DATABASE=companies

and one in the UI folder, which should contain this:

VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860
VITE_KG_CHAT_BACKEND_ENDPOINT=ws://localhost:7860/text2text
VITE_HAS_API_KEY_ENDPOINT=http://localhost:7860/hasapikey
VITE_KG_CHAT_SAMPLE_QUESTIONS_ENDPOINT=http://localhost:7860/questionProposalsForCurrentDb
VITE_REPORT_DATA_ENDPOINT=http://localhost:7860

This worked for me!

Hi Jonathan, I tried modifying the 2 env files as yours but still not working.
The url is accessible but cannot load any unstructure data in, I wonder if you have a sample unstructure data file to test on?
Many people mentioned this problem but seems no response.... so frustrating.

I am facing the same problem, any solutions? (already removed the trailing backspace)

In my case, the root cause of the issue was that when clicking the import button, the request was being sent to //data2cypher instead of /data2cypher, resulting in a 404 error.

Upon inspecting the API request, I noticed that it was being sent to:

${import.meta.env.VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT}/data2cypher

The problem was that the environment variable VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT had a trailing slash (/) at the end, causing the request URL to be malformed.

To resolve this issue, you can simply modify the .env file as follows:

Original:
VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860/

Updated:
VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860/

After making this change, it’s important to rebuild your Docker containers with the following commands:

docker-compose down -v
docker-compose up --build

Once the rebuild is complete, revisit the webpage and proceed as you originally intended. This should resolve the issue.

VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860

The .env I use is as follows.

NaLLM/ui/.env

VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860
VITE_KG_CHAT_BACKEND_ENDPOINT=ws://localhost:7860/text2text
VITE_HAS_API_KEY_ENDPOINT=http://localhost:7860/hasapikey
VITE_KG_CHAT_SAMPLE_QUESTIONS_ENDPOINT=http://localhost:7860/questionProposalsForCurrentDb
VITE_REPORT_DATA_ENDPOINT=http://localhost:7860

NaLLM/.env

OPENAI_API_KEY={your key}
NEO4J_URL=neo4j://host.docker.internal:7687
NEO4J_USER=neo4j
NEO4J_PASS={your pwd}
NEO4J_DATABASE=neo4j

Hi Jun, After following your configuration and restarting docker http://localhost:7680 can't show up, the site can't be reached

________________________________ From: JunHyeokYoo @.> Sent: Thursday, August 29, 2024 4:26 PM To: neo4j/NaLLM @.> Cc: Ming Lo @.>; Comment @.> Subject: Re: [neo4j/NaLLM] Unable to import unstructured data (Issue #71) VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860 The .env I use is as follows. NaLLM/ui/.env VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860 VITE_KG_CHAT_BACKEND_ENDPOINT=ws://localhost:7860/text2text VITE_HAS_API_KEY_ENDPOINT=http://localhost:7860/hasapikey VITE_KG_CHAT_SAMPLE_QUESTIONS_ENDPOINT=http://localhost:7860/questionProposalsForCurrentDb VITE_REPORT_DATA_ENDPOINT=http://localhost:7860 NaLLM/ui/.env OPENAI_API_KEY={your key} NEO4J_URL=neo4j://host.docker.internal:7687 NEO4J_USER=neo4j NEO4J_PASS={your pwd} NEO4J_DATABASE=neo4j — Reply to this email directly, view it on GitHub<#71 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATOFQAOQ55NLWPBR5KMNJTLZT3LJVAVCNFSM6AAAAAA47PVSHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJXGAYDOMZUGE. You are receiving this because you commented.Message ID: @.***>

The part you’re trying to access at http://localhost:7680 is the backend, while the actual user interface can be accessed at http://localhost:4173.