Commit 5bebd376 by zjjxwhh

fix: always use modelMapping in channel test

parent 6d021b20
......@@ -58,7 +58,8 @@ func testChannel(channel *model.Channel, testModel string) (err error, openAIErr
testModel = "gpt-3.5-turbo"
}
}
} else {
}
modelMapping := *channel.ModelMapping
if modelMapping != "" && modelMapping != "{}" {
modelMap := make(map[string]string)
......@@ -70,7 +71,6 @@ func testChannel(channel *model.Channel, testModel string) (err error, openAIErr
testModel = modelMap[testModel]
}
}
}
c.Request.Header.Set("Authorization", "Bearer "+channel.Key)
c.Request.Header.Set("Content-Type", "application/json")
......
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