retrival_aug_llm / api /db /embedding.py
janar's picture
add the embedding config file
5fa437b
raw
history blame contribute delete
394 Bytes
from collections import namedtuple
from langchain.embeddings import OpenAIEmbeddings, ElasticsearchEmbeddings, SentenceTransformerEmbeddings
Embedding = namedtuple("Embedding",["embedding", "dimension", "distance"])
EMBEDDINGS = {
'SENTENCE': Embedding(SentenceTransformerEmbeddings(),768, "Cosine"),
'OPEN_AI': Embedding(OpenAIEmbeddings(), 1563, "Cosine"),
}