With this code on a notebook in vscode in wsl:
<code>graph = Neo4jGraph(
url="bolt://localhost:7687",
username="neo4j",
password="neo4j",
# enhanced_schema=True,
# sanitize=True,
)
schema = graph.schema
for type in query_types:
print(type)
instructions = f"{type}: {query_types[type]}"
values = graph.query(
"""MATCH (n)
WHERE rand() > 0.6
WITH n LIMIT 2
CALL {
WITH n
MATCH p=(n)-[*3..3]-()
RETURN p LIMIT 1
}
RETURN p"""
)
questions = chain.invoke(
{"input": schema, "instructions": instructions, "values": values}
)
</code>
<code>graph = Neo4jGraph(
url="bolt://localhost:7687",
username="neo4j",
password="neo4j",
# enhanced_schema=True,
# sanitize=True,
)
schema = graph.schema
for type in query_types:
print(type)
instructions = f"{type}: {query_types[type]}"
values = graph.query(
"""MATCH (n)
WHERE rand() > 0.6
WITH n LIMIT 2
CALL {
WITH n
MATCH p=(n)-[*3..3]-()
RETURN p LIMIT 1
}
RETURN p"""
)
questions = chain.invoke(
{"input": schema, "instructions": instructions, "values": values}
)
</code>
graph = Neo4jGraph(
url="bolt://localhost:7687",
username="neo4j",
password="neo4j",
# enhanced_schema=True,
# sanitize=True,
)
schema = graph.schema
for type in query_types:
print(type)
instructions = f"{type}: {query_types[type]}"
values = graph.query(
"""MATCH (n)
WHERE rand() > 0.6
WITH n LIMIT 2
CALL {
WITH n
MATCH p=(n)-[*3..3]-()
RETURN p LIMIT 1
}
RETURN p"""
)
questions = chain.invoke(
{"input": schema, "instructions": instructions, "values": values}
)
I get:
(https://i.sstatic.net/0kOn2TaC.png)
While using this works :
<code>driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "neo4j"))
</code>
<code>driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "neo4j"))
</code>
driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "neo4j"))
Here is my terminal where I launch the database, everything looks fine:
(https://i.sstatic.net/MUPgvdpB.png)
To me, it looks like Neo4jGraph() isn’t working anymore
Thanks for your help by advance
New contributor
Mathys Ferrato is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.