File size: 341 Bytes
c002818
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# embedding.py

from langchain_huggingface import HuggingFaceEmbeddings

def load_embeddings():
    """

    Returns a HuggingFaceEmbeddings instance.

    """
    embeddings = HuggingFaceEmbeddings(
        model_name="nomic-ai/nomic-embed-text-v1.5",
        model_kwargs={"trust_remote_code": True}
    )
    return embeddings