from langchain.embeddings.huggingface import HuggingFaceEmbeddings from llama_index import ServiceContext embed_model = LangchainEmbedding(HuggingFaceEmbeddings()) service_context = ServiceContext.from_defaults(embed_model=embed_model)