}
expiry, found := chatgptTokenExpiry(tokens.AccessToken)
if !found || !time.Now().Before(expiry.Add(-chatgptRefreshMargin)) {
tokens, err = a.refresh(ctx, tokens)
if err != nil {
}
expiry, found := chatgptTokenExpiry(tokens.AccessToken)
if !found || !time.Now().Before(expiry.Add(-chatgptRefreshMargin)) {
tokens, err = a.refresh(ctx, tokens)
if err != nil {