feat: support dify (close #299)

This commit is contained in:
CalciumIon
2024-07-06 01:32:40 +08:00
parent bd7222118a
commit e0ed59bfe3
9 changed files with 263 additions and 1 deletions

View File

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