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

RuntimeError: Parameters must be a dict #2856

Closed
goodrahstar opened this issue Feb 9, 2024 · 2 comments
Closed

RuntimeError: Parameters must be a dict #2856

goodrahstar opened this issue Feb 9, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@goodrahstar
Copy link

Hi Team, I am facing issue with the interface.
Can someone help me with this error. I am running this in colab.

Code

documents = SimpleDirectoryReader("/content/data").load_data()
from llama_index.storage.storage_context import StorageContext

storage_context = StorageContext.from_defaults(graph_store=graph_store)

# NOTE: can take a while!
index = KnowledgeGraphIndex.from_documents(documents=documents,max_triplets_per_chunk=2,storage_context=storage_context,service_context=service_context,show_progress=True)

Error Log

Parsing nodes: 100%.         92/92 [00:00<00:00, 175.95it/s]
Processing nodes: 0%.       0/222 [00:01<?, ?it/s]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-20-a9b7fc827b8f>](https://localhost:8080/#) in <cell line: 6>()
      4 
      5 # NOTE: can take a while!
----> 6 index = KnowledgeGraphIndex.from_documents(documents=documents,max_triplets_per_chunk=2,storage_context=storage_context,service_context=service_context,show_progress=True)

8 frames
[/usr/local/lib/python3.10/dist-packages/kuzu/connection.py](https://localhost:8080/#) in execute(self, query, parameters)
     77             # TODO(Chang): remove ROLLBACK once we can guarantee database is deleted after conn
     78             self._connection.execute(self.prepare("ROLLBACK")._prepared_statement, {})
---> 79             raise RuntimeError("Parameters must be a dict")
     80         prepared_statement = self.prepare(
     81             query) if type(query) == str else query

RuntimeError: Parameters must be a dict

@semihsalihoglu-uw semihsalihoglu-uw added the question Further information is requested label Feb 9, 2024
@mewim
Copy link
Collaborator

mewim commented Feb 9, 2024

Hi @goodrahstar,

The interface of kuzu has changed quite a bit since we implemented the integration with LlamaIndex, so this integration no longer works with latest version of kuzu. You can fix this by downgrading kuzu to version 0.0.6: pip install kuzu==0.0.6. We will work on updating the integration and create a PR to LlamaIndex repo to make it work with the latest version of kuzu.

@goodrahstar
Copy link
Author

Thank you @mewim , Downgrading worked. Appreciate your prompt response. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants