Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import unstructured data #71

Open
kayleecopter opened this issue Sep 20, 2023 · 22 comments
Open

Unable to import unstructured data #71

kayleecopter opened this issue Sep 20, 2023 · 22 comments

Comments

@kayleecopter
Copy link

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 ?

@KongFSOooO
Copy link

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

@Kholdo
Copy link

Kholdo commented Oct 4, 2023

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
Copy link

getting the same error

@Bennoo
Copy link

Bennoo commented Oct 25, 2023

same for me, no reaction

@sakinacodes
Copy link

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
Copy link
Collaborator

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
Copy link

yfangZhang commented Nov 13, 2023

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

@hsonetta-scryb
Copy link

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

@sakinacodes
Copy link

I was not able to solve it.

@rishabh21212
Copy link

Same, any fix yet?

@jakubMitura14
Copy link

same

@lihuan1104
Copy link

how to resolve?

@nweniwincs4
Copy link

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
Copy link

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

@JonathanReyess
Copy link

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
Copy link

mingust commented Aug 19, 2024

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
Copy link

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

@JunHyeokYoo
Copy link

JunHyeokYoo commented Aug 29, 2024

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
Copy link

mingust commented Aug 29, 2024 via email

@JunHyeokYoo
Copy link

JunHyeokYoo commented Aug 29, 2024

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
Copy link

mingust commented Aug 29, 2024 via email

@JunHyeokYoo
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests