feat: support aws claude

This commit is contained in:
CaIon
2024-04-23 11:44:40 +08:00
parent 6b97842f78
commit 9294127686
17 changed files with 464 additions and 81 deletions

View File

@@ -86,7 +86,7 @@ func testChannel(channel *model.Channel, testModel string) (err error, openaiErr
if err != nil {
return err, nil
}
if resp.StatusCode != http.StatusOK {
if resp != nil && resp.StatusCode != http.StatusOK {
err := relaycommon.RelayErrorHandler(resp)
return fmt.Errorf("status code %d: %s", resp.StatusCode, err.Error.Message), &err.Error
}