from llama_index.readers.json import JSONReader
# Initialize JSONReader
reader = JSONReader(
# The number of levels to go back in the JSON tree. Set to 0 to traverse all levels. Default is None.
# levels_back="None",
# # The maximum number of characters a JSON fragment would be collapsed in the output. Default is None.
collapse_length="20",
# # If True, ensures that the output is ASCII-encoded. Default is False.
ensure_ascii="True",
# # If True, indicates that the file is in JSONL (JSON Lines) format. Default is False.
# is_jsonl="False",
# # If True, removes lines containing only formatting from the output. Default is True.
clean_json="False",
)
documents = reader.load_data(input_file="./xxx.json", extra_info={})
vector_index = VectorStoreIndex.from_documents(documents, show_progress=True)
TypeError: '<=' not supported between instances of 'int' and 'str'