File size: 370 Bytes
ac2020e
 
9b6148b
ac2020e
 
 
 
 
9b6148b
 
ac2020e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
"""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