Merge pull request #746 from zjjxwhh/main

fix: always use modelMapping in channel test
This commit is contained in:
Calcium-Ion
2025-02-11 12:21:06 +07:00
committed by GitHub

View File

@@ -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")