# embeddings.py from langchain_community.embeddings import HuggingFaceBgeEmbeddings from .config import EMBEDDING_MODEL from .utils import get_device def get_embeddings(): return HuggingFaceBgeEmbeddings( model_name=EMBEDDING_MODEL, model_kwargs={"device": get_device()}, encode_kwargs={"normalize_embeddings": True}, )