恢复gpt

This commit is contained in:
2026-07-08 09:22:26 +08:00
parent 5e809d375b
commit e45ff5ef9a
2 changed files with 47 additions and 2 deletions
@@ -18,6 +18,12 @@ const (
defaultClientVersion = "prod-db390ebea64862bf1899c420a4c736e0cf639747"
defaultClientBuildNumber = "7904904"
defaultPOWScript = "https://chatgpt.com/backend-api/sentinel/sdk.js"
// sseAsyncGrace bounds how long startImageGeneration keeps reading the SSE
// waiting for the image_gen_async marker after the conversation id is known.
// The marker normally arrives within ~1s; when it never streams (intermittent
// on gpt-5-5-thinking) we must not hold the stream open for the whole ctx
// budget, so we break after this grace and fall through to polling.
sseAsyncGrace = 10 * time.Second
)
var (