Skip to content
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(community): Add property extraction for Nodes and Relationships in LLMGraphTransformer #7256

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

gvasilei
Copy link
Contributor

Adds support for extracting Node and Relationship properties on LLMGraphTransformer, similar to the Python version. A key distinction is that arbitrary property extraction is not supported. The caller needs to specify the property keys in advance.

This is my first contribution here, so please let me know if I've missed anything, or if there is any feedback. Thank you!

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 24, 2024
Copy link

vercel bot commented Nov 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Dec 3, 2024 7:12pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Dec 3, 2024 7:12pm

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Nov 24, 2024
@jacoblee93
Copy link
Collaborator

Thank you! Tagging in @easwee or @tomasonjo to have a look

@@ -5,8 +5,8 @@
"rootDir": "./src",
"target": "ES2021",
"lib": ["ES2021", "ES2022.Object", "DOM"],
"module": "ES2020",
"moduleResolution": "nodenext",
"module": "NodeNext",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't want to change tsconfig file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! I was using Typescript 5.2 locally and faced an issue with module being ES2020. Reverted.

Copy link
Collaborator

@jacoblee93 jacoblee93 Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you have to use TS 5.1 to build locally. It's bad and we need to fix it at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be good. In any case, I've reverted that particular change. @jacoblee93 do you see any other areas for feedback?

Copy link
Contributor

@tomasonjo tomasonjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jacoblee93 jacoblee93 changed the title community[minor]: Add property extraction for Nodes and Relationships in LLMGraphTransformer feat(community): Add property extraction for Nodes and Relationships in LLMGraphTransformer Dec 3, 2024
@jacoblee93 jacoblee93 added the lgtm PRs that are ready to be merged as-is label Dec 3, 2024
@jacoblee93
Copy link
Collaborator

Thank you both!

@jacoblee93 jacoblee93 merged commit 3b36a33 into langchain-ai:main Dec 3, 2024
32 checks passed
syntaxsec pushed a commit to aks-456/langchainjs that referenced this pull request Dec 13, 2024
…in LLMGraphTransformer (langchain-ai#7256)

Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants