run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
36.96k stars 5.3k forks source link

[Bug]: JSONalyze Query Engine - DEFAULT_TABLE_NAME #15493

Open TranDenyDFW opened 3 months ago

TranDenyDFW commented 3 months ago

Bug Description

For some reason I get an error when using the JSONalyze Query Engine using the default table name (following the instructions here): query=query, list_of_dict=json_list, llm=llm, table_name=DEFAULT_TABLE_NAME

I had to change it to 'item' to get it to work.

Not an issue, just passing along the bug. Great library, btw! - I love it! <3

Version

llama-index==0.10.65; sqlite-utils==3.37

Steps to Reproduce

Change: query=query, list_of_dict=json_list, llm=llm, table_name='item' To: query=query, list_of_dict=json_list, llm=llm, table_name=DEFAULT_TABLE_NAME Here: https://www.kaggle.com/code/denytran/llamaindex-jsonalyze-query-engine?scriptVersionId=193223108

Relevant Logs/Tracbacks

No response

dosubot[bot] commented 3 months ago

Hey there, @TranDenyDFW! I'm here to assist you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this together!

The error occurs because the default table name in the JSONalyze Query Engine is set to "items", not "DEFAULT_TABLE_NAME". To resolve this, you should use "items" as the table name.

Here's the relevant part of the code showing the default table name:

DEFAULT_TABLE_NAME = "items"

Ensure that the table_name parameter is set to "items" when you create an instance of the JSONalyze Query Engine [1][2].

To continue talking to Dosu, mention @dosu.