code: import streamlit as st
  import llama_index
  from llama_index import StorageContext, load_index_from_storage
  from llama_index.query_engine import RetrieverQueryEngine
  from llama_index.storage.docstore import SimpleDocumentStore
  from llama_index.vector_stores import SimpleVectorStore
  from llama_index.storage.index_store import SimpleIndexStore
  from llama_index import KeywordTableIndex
  from llama_index.indices.keyword_table import SimpleKeywordTableIndex
  from llama_index import ResponseSynthesizer
  from llama_index.indices.postprocessor import SimilarityPostprocessor
  from llama_index.retrievers import VectorIndexRetriever
  from llama_index.retrievers import ListIndexRetriever
  from llama_index.retrievers import TreeRootRetriever
  from llama_index.indices.keyword_table.retrievers import KeywordTableGPTRetriever
  from llama_index.indices.keyword_table import GPTSimpleKeywordTableIndex
  from llama_index.indices.keyword_table.retrievers import KeywordTableRAKERetriever
  from llama_index.indices.keyword_table.retrievers import KeywordTableSimpleRetriever
  from llama_index import Prompt
  from llama_index import LLMPredictor
  from langchain.chat_models import ChatOpenAI
  from llama_index import ServiceContext
  
  
  print("1")
  storage_context_1 = StorageContext.from_defaults(
      docstore=SimpleDocumentStore.from_persist_dir(persist_dir="vector_store"),
      vector_store=SimpleVectorStore.from_persist_dir(persist_dir="vector_store"),
      index_store=SimpleIndexStore.from_persist_dir(persist_dir="vector_store"),
  )
  
  storage_context_2 = StorageContext.from_defaults(
      docstore=SimpleDocumentStore.from_persist_dir(persist_dir="table"),
      vector_store=SimpleVectorStore.from_persist_dir(persist_dir="table"),
      index_store=SimpleIndexStore.from_persist_dir(persist_dir="table"),
  )
  storage_context_3 = StorageContext.from_defaults(
      docstore=SimpleDocumentStore.from_persist_dir(persist_dir="tree"),
      vector_store=SimpleVectorStore.from_persist_dir(persist_dir="tree"),
      index_store=SimpleIndexStore.from_persist_dir(persist_dir="tree"),
  )
  storage_context_4 = StorageContext.from_defaults(
      docstore=SimpleDocumentStore.from_persist_dir(persist_dir="list"),
      vector_store=SimpleVectorStore.from_persist_dir(persist_dir="list"),
      index_store=SimpleIndexStore.from_persist_dir(persist_dir="list"),
  )
  
  print("2")
  from llama_index import load_index_from_storage, load_indices_from_storage, load_graph_from_storage
  
  indices1 = load_index_from_storage(storage_context_1)
  indices2 = load_index_from_storage(storage_context_2)
  indices3 = load_index_from_storage(storage_context_3)
  indices4 = load_index_from_storage(storage_context_4)
  # indices1 = load_index_from_storage(storage_context="vector_store")
  
  index = [indices1, indices2, indices3, indices4]
  
  print("3")
  
  print("4")
  from llama_index.indices.response import BaseResponseBuilder
  
  
  
  
  
  # configure response synthesizer
  response_synthesizer = ResponseSynthesizer.from_args(
      # node_postprocessors=[
      # ]
  )
  
  
      
  print("5")
  
  
  TEMPLATE_STR = (
      "We have provided context information below. \n"
      "---------------------\n"
      "{context_str}"
      "\n---------------------\n"
      "Given this information, please answer the question: {query_str}\n"
  )
  QA_TEMPLATE = Prompt(TEMPLATE_STR)
  
  llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0, model_name="gpt-3.5-turbo", streaming=True))
  
  service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, chunk_size=1024)
  
  
  
  
  query_engine1 = indices3.as_query_engine(service_context=service_context, text_qa_template=QA_TEMPLATE, similarity_top_k=3, streaming=True, )
  
  
  response = query_engine1.query('How much package has government of india announced?')
  
  
  # print("7")
  str(response)
  print(response)
  
  
  # response.source_nodes
  print(response.source_nodes)
  
  
  ########## working ##########
apis: llama_index.storage.docstore.SimpleDocumentStore.from_persist_dir llama_index.ResponseSynthesizer.from_args llama_index.ServiceContext.from_defaults llama_index.storage.index_store.SimpleIndexStore.from_persist_dir llama_index.Prompt llama_index.load_index_from_storage llama_index.vector_stores.SimpleVectorStore.from_persist_dir
extract_api: [((2439, 2481), 'llama_index.load_index_from_storage', 'load_index_from_storage', (['storage_context_1'], {}), '(storage_context_1)\n', (2462, 2481), False, 'from llama_index import load_index_from_storage, load_indices_from_storage, load_graph_from_storage\n'), ((2493, 2535), 'llama_index.load_index_from_storage', 'load_index_from_storage', (['storage_context_2'], {}), '(storage_context_2)\n', (2516, 2535), False, 'from llama_index import load_index_from_storage, load_indices_from_storage, load_graph_from_storage\n'), ((2547, 2589), 'llama_index.load_index_from_storage', 'load_index_from_storage', (['storage_context_3'], {}), '(storage_context_3)\n', (2570, 2589), False, 'from llama_index import load_index_from_storage, load_indices_from_storage, load_graph_from_storage\n'), ((2601, 2643), 'llama_index.load_index_from_storage', 'load_index_from_storage', (['storage_context_4'], {}), '(storage_context_4)\n', (2624, 2643), False, 'from llama_index import load_index_from_storage, load_indices_from_storage, load_graph_from_storage\n'), ((2909, 2940), 'llama_index.ResponseSynthesizer.from_args', 'ResponseSynthesizer.from_args', ([], {}), '()\n', (2938, 2940), False, 'from llama_index import ResponseSynthesizer\n'), ((3238, 3258), 'llama_index.Prompt', 'Prompt', (['TEMPLATE_STR'], {}), '(TEMPLATE_STR)\n', (3244, 3258), False, 'from llama_index import Prompt\n'), ((3383, 3457), 'llama_index.ServiceContext.from_defaults', 'ServiceContext.from_defaults', ([], {'llm_predictor': 'llm_predictor', 'chunk_size': '(1024)'}), '(llm_predictor=llm_predictor, chunk_size=1024)\n', (3411, 3457), False, 'from llama_index import ServiceContext\n'), ((1282, 1346), 'llama_index.storage.docstore.SimpleDocumentStore.from_persist_dir', 'SimpleDocumentStore.from_persist_dir', ([], {'persist_dir': '"""vector_store"""'}), "(persist_dir='vector_store')\n", (1318, 1346), False, 'from llama_index.storage.docstore import SimpleDocumentStore\n'), ((1365, 1427), 'llama_index.vector_stores.SimpleVectorStore.from_persist_dir', 'SimpleVectorStore.from_persist_dir', ([], {'persist_dir': '"""vector_store"""'}), "(persist_dir='vector_store')\n", (1399, 1427), False, 'from llama_index.vector_stores import SimpleVectorStore\n'), ((1445, 1506), 'llama_index.storage.index_store.SimpleIndexStore.from_persist_dir', 'SimpleIndexStore.from_persist_dir', ([], {'persist_dir': '"""vector_store"""'}), "(persist_dir='vector_store')\n", (1478, 1506), False, 'from llama_index.storage.index_store import SimpleIndexStore\n'), ((1574, 1631), 'llama_index.storage.docstore.SimpleDocumentStore.from_persist_dir', 'SimpleDocumentStore.from_persist_dir', ([], {'persist_dir': '"""table"""'}), "(persist_dir='table')\n", (1610, 1631), False, 'from llama_index.storage.docstore import SimpleDocumentStore\n'), ((1650, 1705), 'llama_index.vector_stores.SimpleVectorStore.from_persist_dir', 'SimpleVectorStore.from_persist_dir', ([], {'persist_dir': '"""table"""'}), "(persist_dir='table')\n", (1684, 1705), False, 'from llama_index.vector_stores import SimpleVectorStore\n'), ((1723, 1777), 'llama_index.storage.index_store.SimpleIndexStore.from_persist_dir', 'SimpleIndexStore.from_persist_dir', ([], {'persist_dir': '"""table"""'}), "(persist_dir='table')\n", (1756, 1777), False, 'from llama_index.storage.index_store import SimpleIndexStore\n'), ((1844, 1900), 'llama_index.storage.docstore.SimpleDocumentStore.from_persist_dir', 'SimpleDocumentStore.from_persist_dir', ([], {'persist_dir': '"""tree"""'}), "(persist_dir='tree')\n", (1880, 1900), False, 'from llama_index.storage.docstore import SimpleDocumentStore\n'), ((1919, 1973), 'llama_index.vector_stores.SimpleVectorStore.from_persist_dir', 'SimpleVectorStore.from_persist_dir', ([], {'persist_dir': '"""tree"""'}), "(persist_dir='tree')\n", (1953, 1973), False, 'from llama_index.vector_stores import SimpleVectorStore\n'), ((1991, 2044), 'llama_index.storage.index_store.SimpleIndexStore.from_persist_dir', 'SimpleIndexStore.from_persist_dir', ([], {'persist_dir': '"""tree"""'}), "(persist_dir='tree')\n", (2024, 2044), False, 'from llama_index.storage.index_store import SimpleIndexStore\n'), ((2111, 2167), 'llama_index.storage.docstore.SimpleDocumentStore.from_persist_dir', 'SimpleDocumentStore.from_persist_dir', ([], {'persist_dir': '"""list"""'}), "(persist_dir='list')\n", (2147, 2167), False, 'from llama_index.storage.docstore import SimpleDocumentStore\n'), ((2186, 2240), 'llama_index.vector_stores.SimpleVectorStore.from_persist_dir', 'SimpleVectorStore.from_persist_dir', ([], {'persist_dir': '"""list"""'}), "(persist_dir='list')\n", (2220, 2240), False, 'from llama_index.vector_stores import SimpleVectorStore\n'), ((2258, 2311), 'llama_index.storage.index_store.SimpleIndexStore.from_persist_dir', 'SimpleIndexStore.from_persist_dir', ([], {'persist_dir': '"""list"""'}), "(persist_dir='list')\n", (2291, 2311), False, 'from llama_index.storage.index_store import SimpleIndexStore\n'), ((3293, 3362), 'langchain.chat_models.ChatOpenAI', 'ChatOpenAI', ([], {'temperature': '(0)', 'model_name': '"""gpt-3.5-turbo"""', 'streaming': '(True)'}), "(temperature=0, model_name='gpt-3.5-turbo', streaming=True)\n", (3303, 3362), False, 'from langchain.chat_models import ChatOpenAI\n')]