Allow users to select reasoning pipeline. Fix small issues with user UI, cohere name (#50)

* Fix user page

* Allow changing LLM in reasoning pipeline

* Fix CohereEmbedding name
This commit is contained in:
Duc Nguyen (john)
2024-04-25 17:18:12 +07:00
committed by GitHub
parent e29bec6275
commit a8725710af
6 changed files with 44 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ from .endpoint_based import EndpointEmbeddings
from .fastembed import FastEmbedEmbeddings
from .langchain_based import (
LCAzureOpenAIEmbeddings,
LCCohereEmbdeddings,
LCCohereEmbeddings,
LCHuggingFaceEmbeddings,
LCOpenAIEmbeddings,
)
@@ -14,7 +14,7 @@ __all__ = [
"EndpointEmbeddings",
"LCOpenAIEmbeddings",
"LCAzureOpenAIEmbeddings",
"LCCohereEmbdeddings",
"LCCohereEmbeddings",
"LCHuggingFaceEmbeddings",
"OpenAIEmbeddings",
"AzureOpenAIEmbeddings",

View File

@@ -159,7 +159,7 @@ class LCAzureOpenAIEmbeddings(LCEmbeddingMixin, BaseEmbeddings):
return AzureOpenAIEmbeddings
class LCCohereEmbdeddings(LCEmbeddingMixin, BaseEmbeddings):
class LCCohereEmbeddings(LCEmbeddingMixin, BaseEmbeddings):
"""Wrapper around Langchain's Cohere embedding, focusing on key parameters"""
def __init__(

View File

@@ -9,7 +9,7 @@ from kotaemon.embeddings import (
AzureOpenAIEmbeddings,
FastEmbedEmbeddings,
LCAzureOpenAIEmbeddings,
LCCohereEmbdeddings,
LCCohereEmbeddings,
LCHuggingFaceEmbeddings,
OpenAIEmbeddings,
)
@@ -148,7 +148,7 @@ def test_lchuggingface_embeddings(
side_effect=lambda *args, **kwargs: [[1.0, 2.1, 3.2]],
)
def test_lccohere_embeddings(langchain_cohere_embedding_call):
model = LCCohereEmbdeddings(
model = LCCohereEmbeddings(
model="embed-english-light-v2.0", cohere_api_key="my-api-key"
)