fix: let user to define api path for chatgptweb
This commit is contained in:
parent
f5f21dffd8
commit
5b8a826cf9
@ -32,7 +32,6 @@ func testChannel(channel *model.Channel, request ChatRequest) error {
|
||||
if channel.BaseURL != "" {
|
||||
requestURL = channel.BaseURL
|
||||
}
|
||||
requestURL += "/api/chat-process"
|
||||
} else {
|
||||
if channel.BaseURL != "" {
|
||||
requestURL = channel.BaseURL
|
||||
|
@ -121,8 +121,6 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
||||
} else if channelType == common.ChannelTypeChatGPTWeb {
|
||||
// remove /v1/chat/completions from request url
|
||||
requestURL := strings.Split(requestURL, "/v1/chat/completions")[0]
|
||||
requestURL += "/api/chat-process"
|
||||
|
||||
fullRequestURL = fmt.Sprintf("%s%s", baseURL, requestURL)
|
||||
} else if channelType == common.ChannelTypePaLM {
|
||||
err := relayPaLM(textRequest, c)
|
||||
|
Loading…
Reference in New Issue
Block a user