-
Notifications
You must be signed in to change notification settings - Fork 14.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
KuzuGraph not working #11874
Comments
🤖 Hello, Thank you for reaching out and providing detailed information about the issue you're facing. The error you're encountering, This method is called in the 'refresh_schema' method of the 'KuzuGraph' class in LangChain: properties_text = self.conn._connection.get_rel_property_names(
table["name"]
).split("\n") However, as per the error message, there is no such method in the 'kuzu._kuzu.Connection' class, hence the AttributeError. To resolve this issue, you need to check the Kuzu documentation or source code to find the correct method for retrieving relationship property names. If you're unsure, you may need to reach out to the maintainers of the Kuzu library for further assistance. Regarding your question about the changes made to the LangChain codebase between version 0.0.311 and the latest version 0.0.315, I'm afraid I don't have that information at the moment. However, you can check the release notes or the commit history in the LangChain repository for this information. I hope this helps. If you have any other questions or need further clarification, please don't hesitate to ask. Best regards, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
The method "get_rel_property_names" has been removed since kuzu 0.0.10. Check this PR: kuzudb/kuzu#2207 A temporary solution is to use kuzu==0.0.9
|
Hi, @decentropy, I'm helping the LangChain team manage their backlog and am marking this issue as stale. From what I understand, the issue you reported regarding the KuzuGraph not working as expected and throwing an AttributeError related to the 'get_rel_property_names' method has been resolved. The 'get_rel_property_names' method has been removed since kuzu 0.0.10, and users are advised to use kuzu==0.0.9 as a temporary solution. Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days. Thank you for your understanding and cooperation. If you have any further questions or concerns, feel free to reach out. |
I've created a PR to resolve this issue: #16885 |
- **Description:** Updates to the Kuzu API had broken this functionality. These updates resolve those issues and add a new test to demonstrate the updates. - **Issue:** #11874 - **Dependencies:** No new dependencies - **Twitter handle:** @amirk08 Test results: ``` tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_query_no_params PASSED [ 33%] tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_query_params PASSED [ 66%] tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_refresh_schema PASSED [100%] =================================================== slowest 5 durations =================================================== 0.53s call tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_refresh_schema 0.34s call tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_query_no_params 0.28s call tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_query_params 0.03s teardown tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_refresh_schema 0.02s teardown tests/integration_tests/graphs/test_kuzu.py::TestKuzu::test_query_params ==================================================== 3 passed in 1.27s ==================================================== ```
Should be fixed in #16885 |
System Info
Name: kuzu
Version: 0.0.10 (latest)
Name: langchain
Version: 0.0.311
Who can help?
No response
Information
Related Components
Reproduction
I am using the example from langchain documentation:
https://python.langchain.com/docs/use_cases/graph/graph_kuzu_qa
This line fails:
graph = KuzuGraph(db)
F```
ile ~/.local/lib/python3.10/site-packages/langchain/graphs/kuzu_graph.py:71, in KuzuGraph.refresh_schema(self)
69 for table in rel_tables:
70 current_table_schema = {"properties": [], "label": table["name"]}
---> 71 properties_text = self.conn._connection.get_rel_property_names(
72 table["name"]
73 ).split("\n")
74 for i, line in enumerate(properties_text):
75 # The first 3 lines defines src, dst and name, so we skip them
76 if i < 3:
AttributeError: 'kuzu._kuzu.Connection' object has no attribute 'get_rel_property_names'
The text was updated successfully, but these errors were encountered: