code: import llama_index
  from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex
  import os
  import openai
  
  os.environ['OPENAI_API_KEY'] = 'sk-YOUR-API-KEY'
  
  # Loading from a directory
  documents = SimpleDirectoryReader('data').load_data()
  
  index = LlamaIndex()
  documents = [Document(text="What is the meaning of life?"), Document(text="How do I make a cup of coffee?")]
  nodes = [service_context.node_parser.get_nodes_from_document(document) for document in documents]
  index = GPTVectorStoreIndex.from_documents(nodes)
  
  
  # Construct a simple vector index
  #index = GPTVectorStoreIndex(documents)
  
  # Save your index to a index.json file
  index.save_to_disk('index.json')
  # Load the index from your saved index.json file
  index = GPTVectorStoreIndex.load_from_disk('index.json')
  
  # Querying the index
  response = index.query("What features do users want to see in the app?")
  print(response)
  
  
  
apis: llama_index.GPTVectorStoreIndex.from_documents llama_index.SimpleDirectoryReader llama_index.GPTVectorStoreIndex.load_from_disk llama_index.LlamaIndex llama_index.Document
extract_api: [((273, 285), 'llama_index.LlamaIndex', 'LlamaIndex', ([], {}), '()\n', (283, 285), False, 'from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex\n'), ((501, 542), 'llama_index.GPTVectorStoreIndex.from_documents', 'GPTVectorStoreIndex.from_documents', (['nodes'], {}), '(nodes)\n', (535, 542), False, 'from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex\n'), ((749, 797), 'llama_index.GPTVectorStoreIndex.load_from_disk', 'GPTVectorStoreIndex.load_from_disk', (['"""index.json"""'], {}), "('index.json')\n", (783, 797), False, 'from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex\n'), ((299, 344), 'llama_index.Document', 'Document', ([], {'text': '"""What is the meaning of life?"""'}), "(text='What is the meaning of life?')\n", (307, 344), False, 'from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex\n'), ((346, 393), 'llama_index.Document', 'Document', ([], {'text': '"""How do I make a cup of coffee?"""'}), "(text='How do I make a cup of coffee?')\n", (354, 393), False, 'from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex\n'), ((222, 251), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['"""data"""'], {}), "('data')\n", (243, 251), False, 'from llama_index import GPTVectorStoreIndex, Document, SimpleDirectoryReader, LlamaIndex\n')]