gabrielaltay's picture
update
9b6148b
raw
history blame contribute delete
370 Bytes
"""Embedding functionality for LegisQA"""
from chromadb.utils import embedding_functions
from legisqa_local.config.settings import EMBEDDING_MODEL, EMBEDDING_DEVICE
def load_embeddings():
"""Load and return the embedding function"""
emb_fn = embedding_functions.SentenceTransformerEmbeddingFunction(
model_name=EMBEDDING_MODEL
)
return emb_fn