fix: channel default test model

This commit is contained in:
CalciumIon
2024-07-08 17:06:29 +08:00
parent 4f6710e50c
commit 49cec50908
2 changed files with 10 additions and 2 deletions

View File

@@ -67,8 +67,8 @@ func testChannel(channel *model.Channel, testModel string) (err error, openaiErr
if channel.TestModel != nil && *channel.TestModel != "" {
testModel = *channel.TestModel
} else {
if len(adaptor.GetModelList()) > 0 {
testModel = adaptor.GetModelList()[0]
if len(channel.GetModels()) > 0 {
testModel = channel.GetModels()[0]
} else {
testModel = "gpt-3.5-turbo"
}