small fixes

This commit is contained in:
2026-01-20 16:42:52 +03:00
parent c6718ac6b6
commit 0f766279ec
2 changed files with 2 additions and 1 deletions

View File

@@ -121,6 +121,7 @@ func (o *OpenAIAPI) DoRequest(url string, params any) ([]byte, error) {
}
defer res.Body.Close()
if res.StatusCode == 504 || res.StatusCode == 400 || res.StatusCode == 502 {
o.Logger.Warn(fmt.Sprintf("[%d] %s", res.StatusCode, res.Status))
time.Sleep(5 * time.Second)
return o.DoRequest(url, params)
}