feat: support aws claude

This commit is contained in:
CaIon committed 2024-04-23 11:44:40 +08:00
1 parent a8095ef020
commit 3721ed796c
17 files changed
+464 -81

No files matched your search

+1 -1
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
}