code: import llama_index, os
  import dill as pickle # dill is a more powerful version of pickle
  from llama_index import ServiceContext, StorageContext
  from dotenv import load_dotenv
  from langchain.chat_models import ChatOpenAI
  from langchain.embeddings import OpenAIEmbeddings
  
  load_dotenv('app/.env')
  
  OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
  
  llm = ChatOpenAI(
      model_name="gpt-3.5-turbo", 
      temperature=0
  )
  
  llm_embeddings = OpenAIEmbeddings()
  
  service_context = ServiceContext.from_defaults(
      llm=llm, embed_model=llm_embeddings
  )
  
  llama_index.set_global_service_context(service_context)
  
  # The other computational tasks
  ccel_storage_context = StorageContext.from_defaults(persist_dir='app/systematic_theology')
  
  # if precomputed_results directory doesn't exist, create it
  if not os.path.exists('precomputed_results'):
      os.makedirs('precomputed_results')
  
  # Serialize with dill
  with open('precomputed_results/ccel_storage_context.pkl', 'wb') as f:
      pickle.dump(ccel_storage_context, f)
apis: llama_index.set_global_service_context llama_index.ServiceContext.from_defaults llama_index.StorageContext.from_defaults
extract_api: [((271, 294), 'dotenv.load_dotenv', 'load_dotenv', (['"""app/.env"""'], {}), "('app/.env')\n", (282, 294), False, 'from dotenv import load_dotenv\n'), ((313, 345), 'os.environ.get', 'os.environ.get', (['"""OPENAI_API_KEY"""'], {}), "('OPENAI_API_KEY')\n", (327, 345), False, 'import llama_index, os\n'), ((353, 406), 'langchain.chat_models.ChatOpenAI', 'ChatOpenAI', ([], {'model_name': '"""gpt-3.5-turbo"""', 'temperature': '(0)'}), "(model_name='gpt-3.5-turbo', temperature=0)\n", (363, 406), False, 'from langchain.chat_models import ChatOpenAI\n'), ((436, 454), 'langchain.embeddings.OpenAIEmbeddings', 'OpenAIEmbeddings', ([], {}), '()\n', (452, 454), False, 'from langchain.embeddings import OpenAIEmbeddings\n'), ((474, 539), 'llama_index.ServiceContext.from_defaults', 'ServiceContext.from_defaults', ([], {'llm': 'llm', 'embed_model': 'llm_embeddings'}), '(llm=llm, embed_model=llm_embeddings)\n', (502, 539), False, 'from llama_index import ServiceContext, StorageContext\n'), ((547, 602), 'llama_index.set_global_service_context', 'llama_index.set_global_service_context', (['service_context'], {}), '(service_context)\n', (585, 602), False, 'import llama_index, os\n'), ((659, 726), 'llama_index.StorageContext.from_defaults', 'StorageContext.from_defaults', ([], {'persist_dir': '"""app/systematic_theology"""'}), "(persist_dir='app/systematic_theology')\n", (687, 726), False, 'from llama_index import ServiceContext, StorageContext\n'), ((795, 832), 'os.path.exists', 'os.path.exists', (['"""precomputed_results"""'], {}), "('precomputed_results')\n", (809, 832), False, 'import llama_index, os\n'), ((838, 872), 'os.makedirs', 'os.makedirs', (['"""precomputed_results"""'], {}), "('precomputed_results')\n", (849, 872), False, 'import llama_index, os\n'), ((970, 1006), 'dill.dump', 'pickle.dump', (['ccel_storage_context', 'f'], {}), '(ccel_storage_context, f)\n', (981, 1006), True, 'import dill as pickle\n')]