Retry OpenAI privacy opt-out after failed states
This commit is contained in:
@@ -22,6 +22,19 @@ const (
|
||||
PrivacyModeCFBlocked = "training_set_cf_blocked"
|
||||
)
|
||||
|
||||
func shouldSkipOpenAIPrivacyEnsure(extra map[string]any) bool {
|
||||
if extra == nil {
|
||||
return false
|
||||
}
|
||||
raw, ok := extra["privacy_mode"]
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
mode, _ := raw.(string)
|
||||
mode = strings.TrimSpace(mode)
|
||||
return mode != PrivacyModeFailed && mode != PrivacyModeCFBlocked
|
||||
}
|
||||
|
||||
// disableOpenAITraining calls ChatGPT settings API to turn off "Improve the model for everyone".
|
||||
// Returns privacy_mode value: "training_off" on success, "cf_blocked" / "failed" on failure.
|
||||
func disableOpenAITraining(ctx context.Context, clientFactory PrivacyClientFactory, accessToken, proxyURL string) string {
|
||||
|
||||
Reference in New Issue
Block a user