Spaces:
Sleeping
Sleeping
File size: 394 Bytes
5fa437b |
1 2 3 4 5 6 7 8 9 10 |
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"),
}
|