-
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(community): Provide fallback relationshipType in case it is not present in graph_transformer #7521
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@@ -254,6 +258,7 @@ export class LLMGraphTransformer { | |||
strictMode = true, | |||
nodeProperties = [], | |||
relationshipProperties = [], | |||
fallbackRelationshipType = "unknown, |
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.
Think you're missing a quote here!
And don't forget to run yarn format
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.
Thanks for this!
CC @tomasonjo for a look as well
Actually, can you make the default fallback relationship type Null, so the default behavior isn't changed. When the fallback relationship is configured, then you can use it as fallback. Also describe the new attribute in docstring please. |
Although difficult to reproduce, I've ran into a few times when
relationshipType
was undefined and so the extraction fails.In these cases I'd still like to have the relationship being captured in my knowledge graph, so it seems appropriate to provide the transformer with a fallback value it can use, in this case defaulted to
"unknown"
. This also allows for the value to be overridden with something else in cases where"unknown"
already means something in an existing context.I'm happy to contribute to anything that may need to be updated to reflect this info, like documentations, just need a pointer :)