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:
Laisky.Cai
2024-07-22 22:51:19 +08:00
committed by GitHub
parent 296ab013b8
commit c936198ac8
17 changed files with 292 additions and 106 deletions

View File

@@ -24,6 +24,8 @@ func GetByPath(path string) int {
relayMode = AudioTranscription
} else if strings.HasPrefix(path, "/v1/audio/translations") {
relayMode = AudioTranslation
} else if strings.HasPrefix(path, "/v1/oneapi/proxy") {
relayMode = Proxy
}
return relayMode
}