Commit 073a016d by CaIon

fix: fix test channel

parent 5303004e
......@@ -47,7 +47,11 @@ func testChannel(channel *model.Channel, request ChatRequest) (err error, openai
request.Model = "gpt-3.5-turbo"
}
}
requestURL := getFullRequestURL(channel.GetBaseURL(), "/v1/chat/completions", channel.Type)
baseUrl := common.ChannelBaseURLs[channel.Type]
if channel.GetBaseURL() != "" {
baseUrl = channel.GetBaseURL()
}
requestURL := getFullRequestURL(baseUrl, "/v1/chat/completions", channel.Type)
if channel.Type == common.ChannelTypeAzure {
requestURL = getFullRequestURL(channel.GetBaseURL(), fmt.Sprintf("/openai/deployments/%s/chat/completions?api-version=2023-03-15-preview", request.Model), channel.Type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment