openai 强制使用 0613 模型。强制使用 16k 模型。
This commit is contained in:
parent
8796db7d71
commit
5ce638a4d4
@ -60,6 +60,16 @@ func relayTextHelper(c *gin.Context, relayMode int) *OpenAIErrorWithStatusCode {
|
|||||||
} else if channelType == common.ChannelTypePaLM {
|
} else if channelType == common.ChannelTypePaLM {
|
||||||
err := relayPaLM(textRequest, c)
|
err := relayPaLM(textRequest, c)
|
||||||
return err
|
return err
|
||||||
|
} else if channelType == common.ChannelTypeOpenAI {
|
||||||
|
// openai 强制使用 0613 模型
|
||||||
|
textRequest.Model = strings.TrimSuffix(textRequest.Model, "-0301")
|
||||||
|
textRequest.Model = strings.TrimSuffix(textRequest.Model, "-0314")
|
||||||
|
textRequest.Model = strings.TrimSuffix(textRequest.Model, "-0613")
|
||||||
|
// 强制使用 16k 模型
|
||||||
|
if textRequest.Model == "gpt-3.5-turbo" {
|
||||||
|
textRequest.Model = "gpt-3.5-turbo-16k"
|
||||||
|
}
|
||||||
|
textRequest.Model = textRequest.Model + "-0613"
|
||||||
}
|
}
|
||||||
var promptTokens int
|
var promptTokens int
|
||||||
switch relayMode {
|
switch relayMode {
|
||||||
|
Loading…
Reference in New Issue
Block a user