mirror of
https://github.com/Cinnamon/kotaemon.git
synced 2025-06-26 23:19:56 +00:00
feat: expose Cohere and HF embedding support on UI (#236)
This commit is contained in:
parent
4d7f16475f
commit
069f0f3c83
@ -167,7 +167,7 @@ if config("LOCAL_MODEL", default=""):
|
||||
"default": False,
|
||||
}
|
||||
|
||||
KH_EMBEDDINGS["local-bge-en"] = {
|
||||
KH_EMBEDDINGS["fast_embed"] = {
|
||||
"spec": {
|
||||
"__type__": "kotaemon.embeddings.FastEmbedEmbeddings",
|
||||
"model_name": "BAAI/bge-base-en-v1.5",
|
||||
@ -202,6 +202,23 @@ KH_LLMS["groq"] = {
|
||||
"default": False,
|
||||
}
|
||||
|
||||
# additional embeddings configurations
|
||||
KH_EMBEDDINGS["cohere"] = {
|
||||
"spec": {
|
||||
"__type__": "kotaemon.embeddings.LCCohereEmbeddings",
|
||||
"model": "embed-multilingual-v2.0",
|
||||
"cohere_api_key": "your-key",
|
||||
},
|
||||
"default": False,
|
||||
}
|
||||
# KH_EMBEDDINGS["huggingface"] = {
|
||||
# "spec": {
|
||||
# "__type__": "kotaemon.embeddings.LCHuggingFaceEmbeddings",
|
||||
# "model_name": "sentence-transformers/all-mpnet-base-v2",
|
||||
# },
|
||||
# "default": False,
|
||||
# }
|
||||
|
||||
KH_REASONINGS = [
|
||||
"ktem.reasoning.simple.FullQAPipeline",
|
||||
"ktem.reasoning.simple.FullDecomposeQAPipeline",
|
||||
|
@ -55,10 +55,18 @@ class EmbeddingManager:
|
||||
from kotaemon.embeddings import (
|
||||
AzureOpenAIEmbeddings,
|
||||
FastEmbedEmbeddings,
|
||||
LCCohereEmbeddings,
|
||||
LCHuggingFaceEmbeddings,
|
||||
OpenAIEmbeddings,
|
||||
)
|
||||
|
||||
self._vendors = [AzureOpenAIEmbeddings, OpenAIEmbeddings, FastEmbedEmbeddings]
|
||||
self._vendors = [
|
||||
AzureOpenAIEmbeddings,
|
||||
OpenAIEmbeddings,
|
||||
FastEmbedEmbeddings,
|
||||
LCCohereEmbeddings,
|
||||
LCHuggingFaceEmbeddings,
|
||||
]
|
||||
|
||||
def __getitem__(self, key: str) -> BaseEmbeddings:
|
||||
"""Get model by name"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user