fix: update default Cohere rerank model to rerank-v4.0-fast

This commit is contained in:
Kudo Khang
2026-03-28 23:29:42 +07:00
committed by GitHub
parent 155e590720
commit 4015bb0f7c
4 changed files with 7 additions and 6 deletions

View File

@@ -310,7 +310,7 @@ KH_EMBEDDINGS["mistral"] = {
KH_RERANKINGS["cohere"] = {
"spec": {
"__type__": "kotaemon.rerankings.CohereReranking",
"model_name": "rerank-multilingual-v2.0",
"model_name": "rerank-v4.0-fast",
"cohere_api_key": config("COHERE_API_KEY", default=""),
},
"default": True,

View File

@@ -8,7 +8,7 @@ from .base import BaseReranking
class CohereReranking(BaseReranking):
model_name: str = "rerank-multilingual-v2.0"
model_name: str = "rerank-v4.0-fast"
cohere_api_key: str = config("COHERE_API_KEY", "")
use_key_from_ktem: bool = False

View File

@@ -13,10 +13,11 @@ class CohereReranking(BaseReranking):
"""Cohere Reranking model"""
model_name: str = Param(
"rerank-multilingual-v2.0",
"rerank-v4.0-fast",
help=(
"ID of the model to use. You can go to [Supported Models]"
"(https://docs.cohere.com/docs/rerank-2) to see the supported models"
"ID of the model to use. See [Cohere Rerank models]"
"(https://docs.cohere.com/docs/models#rerank) for supported IDs "
"(e.g. rerank-v4.0-fast, rerank-v4.0-pro, rerank-multilingual-v3.0)."
),
required=True,
)

View File

@@ -226,7 +226,7 @@ class SetupPage(BasePage):
name="cohere",
spec={
"__type__": "kotaemon.rerankings.CohereReranking",
"model_name": "rerank-multilingual-v2.0",
"model_name": "rerank-v4.0-fast",
"cohere_api_key": cohere_api_key,
},
default=True,