neo4j / NaLLM

Repository for the NaLLM project
Apache License 2.0
1.22k stars 237 forks source link

Unable to import unstructured data #71

Open kayleecopter opened 12 months ago

kayleecopter commented 12 months ago

I have followed the steps, create .env file in root path and ui folder. And the followed the suggestion from https://github.com/neo4j/NaLLM/issues/68#issuecomment-1719751758 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 ?

KongFSOooO commented 12 months ago

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

Kholdo commented 11 months ago

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.

drammen94 commented 11 months ago

getting the same error

Bennoo commented 10 months ago

same for me, no reaction

sakinacodes commented 10 months ago

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

tomasonjo commented 10 months ago

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/

yfangZhang commented 10 months ago

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

hsonetta-scryb commented 10 months ago

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

sakinacodes commented 10 months ago

I was not able to solve it.

rishabh21212 commented 7 months ago

Same, any fix yet?

jakubMitura14 commented 5 months ago

same

lihuan1104 commented 3 months ago

how to resolve?

nweniwincs4 commented 2 months ago

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.

KeshavArvindh commented 2 months ago

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

JonathanReyess commented 2 months ago

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!

mingust commented 3 weeks ago

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.

virginiewyllemanflow commented 2 weeks ago

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

JunHyeokYoo commented 2 weeks ago

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.

mingust commented 2 weeks ago

Hi Jun,

Thanks,should the update be? VITE_UNSTRUCTURED_IMPORT_BACKEND_ENDPOINT=http://localhost:7860


From: JunHyeokYoo @.> Sent: Thursday, August 29, 2024 3:52 PM To: neo4j/NaLLM @.> Cc: Ming Lo @.>; Comment @.> Subject: Re: [neo4j/NaLLM] Unable to import unstructured data (Issue #71)

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.

This explanation should help others understand and resolve the issue effectively.

— Reply to this email directly, view it on GitHubhttps://github.com/neo4j/NaLLM/issues/71#issuecomment-2316941586, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATOFQAL63STQAVBQHI6Q4I3ZT3HKDAVCNFSM6AAAAAA47PVSHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJWHE2DCNJYGY. You are receiving this because you commented.

JunHyeokYoo commented 2 weeks ago

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
mingust commented 2 weeks ago

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 GitHubhttps://github.com/neo4j/NaLLM/issues/71#issuecomment-2317007341, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATOFQAOQ55NLWPBR5KMNJTLZT3LJVAVCNFSM6AAAAAA47PVSHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJXGAYDOMZUGE. You are receiving this because you commented.Message ID: @.***>

JunHyeokYoo commented 1 week ago

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.