I’m having the following issue setting up neo4j to run the course locally:
ValueError: Generated Cypher Statement is not valid
{code: Neo.ClientError.Statement.SyntaxError} {message: Unknown function 'genai.vector.encode' (line 3, column 21 (offset: 75))
" WITH chunk, genai.vector.enco
Following this post
I copied the jar to the plugins folder with:
❯ cp ./Application/relate-data/dbmss/dbms-24aea59e-72ed-4121-9516-a03a5d66dc92/products/neo4j-genai-plugin-5.18.0.jar ./Application/relate-data/dbmss/dbms-24aea59e-72ed-4121-9516-a03a5d66dc92/plugins/
and restarted but it does not work. Any ideas of what I’m missing?
For reference, I encountered other problems setting up the env. I’m listing them below in case they are useful to other people:
0. General Installation instructions here
1. Vector Index issues
Make sure you create a database using latest version Neo4j 5.18.
Strangely enough, this is NOT the default behavior and it will cause errors when creating the vector indices:
Exception has occurred: ValueError
Generated Cypher Statement is not valid {code: Neo.ClientError.Statement.SyntaxError} {message: Invalid input 'VECTOR': expected "(", "ALL", "ANY" or "SHORTEST" (line 2, column 8 (offset: 17)) " CREATE VECTOR INDEX `paper_chunks` IF NOT EXISTS" ^}
2. APOC issues:
-
Install APOC Plugin: If you’re using Neo4j Desktop, you can install APOC through the “Plugins” tab of your database.
-
Enable APOC Procedures: Open the neo4j.conf file located in the conf directory of your Neo4j installation. Ensure that the following lines are uncommented: http://dbms.security.procedures.unrestricted=apoc.* http://dbms.security.procedures.allowlist=apoc.*
I figured it out in the end. In addition to copying the plugin .jar inside your project (you can have multiple projects, so make sure is the right one). You will have to again modify the conf file to include genai
. In my case:
dbms.security.procedures.unrestricted=jwt.security.*,apoc.*,genai.*
dbms.security.procedures.allowlist=apoc.*,gds.*,genai.*
1 Like
@pol_avec, thanks for posting these details. I wasted a couple of days trying to set up neo4j on my Ubuntu machine, and although I got the first jupyter notebook to run okay, kept hitting snags. I thought I needed to use neo4j-enterprise (to which I obtained a 30-day trial license), but I’m glad to learn that the Desktop version works–I’ll give this a whirl. Thanks for sharing!
happy to help if you have any other issues just let me know. I don’t check this often so I feel free to reach on Twitter to @pol_avec
1 Like
Could you provide more details on what you did to get neo4j installed and running locally? everything seemed to work for me but I don’t have ‘neo4j-genai-plugin-5.18.0.jar’ in my products directory.
1 Like
I just downloaded the Mac desktop version from here:
and installed as any Mac app.
Where are you looking for that jar, which OS are you using, and which neo4j version? (it’s avaliable only after 5.16 I think)
Is it require to take enterprise licence to use genai plugin as mentioned in this git issue neo4j git issue 13422
I have installed neo4j desktop I was able to enable apoc plugin but not genai plugin. I tried to find the genai jar file but neo4j is pointing to enterprise subscription
I am using Mac 14.1 os with M3 chip and using neo4j 5.18.1
Quick Update: I have uninstalled Neo4j desktop and I have tried both enterprise and community editions of plain neo4j 18.1 tar.gz files and compared both for genai and apoc plugin.
Here are my findings:
neo4j-genai-plugin-5.18.1.jar is available only in enterprise edition inside products folder along with other jars like neo4j-graph-data-science-2.6.2.jar,bloom-plugin-5.x-2.11.0.jar where as community edition does not have products folder at all.
I have copied neo4j-genai-plugin-5.18.1.jar from products to plugins folder and apoc-5.18.0-core.jar from labs to plugins folder and made the configuration changes that were mentioned above comments in neo4j.conf file in conf folder and ran the tutorial ipython notebooks along with my OPENAI api key and i did not get any error
3 Likes
hello people, I have managed to set this up using docker. It makes the configuration much easier (just gotta install docker, period). You can see the instructions here:
https://twitter.com/pol_avec/status/1783502843371999422]
It’s for a personal project, so you can remove everything under the key web
(including it) and it will still work.
2 Likes
I had the same error, and I managed to use the solution of @pol_avec
1 - copy the docker-compose.yml in a local folder
2 - using terminal get to that folder and run : echo -e “FROM neo4j:5.4” > Dockerfile
3 - then run : docker compose up
4 - Restart Neo4J
…and you are good to go!
This helped me - thanks Kushwanth