code: #main.py
  from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext
  from llama_index.embeddings import resolve_embed_model
  from llama_index.llms import OpenAI
  
  documents = SimpleDirectoryReader("data-qas").load_data()
  
  embed_model = resolve_embed_model("local:BAAI/bge-small-en-v1.5")
  
  llm = OpenAI(temperature=0.7, api_base="http://localhost:1234/v1", api_key="not-needed")
  
  service_context = ServiceContext.from_defaults(
      embed_model=embed_model, llm=llm
  )
  
  index = VectorStoreIndex.from_documents(
      documents, service_context=service_context
  )
  
  query_engine = index.as_query_engine()
  response = query_engine.query("Make 20 question-answer paris from the information provided. Focus on various types of cancers")
  print(response)
  
  
apis: llama_index.VectorStoreIndex.from_documents llama_index.ServiceContext.from_defaults llama_index.embeddings.resolve_embed_model llama_index.SimpleDirectoryReader llama_index.llms.OpenAI
extract_api: [((254, 305), 'llama_index.embeddings.resolve_embed_model', 'resolve_embed_model', (['"""local:BAAI/bge-small-en-v1.5"""'], {}), "('local:BAAI/bge-small-en-v1.5')\n", (273, 305), False, 'from llama_index.embeddings import resolve_embed_model\n'), ((313, 400), 'llama_index.llms.OpenAI', 'OpenAI', ([], {'temperature': '(0.7)', 'api_base': '"""http://localhost:1234/v1"""', 'api_key': '"""not-needed"""'}), "(temperature=0.7, api_base='http://localhost:1234/v1', api_key=\n    'not-needed')\n", (319, 400), False, 'from llama_index.llms import OpenAI\n'), ((415, 477), 'llama_index.ServiceContext.from_defaults', 'ServiceContext.from_defaults', ([], {'embed_model': 'embed_model', 'llm': 'llm'}), '(embed_model=embed_model, llm=llm)\n', (443, 477), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n'), ((493, 568), 'llama_index.VectorStoreIndex.from_documents', 'VectorStoreIndex.from_documents', (['documents'], {'service_context': 'service_context'}), '(documents, service_context=service_context)\n', (524, 568), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n'), ((193, 226), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['"""data-qas"""'], {}), "('data-qas')\n", (214, 226), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n')]