mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-11 02:43:44 +08:00
feat: add Proxy channel type and relay mode (#1678)
Add the Proxy channel type and relay mode to support proxying requests to custom upstream services.
This commit is contained in:
@@ -44,5 +44,6 @@ const (
|
||||
Doubao
|
||||
Novita
|
||||
VertextAI
|
||||
Proxy
|
||||
Dummy
|
||||
)
|
||||
|
||||
@@ -37,6 +37,8 @@ func ToAPIType(channelType int) int {
|
||||
apiType = apitype.DeepL
|
||||
case VertextAI:
|
||||
apiType = apitype.VertexAI
|
||||
case Proxy:
|
||||
apiType = apitype.Proxy
|
||||
}
|
||||
|
||||
return apiType
|
||||
|
||||
@@ -44,6 +44,7 @@ var ChannelBaseURLs = []string{
|
||||
"https://ark.cn-beijing.volces.com", // 40
|
||||
"https://api.novita.ai/v3/openai", // 41
|
||||
"", // 42
|
||||
"", // 43
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user