from llama_index import set_global_service_context embed_model = OpenAIEmbedding(embed_batch_size=100) service_context = ServiceContext.from_defaults(embed_model=embed_model) set_global_service_context(service_context)