Commit 14399d61 by Calcium-Ion Committed by GitHub

Merge pull request #746 from zjjxwhh/main

fix: always use modelMapping in channel test
parents d4855da0 5bebd376
......@@ -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