from llama_index import LangchainEmbedding from langchain.embeddings.huggingface import HuggingFaceEmbeddings embed_model = LangchainEmbedding(HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2")) service_context = ServiceContext.from_defaults( embed_model=embed_model)