This commit is contained in:
Alex
2023-10-01 17:20:47 +01:00
parent b47ecab1a9
commit 9bbf4044e0
7 changed files with 137 additions and 56 deletions

View File

@@ -2,7 +2,7 @@ from abc import ABC, abstractmethod
import os
from langchain.embeddings import (
OpenAIEmbeddings,
HuggingFaceHubEmbeddings,
HuggingFaceEmbeddings,
CohereEmbeddings,
HuggingFaceInstructEmbeddings,
)
@@ -22,7 +22,7 @@ class BaseVectorStore(ABC):
def _get_docsearch(self, embeddings_name, embeddings_key=None):
embeddings_factory = {
"openai_text-embedding-ada-002": OpenAIEmbeddings,
"huggingface_sentence-transformers/all-mpnet-base-v2": HuggingFaceHubEmbeddings,
"huggingface_sentence-transformers/all-mpnet-base-v2": HuggingFaceEmbeddings,
"huggingface_hkunlp/instructor-large": HuggingFaceInstructEmbeddings,
"cohere_medium": CohereEmbeddings
}