feat: support SiliconFlow (close #437, close #403)

This commit is contained in:
CalciumIon
2024-08-16 18:27:26 +08:00
parent 37cc9c2448
commit e12516e93d
10 changed files with 227 additions and 23 deletions
+3
View File
@@ -23,6 +23,7 @@ const (
APITypeDify
APITypeJina
APITypeCloudflare
APITypeSiliconFlow
APITypeDummy // this one is only for count, do not add any channel after this
)
@@ -66,6 +67,8 @@ func ChannelType2APIType(channelType int) (int, bool) {
apiType = APITypeJina
case common.ChannelCloudflare:
apiType = APITypeCloudflare
case common.ChannelTypeSiliconFlow:
apiType = APITypeSiliconFlow
}
if apiType == -1 {
return APITypeOpenAI, false