feat: add New API channel support
This commit is contained in:
@@ -79,9 +79,23 @@ func ChannelType2APIType(channelType int) (int, bool) {
|
||||
apiType = constant.APITypeAdvancedCustom
|
||||
case constant.ChannelTypeSub2API:
|
||||
apiType = constant.APITypeSub2API
|
||||
case constant.ChannelTypeNewAPI:
|
||||
apiType = constant.APITypeNewAPI
|
||||
}
|
||||
if apiType == -1 {
|
||||
return constant.APITypeOpenAI, false
|
||||
}
|
||||
return apiType, true
|
||||
}
|
||||
|
||||
func IsResponsesCompactAPIType(apiType int) bool {
|
||||
switch apiType {
|
||||
case constant.APITypeOpenAI,
|
||||
constant.APITypeCodex,
|
||||
constant.APITypeSub2API,
|
||||
constant.APITypeNewAPI:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user