-
Notifications
You must be signed in to change notification settings - Fork 5k
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
add option for string node representation update #16100
add option for string node representation update #16100
Conversation
@prrao87 I'm pretty sure i made this change because people wanted the node properties in the string representation lol Instead of removing, there should be a toggle (likely on the retriever) |
Interesting.. the call to |
@prrao87 maybe something roughly like
|
Was exactly trying this but am getting stuck in inheritance hell lol. It applies to the subretriever but I think I need to have the same kwarg in all the retrievers that are being subclassed for the PropertyGraphIndex 😅. |
@prrao87 yea, there's the base class and 5 other retrievers, not too bad :) |
Now that you confirmed this, yes, not too bad at all 😅. Fixing now. |
Done - I left the default value as retriever = index.as_retriever(include_properties=True) |
Description
Related to the Property Graph Index retriever's
as_retriever
method that allows users to print the string representation of a property graph node or relationship.I think it makes sense to revert the unintended consequence of string node representation update per #14707, where the
properties
dict is coerced to a string and appended to the node name prior to printing the string representation. This caused the string representation of the node to return a garbled mess ofname
+properties
that make it hard to read when running the following code in the property graph index retriever:The suggested revert to the change made by @logan-markewich now returns the correct results, pretty-printed as follows:
New Package?
Did I fill in the
tool.llamahub
section in thepyproject.toml
and provide a detailed README.md for my new integration or package?Version Bump?
Did I bump the version in the
pyproject.toml
file of the package I am updating? (Except for thellama-index-core
package)Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Tested on Kùzu, Neo4j and FalkorDB by rerunning the example notebooks end-to-end, and nothing breaks.
Suggested Checklist:
make format; make lint
to appease the lint gods