neo4j-labs / llm-graph-builder

Neo4j graph construction from unstructured data using LLMs
https://neo4j.com/labs/genai-ecosystem/llm-graph-builder/
Apache License 2.0
1.36k stars 184 forks source link

Fail to run local LLM as GCP and GEMINI when set to false still errors on Google Authentication #391

Closed rmccorkl closed 1 month ago

rmccorkl commented 1 month ago

Following the Instructions

Getting started

⚠️ For the backend, if you want to run the LLM KG Builder locally, and don't need the GCP/VertexAI integration, make sure to have the following set in your ENV file :

GEMINI_ENABLED = False GCP_LOG_METRICS_ENABLED = False

I get the following error the frontend interface momentarily pops up then hits this applications error after 1 sec

Unexpected Application Error!
Missing required parameter client_id.
Error: Missing required parameter client_id.
    at new Gq (https://accounts.google.com/gsi/client:263:331)
    at Hq (https://accounts.google.com/gsi/client:252:328)
    at rs.js (https://accounts.google.com/gsi/client:323:395)
    at new rs (https://accounts.google.com/gsi/client:327:453)
    at Object.initTokenClient (https://accounts.google.com/gsi/client:331:756)
    at http://localhost:8080/assets/index-4041949a.js:281:65694
    at lT (http://localhost:8080/assets/index-4041949a.js:40:24283)
    at r_ (http://localhost:8080/assets/index-4041949a.js:40:42406)
    at http://localhost:8080/assets/index-4041949a.js:40:40723
    at U (http://localhost:8080/assets/index-4041949a.js:25:1659)

The clienr_id (above)is associated with OAUTH authentication

- GOOGLE_CLIENT_ID=""

However, the env's are disabled (set to false above) is should not present or attempt an authentication event to Google Cloud, the code base is not respecting the environment variables.

kartikpersistent commented 1 month ago

Hi @rmccorkl we integrated GCS storage as source for that we need client id currently it is not optional but in coming days if you include GCS as source in frontend env then you need to give the client other wise not we will push this change in DEV by eod

rmccorkl commented 1 month ago

Hi Thanks for the reply much appreciated

So my question then how do you configure GCS not to be a source in the frontend , even if I comment out GOOGLE_CLIENT_ID in the .env file it still try's to authenticate to google. Is there some other variable that needs to be set ?

Do you have to list the sources positively in REACT_APP_SOURCES? Hows that done space or comma separated what values are the designated terms for the sources?

Incidentally , the example.env has a possible typo with a percent sign % and not closing quote on the GOOGLE_CLIENT_ID

cat .env

BACKEND_API_URL="http://localhost:8000"
BLOOM_URL=""
REACT_APP_SOURCES=""
LLM_MODELS=""
ENV=""
TIME_PER_CHUNK=

cat example.env

BACKEND_API_URL=""
BLOOM_URL=""
REACT_APP_SOURCES=""
LLM_MODELS=""
ENV=""
TIME_PER_CHUNK=
GOOGLE_CLIENT_ID="%    
kartikpersistent commented 1 month ago

Yes it is comma separated string

josezy commented 1 month ago

I just tried to run DEV branch with the changes from #396 but it still shows the Missing required parameter client_id error

kartikpersistent commented 1 month ago

Whether you are getting errors from the front end or the backend

kartikpersistent commented 1 month ago

In the frontend env mention local, s3, youtube, wiki in REACT_APP_SOURCE variable

ck1123456 commented 1 month ago

您好,请问怎么解决这个问题呢,求指教