🎨 OpenAI default model to 3.5

This commit is contained in:
Liang Ding 2023-05-12 09:06:43 +08:00
parent 3f4c5df01c
commit 5c06d60f05
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 4 additions and 1 deletions

View file

@ -19,6 +19,8 @@ package conf
import (
"os"
"strconv"
"github.com/sashabaranov/go-openai"
)
type AI struct {
@ -37,6 +39,7 @@ type OpenAI struct {
func NewAI() *AI {
openAI := &OpenAI{
APITimeout: 30,
APIModel: openai.GPT3Dot5Turbo,
APIBaseURL: "https://api.openai.com/v1",
}

View file

@ -339,7 +339,7 @@ func InitConf() {
Conf.AI = conf.NewAI()
}
if "" == Conf.AI.OpenAI.APIModel {
Conf.AI.OpenAI.APIModel = openai.GPT4
Conf.AI.OpenAI.APIModel = openai.GPT3Dot5Turbo
}
if "" != Conf.AI.OpenAI.APIKey {