mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-11 22:49:57 +00:00
feat(task): replace built-in task adaptors with a sandboxed JS plugin system (#7076)
This commit is contained in:
@@ -83,6 +83,11 @@ func ChannelType2APIType(channelType int) (int, bool) {
|
||||
apiType = constant.APITypeNewAPI
|
||||
}
|
||||
if apiType == -1 {
|
||||
// Task plugin channels are served by the task relay and must never
|
||||
// fall back to the OpenAI adaptor.
|
||||
if channelType == constant.ChannelTypeTaskPlugin {
|
||||
return -1, false
|
||||
}
|
||||
return constant.APITypeOpenAI, false
|
||||
}
|
||||
return apiType, true
|
||||
|
||||
Reference in New Issue
Block a user