feat: support dify (close #299)

This commit is contained in:
CalciumIon
2024-07-06 01:32:40 +08:00
parent bd7222118a
commit e0ed59bfe3
9 changed files with 263 additions and 1 deletions

View File

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