documents = loader.load_data(document_ids=gdoc_ids) index = GPTVectorStoreIndex.from_documents(documents)
for doc in documents: index.insert(doc)
index.storage_context.persist(persist_dir="./storage") from llama_index import StorageContext, load_index_from_storage storage_context = StorageContext.from_defaults(persist_dir="./storage") index = load_index_from_storage(storage_context)
from llama_index import SimpleDirectoryReader documents = SimpleDirectoryReader('./data').load_data()
data/ transcript/ - Transcript1.txt - Transcript2.txt documents/ - Document1.txt - Document2.txt
from llama_index import SimpleDirectoryReader documents = SimpleDirectoryReader('./data', recursive=True).load_data()