from llama_index import GPTListIndex, SimpleDirectoryReader from langchain.embeddings.huggingface import HuggingFaceEmbeddings from llama_index import LangchainEmbedding, ServiceContext # load in HF embedding model from langchain embed_model = LangchainEmbedding(HuggingFaceEmbeddings()) service_context = ServiceContext.from_defaults(embed_model=embed_model)