feat: support cloudflare worker ai

This commit is contained in:
CalciumIon
2024-07-13 19:55:22 +08:00
parent c88f3741e6
commit 7b36a2b885
15 changed files with 296 additions and 28 deletions

View File

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