from langchain.embeddings import HuggingFaceInferenceAPIEmbeddings from dotenv import load_dotenv import os load_dotenv() api_key = os.getenv("HUGGINGFACEHUB_API_TOKEN") embeddings = HuggingFaceInferenceAPIEmbeddings( api_key=api_key, model_name="sentence-transformers/all-MiniLM-L6-v2" )