-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: add Neo4j Cypher Search #2741
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
langchain/package.json
Outdated
@@ -1121,6 +1121,7 @@ | |||
"langchainhub": "~0.0.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on the PR! I noticed that this change adds a new hard dependency ("node-llama-cpp"). This comment is just to flag the change for maintainers to review.
@@ -0,0 +1,40 @@ | |||
/* eslint-disable no-process-env */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is flagging the addition of code that accesses environment variables via process.env
in the cypher.test.ts
file. Maintainers should review this change to ensure proper handling and usage of environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What needs to be done to resolve this issue?
@@ -0,0 +1,21 @@ | |||
/* eslint-disable no-process-env */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on adding the test case for initializing and connecting to the Neo4j database! This comment is just flagging the use of environment variables via process.env
for maintainers to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - just a few minor comments
await graph.query("MATCH (n) DETACH DELETE n"); | ||
|
||
// Create two nodes and a relationship | ||
await graph.query( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await graph.query(
"CREATE (a:Actor {name:'Bruce Willis'})" +
"-[:ACTED_IN {role: "Butch Coolidge"}]->(:Movie {title: 'Pulp Fiction'})"
);
Then the output would be Bruce Willis played Butch Coolidge in Pulp Fiction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oskarhane had a bunch of problems retrieving the role of a an actor in a movie, so I wouldn't add that to the test since it would be more a test of an LLM than the implementation
@@ -0,0 +1,40 @@ | |||
/* eslint-disable no-process-env */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What needs to be done to resolve this issue?
LGTM |
Looks great (and am happy to merge) but we should add some docs with setup and usage instructions under |
returnDirect?: boolean; | ||
} | ||
|
||
export class GraphCypherQAChain extends BaseChain { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to show this in expression language as well at some point if possible!
CI is failing - maybe because it's relying on an env var being set? Can we swap it out with a dummy value? |
Thank you! |
Porting Neo4j and GraphCypherQAChain from LangChain Python.