neo4j-graphacademy / llm-chatbot-typescript

https://graphacademy.neo4j.com/courses/llm-chatbot-typescript/
14 stars 48 forks source link

Fails `npm run test graph.test.ts` #3

Open adkelley opened 7 months ago

adkelley commented 7 months ago

initGraph is unable to instantiate the Neo4JGraph when running the test graph.test.ts. The failure message returned from the test is:

Could not use APOC procedures. Please ensure the APOC plugin is installed in Neo4j and that 'apoc.meta.data()' is allowed in Neo4j configuration

I'm using Neo4J 5.18.1, and my APOC plugin is installed. I've tested this on a local database, and my sandbox, and it returns the same error above.

dianaow commented 7 months ago

Did you manage to resolve this issue? Before the APOC error, I am also seeing a " Failed to verify connection." (at Function.initialize (node_modules/@langchain/community/dist/graphs/neo4j_graph.cjs:74:21))

I am encountering this error for my locally created Neo4j database set up with Neo4j desktop. However, the test passes when using the sandbox Neo4j database created when starting the chatbot course.

I have verified that the graph credentials are correct because I can connect to the Neo4j database using Langchain's python Neo4jGraph module, however it seems I am having a connection error using Langchain's javascript Neo4jGraph module

harshil4076 commented 2 months ago

Needed to update the neo4j.conf. In neo4j desktop you can go to the settings and ctrl + F for apoc. Uncommenting dbms.security.procedures.allowlist=apoc.coll.*,apoc.load.*,gds.* and adding apoc.meta.data in the end worked.

Final allowlist: dbms.security.procedures.allowlist=apoc.coll.*,apoc.load.*,gds.*, apoc.meta.data