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

This commit is contained in:
CalciumIon
2024-08-16 18:27:26 +08:00
parent d0f76a5c61
commit 7c4d9d225e
10 changed files with 227 additions and 23 deletions

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