AttributeError: 'dict' object has no attribute 'index_structs'
>>> from llama_index import GPTListIndex, SimpleDirectoryReader >>> documents = SimpleDirectoryReader("./data").load_data() >>> index = GPTListIndex.from_documents(documents) >>> index.storage_context.persist(persist_dir="./my_index") >>> import os >>> os.listdir("./my_index") ['docstore.json', 'index_store.json', 'vector_store.json'] >>> from llama_index import StorageContext, load_index_from_storage >>> storage_context = StorageContext.from_defaults(persist_dir="./my_index") >>> new_index = load_index_from_storage(storage_context) >>>
index1 = GPTVectorStoreIndex(nodes, service_context=service_context) index2 = GPTListIndex(nodes, service_context=service_context)
storage_context_node.persist(persist_dir="./storage/" + directory)