feat: support jina rerank

This commit is contained in:
CalciumIon
2024-07-06 18:42:48 +08:00
parent 3ed4f2f0a9
commit 8a730cfe12
8 changed files with 120 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ const (
APITypeAws
APITypeCohere
APITypeDify
APITypeJina
APITypeDummy // this one is only for count, do not add any channel after this
)
@@ -60,6 +61,8 @@ func ChannelType2APIType(channelType int) (int, bool) {
apiType = APITypeCohere
case common.ChannelTypeDify:
apiType = APITypeDify
case common.ChannelTypeJina:
apiType = APITypeJina
}
if apiType == -1 {
return APITypeOpenAI, false