code: from llama_index.llms import OpenAI
  from llama_index.embeddings import HuggingFaceEmbedding
  from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext
  import os
  
  documents = SimpleDirectoryReader("./competition").load_data()
  os.environ['OPENAI_API_KEY'] = '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'
  
  embed_model = HuggingFaceEmbedding(model_name='BAAI/bge-large-en-v1.5')
  
  llm = OpenAI(temperature=0.1, model="gpt-3.5-turbo")
  service_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model, chunk_size=800, chunk_overlap=20)
  index = VectorStoreIndex.from_documents(documents, service_context=service_context, show_progress=True)
  index.storage_context.persist()
  
  query_engine = index.as_query_engine(similarity_top_k=2, response_mode='tree_summarize')
  
  # response = query_engine.query(
  #     "what are the benefits that I can have regarding risk management and portfolio monitoring? What are the charges?"
  # )
  
  def answer(question):
      
      return query_engine.query(question)
  
  if __name__ == "__main__":
      while True:
          question = input("Ask a question: ")
          print(answer(question))
apis: llama_index.VectorStoreIndex.from_documents llama_index.ServiceContext.from_defaults llama_index.SimpleDirectoryReader llama_index.llms.OpenAI llama_index.embeddings.HuggingFaceEmbedding
extract_api: [((346, 403), 'llama_index.embeddings.HuggingFaceEmbedding', 'HuggingFaceEmbedding', ([], {'model_name': '"""BAAI/bge-large-en-v1.5"""'}), "(model_name='BAAI/bge-large-en-v1.5')\n", (366, 403), False, 'from llama_index.embeddings import HuggingFaceEmbedding\n'), ((411, 457), 'llama_index.llms.OpenAI', 'OpenAI', ([], {'temperature': '(0.1)', 'model': '"""gpt-3.5-turbo"""'}), "(temperature=0.1, model='gpt-3.5-turbo')\n", (417, 457), False, 'from llama_index.llms import OpenAI\n'), ((476, 577), 'llama_index.ServiceContext.from_defaults', 'ServiceContext.from_defaults', ([], {'llm': 'llm', 'embed_model': 'embed_model', 'chunk_size': '(800)', 'chunk_overlap': '(20)'}), '(llm=llm, embed_model=embed_model, chunk_size=\n    800, chunk_overlap=20)\n', (504, 577), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n'), ((581, 680), 'llama_index.VectorStoreIndex.from_documents', 'VectorStoreIndex.from_documents', (['documents'], {'service_context': 'service_context', 'show_progress': '(True)'}), '(documents, service_context=service_context,\n    show_progress=True)\n', (612, 680), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n'), ((195, 233), 'llama_index.SimpleDirectoryReader', 'SimpleDirectoryReader', (['"""./competition"""'], {}), "('./competition')\n", (216, 233), False, 'from llama_index import VectorStoreIndex, SimpleDirectoryReader, ServiceContext\n')]