feat: support set proxy for channel OpenAI (close #139)

This commit is contained in:
JustSong
2023-06-09 18:30:01 +08:00
parent 813bf0bd66
commit 8901f03864
5 changed files with 25 additions and 7 deletions

View File

@@ -27,6 +27,8 @@ func testChannel(channel *model.Channel, request *ChatRequest) error {
} else {
if channel.Type == common.ChannelTypeCustom {
requestURL = channel.BaseURL
} else if channel.Type == common.ChannelTypeOpenAI && channel.BaseURL != "" {
requestURL = channel.BaseURL
}
requestURL += "/v1/chat/completions"
}