Merge pull request #355 from arc53/feature/cpu-llm

llama-cpp local
This commit is contained in:
Alex
2023-10-01 17:55:26 +01:00
committed by GitHub
8 changed files with 174 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_embeddings(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
}