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, service_context=service_context)